source: trunk/src/STCalSkyPSAlma.cpp@ 3126

Last change on this file since 3126 was 3106, checked in by Takeshi Nakazato, 8 years ago

New Development: No

JIRA Issue: No

Ready for Test: Yes/No

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


Check-in asap modifications from Jim regarding casacore namespace conversion.

File size: 1.5 KB
RevLine 
[2703]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>
[2786]14
15#include <casa/Logging/LogIO.h>
16
[2703]17#include "STSelector.h"
18#include "STCalSkyPSAlma.h"
19#include "STDefs.h"
20#include <atnf/PKSIO/SrcType.h>
21
22using namespace std;
[3106]23using namespace casacore;
[2703]24
25namespace asap {
26STCalSkyPSAlma::STCalSkyPSAlma(CountedPtr<Scantable> &s)
[2915]27 : STCalibration(s, "SPECTRA")
[2703]28{
[2720]29 applytable_ = new STCalSkyTable(*s, "PSALMA");
[2703]30}
31
[2786]32void STCalSkyPSAlma::setupSelector(const STSelector &sel)
[2703]33{
[2786]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 }
[2703]50}
[2915]51
52void STCalSkyPSAlma::appenddata(uInt scanno, uInt cycleno,
53 uInt beamno, uInt ifno, uInt polno,
54 uInt freqid, Double time, Float elevation,
[2955]55 const Vector<Float> &any_data,
56 const Vector<uChar> &channel_flag)
[2703]57{
[2915]58 STCalSkyTable *p = dynamic_cast<STCalSkyTable *>(&(*applytable_));
59 p->appenddata(scanno, cycleno, beamno, ifno, polno,
[2955]60 freqid, time, elevation, any_data, channel_flag);
[2703]61}
62
63}
Note: See TracBrowser for help on using the repository browser.