source: trunk/src/STCalSkyPSAlma.cpp@ 2930

Last change on this file since 2930 was 2915, checked in by Takeshi Nakazato, 11 years ago

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: 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...

Refactoring STCalibration and its derived classes.
Fix for threshold of time gap analysis.


File size: 1.4 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 Vector<Float> any_data)
56{
57 STCalSkyTable *p = dynamic_cast<STCalSkyTable *>(&(*applytable_));
58 p->appenddata(scanno, cycleno, beamno, ifno, polno,
59 freqid, time, elevation, any_data);
60}
61
62}
Note: See TracBrowser for help on using the repository browser.