source: trunk/src/STCalSkyOtfAlma.cpp@ 3012

Last change on this file since 3012 was 2983, checked in by Takeshi Nakazato, 10 years ago

New Development: No

JIRA Issue: Yes CAS-???

Ready for Test: Yes

Interface Changes: Yes/No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Fix for calmode='otfraster' and 'otf'.


File size: 1.2 KB
RevLine 
[2757]1//
2// C++ Implementation: STCalSkyOtfAlma
3//
4// Description:
5//
6//
7// Author: Takeshi Nakazato <takeshi.nakazato@nao.ac.jp> (C) 2012
8//
9// Copyright: See COPYING file that comes with this distribution
10//
11//
12
13#include <vector>
14#include "STSelector.h"
15#include "STCalSkyOtfAlma.h"
16#include "RowAccumulator.h"
17#include "STIdxIter.h"
18#include "STDefs.h"
19#include "EdgeMarker.h"
20
21#include <atnf/PKSIO/SrcType.h>
22
23using namespace std;
24using namespace casa;
25
26namespace asap {
27 STCalSkyOtfAlma::STCalSkyOtfAlma(CountedPtr<Scantable> &s, bool israster)
28 : STCalSkyPSAlma(s),
29 israster_(israster)
[2823]30{
31 rowNumbers_ = scantable_->table().rowNumbers();
32}
[2757]33
[2786]34void STCalSkyOtfAlma::setupSelector(const STSelector &sel)
[2757]35{
[2786]36 sel_ = sel;
[2757]37
38 // Detect edges using EdgeMarker
[2758]39 EdgeMarker marker(israster_);
40
41 // we can set insitu=True since we only need
42 // a list of rows to be marked. No marking is
43 // done here.
44 marker.setdata(scantable_, True);
[2983]45 marker.examine();
[2757]46 marker.setoption(options_);
47 marker.detect();
48 Block<uInt> rows = marker.getDetectedRows();
49 vector<int> vectorRows(rows.nelements());
50 for (size_t i = 0; i < vectorRows.size(); ++i)
[2823]51 vectorRows[i] = rowNumbers_[rows[i]];
52
[2757]53 // Set list of row indices to selector
54 sel_.setRows(vectorRows);
55}
56
57}
Note: See TracBrowser for help on using the repository browser.