// // C++ Implementation: STCalSkyPSAlma // // Description: // // // Author: Takeshi Nakazato (C) 2012 // // Copyright: See COPYING file that comes with this distribution // // #include #include #include "STSelector.h" #include "STCalSkyPSAlma.h" #include "STDefs.h" #include using namespace std; using namespace casa; namespace asap { STCalSkyPSAlma::STCalSkyPSAlma(CountedPtr &s) : STCalibration(s, "SPECTRA") { applytable_ = new STCalSkyTable(*s, "PSALMA"); } void STCalSkyPSAlma::setupSelector(const STSelector &sel) { sel_ = sel; vector types = sel_.getTypes(); if (types.size() == 0) { types.resize(1); types[0] = SrcType::PSOFF; sel_.setTypes(types); } else if (find(types.begin(), types.end(), SrcType::PSOFF) == types.end()) { LogIO os(LogOrigin("STCalSkyPSAlma", "setupSelector", WHERE)); os << LogIO::SEVERE << "Selection contains no data." << LogIO::EXCEPTION; } else { types.resize(1); types[0] = SrcType::PSOFF; sel_.setTypes(types); } } void STCalSkyPSAlma::appenddata(uInt scanno, uInt cycleno, uInt beamno, uInt ifno, uInt polno, uInt freqid, Double time, Float elevation, const Vector &any_data, const Vector &channel_flag) { STCalSkyTable *p = dynamic_cast(&(*applytable_)); p->appenddata(scanno, cycleno, beamno, ifno, polno, freqid, time, elevation, any_data, channel_flag); } }