source: branches/casa-release-4_3/src/STCalSkyOtfAlma.cpp@ 3123

Last change on this file since 3123 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
Line 
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)
30{
31 rowNumbers_ = scantable_->table().rowNumbers();
32}
33
34void STCalSkyOtfAlma::setupSelector(const STSelector &sel)
35{
36 sel_ = sel;
37
38 // Detect edges using EdgeMarker
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);
45 marker.examine();
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)
51 vectorRows[i] = rowNumbers_[rows[i]];
52
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.