Changeset 2227 for trunk/external-alma/asdm2ASAP
- Timestamp:
- 07/14/11 16:04:17 (13 years ago)
- Location:
- trunk/external-alma/asdm2ASAP
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/external-alma/asdm2ASAP/ASDMFiller.cc
r2225 r2227 68 68 // set Frame for FREQUENCIES table 69 69 string sFreqFrame = reader_->getFrame() ; 70 MFrequency::Types freqFrame = toFrameType( sFreqFrame ) ; 70 //MFrequency::Types freqFrame = toFrameType( sFreqFrame ) ; 71 MFrequency::Types freqFrame = MFrequency::LSRK ; 71 72 table_->frequencies().setFrame( freqFrame, false ) ; 72 73 table_->frequencies().setFrame( freqFrame, true ) ; … … 143 144 double refval = 0.0 ; 144 145 double incr = 0.0 ; 146 string freqref = "" ; 145 147 146 148 for ( unsigned int idata = 0 ; idata < numData ; idata++ ) { … … 151 153 // IFNO 152 154 uInt ifno = reader_->getIFNo( idata ) ; 153 154 155 // REFPIX, REFVAL, INCREMENT156 String ifkey = getIFKey( ifno ) ;157 if ( ifrec_.isDefined( ifkey ) ) {158 getFrequencyRec( ifkey, refpix, refval, incr ) ;159 }160 else {161 reader_->getFrequency( idata, refpix, refval, incr ) ;162 setFrequencyRec( ifkey, refpix, refval, incr ) ;163 }164 165 // fill FREQ_ID and add FREQUENCIES row if necessary166 setFrequency( (casa::Double)refpix, (casa::Double)refval, (casa::Double)incr ) ;167 168 155 169 156 // rest frequency … … 176 163 setMolecule( restFreqs ) ; 177 164 178 179 165 // time and interval 180 166 casa::Double mjd = (casa::Double)(reader_->getTime( idata )) ; … … 254 240 setDirection( direction, (casa::Float)az, (casa::Float)el ) ; 255 241 242 // REFPIX, REFVAL, INCREMENT 243 String ifkey = getIFKey( ifno ) ; 244 if ( ifrec_.isDefined( ifkey ) ) { 245 getFrequencyRec( ifkey, refpix, refval, incr ) ; 246 } 247 else { 248 reader_->getFrequency( idata, refpix, refval, incr, freqref ) ; 249 refval = (double)toLSRK( casa::Double(refval), 250 String(freqref), 251 mjd, 252 antpos, 253 //direction, 254 srcDir, 255 "J2000" ) ; 256 setFrequencyRec( ifkey, refpix, refval, incr ) ; 257 } 258 259 // fill FREQ_ID and add FREQUENCIES row if necessary 260 setFrequency( (casa::Double)refpix, (casa::Double)refval, (casa::Double)incr ) ; 261 256 262 // loop on polarization 257 263 vector<unsigned int> dataShape = reader_->getDataShape( idata ) ; -
trunk/external-alma/asdm2ASAP/ASDMReader.cc
r2225 r2227 48 48 bool ASDMReader::open( const string &filename, const casa::Record &rec ) 49 49 { 50 String funcName = "open" ;50 casa::String funcName = "open" ; 51 51 52 52 // return value … … 255 255 casa::String &poltype ) 256 256 { 257 String funcName = "fillHeader" ;257 casa::String funcName = "fillHeader" ; 258 258 259 259 ExecBlockTable &ebtab = asdm_->getExecBlock() ; … … 431 431 void ASDMReader::selectConfigDescription() 432 432 { 433 String funcName = "selectConfigDescription" ;433 casa::String funcName = "selectConfigDescription" ; 434 434 435 435 vector<ConfigDescriptionRow *> cdrows = asdm_->getConfigDescription().get() ; … … 467 467 casa::Vector<casa::uInt> ASDMReader::getFieldIdList() 468 468 { 469 String funcName = "getFieldIdList" ;469 casa::String funcName = "getFieldIdList" ; 470 470 471 471 vector<FieldRow *> frows = asdm_->getField().get() ; … … 544 544 void ASDMReader::setupIFNO() 545 545 { 546 String funcName = "setupIFNO" ;546 casa::String funcName = "setupIFNO" ; 547 547 548 548 vector<SpectralWindowRow *> spwrows = asdm_->getSpectralWindow().get() ; … … 601 601 // casa::Vector<casa::uInt> ASDMReader::getFeedIdList( casa::uInt cdid ) 602 602 // { 603 // String funcName = "getFeedIdList" ;603 // casa::String funcName = "getFeedIdList" ; 604 604 // 605 605 // Tag cdTag( (unsigned int)cdid, TagType::ConfigDescription ) ; … … 623 623 casa::Bool ASDMReader::setData() 624 624 { 625 String funcName = "setData" ;625 casa::String funcName = "setData" ; 626 626 627 627 //logsink_->postLocally( LogMessage("try to retrieve binary data",LogOrigin(className_,funcName,WHERE)) ) ; … … 705 705 double &refpix, 706 706 double &refval, 707 double &incr ) 708 { 709 String funcName = "getFrequency" ; 707 double &incr, 708 string &freqref ) 709 { 710 casa::String funcName = "getFrequency" ; 710 711 711 712 Tag ddTag( vmsData_->v_dataDescId[dataIdList_[idx]], TagType::DataDescription ) ; … … 714 715 SpectralWindowRow *spwrow = ddrow->getSpectralWindowUsingSpectralWindowId() ; 715 716 int nchan = spwrow->getNumChan() ; 717 freqref = "TOPO" ; 718 if ( spwrow->isMeasFreqRefExists() ) 719 freqref = CFrequencyReferenceCode::toString( spwrow->getMeasFreqRef() ) ; 716 720 if ( nchan == 1 ) { 717 721 //logsink_->postLocally( LogMessage("channel averaged data",LogOrigin(className_,funcName,WHERE)) ) ; … … 1696 1700 casa::Vector<casa::Double> antpos ) 1697 1701 { 1698 casa::String func name = "toJ2000" ;1702 casa::String funcName = "toJ2000" ; 1699 1703 1700 1704 vector<double> newd( dir ) ; … … 1733 1737 string ASDMReader::getFrame() 1734 1738 { 1735 String funcName = "getFrame" ;1739 casa::String funcName = "getFrame" ; 1736 1740 1737 1741 // default is TOPO … … 1762 1766 int ASDMReader::getNumIFs() 1763 1767 { 1764 String funcName = "getNumIFs" ;1768 casa::String funcName = "getNumIFs" ; 1765 1769 1766 1770 int nif = 0 ; -
trunk/external-alma/asdm2ASAP/ASDMReader.h
r2225 r2227 183 183 * @param refval REFVAL 184 184 * @param incr INCREMENT 185 * @param freqref frequency reference 185 186 **/ 186 187 void getFrequency( unsigned int idx, 187 188 double &refpix, 188 189 double &refval, 189 double &incr ) ; 190 double &incr, 191 std::string &freqref ) ; 190 192 191 193 /**
Note:
See TracChangeset
for help on using the changeset viewer.