source: branches/casa-release-4_3-test02/src/STCalSkyPSAlma.cpp@ 3028

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

New Development: No

JIRA Issue: Yes CAS-6585, CAS-6571

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...

Added FLAGTRA column to sky and Tsys caltable.
To support previous versions of caltabls that don't have FLAGTRA
column, the code automatically add FLAGTRA column and initialize
it with initial value (uChar)0 if no FLAGTRA exists.


File size: 1.5 KB
Line 
1//
2// C++ Implementation: STCalSkyPSAlma
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
15#include <casa/Logging/LogIO.h>
16
17#include "STSelector.h"
18#include "STCalSkyPSAlma.h"
19#include "STDefs.h"
20#include <atnf/PKSIO/SrcType.h>
21
22using namespace std;
23using namespace casa;
24
25namespace asap {
26STCalSkyPSAlma::STCalSkyPSAlma(CountedPtr<Scantable> &s)
27 : STCalibration(s, "SPECTRA")
28{
29 applytable_ = new STCalSkyTable(*s, "PSALMA");
30}
31
32void STCalSkyPSAlma::setupSelector(const STSelector &sel)
33{
34 sel_ = sel;
35 vector<int> types = sel_.getTypes();
36 if (types.size() == 0) {
37 types.resize(1);
38 types[0] = SrcType::PSOFF;
39 sel_.setTypes(types);
40 }
41 else if (find(types.begin(), types.end(), SrcType::PSOFF) == types.end()) {
42 LogIO os(LogOrigin("STCalSkyPSAlma", "setupSelector", WHERE));
43 os << LogIO::SEVERE << "Selection contains no data." << LogIO::EXCEPTION;
44 }
45 else {
46 types.resize(1);
47 types[0] = SrcType::PSOFF;
48 sel_.setTypes(types);
49 }
50}
51
52void STCalSkyPSAlma::appenddata(uInt scanno, uInt cycleno,
53 uInt beamno, uInt ifno, uInt polno,
54 uInt freqid, Double time, Float elevation,
55 const Vector<Float> &any_data,
56 const Vector<uChar> &channel_flag)
57{
58 STCalSkyTable *p = dynamic_cast<STCalSkyTable *>(&(*applytable_));
59 p->appenddata(scanno, cycleno, beamno, ifno, polno,
60 freqid, time, elevation, any_data, channel_flag);
61}
62
63}
Note: See TracBrowser for help on using the repository browser.