- Timestamp:
- 12/01/11 17:33:24 (13 years ago)
- Location:
- trunk/external-alma
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/external-alma/asdm2ASAP/ASDMFiller.cc
r2301 r2355 134 134 //unsigned int scanno = reader_->getScanNo() ; 135 135 unsigned int scanno = reader_->getScanNoOfCurrentRow() ; 136 //logsink_->postLocally( LogMessage("scanno = "+String::toString(scanno),LogOrigin(className_,funcName,WHERE)) ) ; 136 137 //uInt subscanno = reader_->getSubscanNo() ; 137 138 citer = cycleno.find( scanno ) ; … … 152 153 string freqref = "" ; 153 154 155 //logsink_->postLocally( LogMessage("numData = "+String::toString(numData),LogOrigin(className_,funcName,WHERE)) ) ; 154 156 for ( unsigned int idata = 0 ; idata < numData ; idata++ ) { 155 157 // prepare to extract binary data 158 //logsink_->postLocally( LogMessage("prepare data...",LogOrigin(className_,funcName,WHERE)) ) ; 156 159 reader_->prepareData( idata ) ; 157 160 … … 159 162 //unsigned int subscanno = reader_->getSubscanNo( idata ) ; 160 163 unsigned int subscanno = reader_->getSubscanNo() ; 164 //logsink_->postLocally( LogMessage("subscanno = "+String::toString(subscanno),LogOrigin(className_,funcName,WHERE)) ) ; 161 165 162 166 // IFNO 163 167 //uInt ifno = reader_->getIFNo( idata ) ; 164 168 uInt ifno = reader_->getIFNo() ; 165 169 //logsink_->postLocally( LogMessage("ifno = "+String::toString(ifno),LogOrigin(className_,funcName,WHERE)) ) ; 166 170 // source spec 167 171 int srctype = reader_->getSrcType( scanno, subscanno ) ; 172 //logsink_->postLocally( LogMessage("srctype = "+String::toString(srctype),LogOrigin(className_,funcName,WHERE)) ) ; 168 173 string srcname ; 169 174 string fieldname ; … … 185 190 sysVel, 186 191 rf ) ; 187 192 //logsink_->postLocally( LogMessage("srcname = "+String::toString(srcname),LogOrigin(className_,funcName,WHERE)) ) ; 193 188 194 // fill MOLECULE_ID and add MOLECULES row if necessary 189 195 Vector<casa::Double> restFreqs( rf.size() ) ; … … 197 203 casa::Double mjd = (casa::Double)(reader_->getTime()) ; 198 204 casa::Double interval = (casa::Double)(reader_->getInterval()) ; 205 //logsink_->postLocally( LogMessage("mjd = "+String::toString(mjd),LogOrigin(className_,funcName,WHERE)) ) ; 199 206 200 207 // fill TIME and INTERVAL … … 214 221 unsigned int flagrow = reader_->getFlagRow() ; 215 222 setFlagrow( (uInt)flagrow ) ; 216 223 //logsink_->postLocally( LogMessage("flagrow = "+String::toString(flagrow),LogOrigin(className_,funcName,WHERE)) ) ; 217 224 // fill WEATHER_ID and add WEATHER row if necessary 218 225 float temperature ; … … 237 244 (casa::Float)windspeed, 238 245 (casa::Float)windaz ) ; 239 246 //logsink_->postLocally( LogMessage("temperature = "+String::toString(temperature),LogOrigin(className_,funcName,WHERE)) ) ; 240 247 // fill AZIMUTH, ELEVATION, DIRECTION and SCANRATE 241 248 vector<double> dir ; … … 302 309 // oss << dataShape[i] << ", " ; 303 310 // } 304 //logsink_->postLocally( LogMessage(oss.str(),LogOrigin(className_,funcName,WHERE)) ) ;311 // logsink_->postLocally( LogMessage(oss.str(),LogOrigin(className_,funcName,WHERE)) ) ; 305 312 306 313 //int numPol = reader_->getNumPol( idata ) ; … … 317 324 // SPECTRA, FLAGTRA, TSYS, TCAL 318 325 //float *sp = reader_->getSpectrum( idata ) ; 326 //logsink_->postLocally( LogMessage("getting spectra...",LogOrigin(className_,funcName,WHERE)) ) ; 319 327 float *sp = reader_->getSpectrum() ; 328 //logsink_->postLocally( LogMessage("sp[0] = "+String::toString(sp[0]),LogOrigin(className_,funcName,WHERE)) ) ; 320 329 vector< vector<float> > ts ; 321 330 vector< vector<float> > tc ; … … 323 332 reader_->getTcalAndTsys( tc, ts ) ; 324 333 Matrix<casa::Float> spectra = toMatrix( sp, numPol, numChan ) ; 334 //logsink_->postLocally( LogMessage("spectra(0,0) = "+String::toString(spectra(0,0)),LogOrigin(className_,funcName,WHERE)) ) ; 325 335 Vector<uChar> flagtra( numChan, 0 ) ; 326 336 Matrix<casa::Float> tsys = toMatrix( ts, numPol, numChan ) ; 327 337 Matrix<casa::Float> tcal = toMatrix( tc, numPol, numChan ) ; 338 //logsink_->postLocally( LogMessage("tsys(0,0) = "+String::toString(tsys(0,0)),LogOrigin(className_,funcName,WHERE)) ) ; 328 339 // String caltime = "" ; 329 340 // if ( anyNE( tcal, (casa::Float)1.0 ) ) -
trunk/external-alma/asdm2ASAP/ASDMReader.cc
r2307 r2355 850 850 vector<double> &restfreq ) 851 851 { 852 String funcName = "getSourceProperty" ; 852 853 ostringstream oss ; 853 854 oss << fieldRow_p->getFieldName() << "__" << vmsData_->v_fieldId[dataIndex_] ; 854 855 fieldname = oss.str() ; 856 SourceRow *srow = 0 ; 855 857 if ( fieldRow_p->isSourceIdExists() ) { 856 858 int sourceId = fieldRow_p->getSourceId() ; 857 SourceRow *srow = asdm_->getSource().getRowByKey( sourceId, timeInterval_, specWinTag_ ) ; 859 srow = asdm_->getSource().getRowByKey( sourceId, timeInterval_, specWinTag_ ) ; 860 } 861 if ( srow != 0 ) { 862 //logsink_->postLocally( LogMessage("timeInterval_="+String::toString(timeInterval_.getStart().getMJD()),LogOrigin(className_,funcName,WHERE)) ) ; 863 //logsink_->postLocally( LogMessage("specWinTag_="+String::toString(specWinTag_.toString()),LogOrigin(className_,funcName,WHERE)) ) ; 864 //SourceRow *srow = asdm_->getSource().getRowByKey( sourceId, timeInterval_, specWinTag_ ) ; 865 //logsink_->postLocally( LogMessage("sourceId="+String::toString(sourceId),LogOrigin(className_,funcName,WHERE)) ) ; 866 //if ( srow == 0 ) 867 //logsink_->postLocally( LogMessage("nullpo",LogOrigin(className_,funcName,WHERE)) ) ; 858 868 859 869 // source name 860 870 srcname = srow->getSourceName() ; 871 //logsink_->postLocally( LogMessage("srcname="+String::toString(srcname),LogOrigin(className_,funcName,WHERE)) ) ; 861 872 862 873 // source direction … … 865 876 srcdir[0] = limitedAngle( srcdirA[0].get() ) ; 866 877 srcdir[1] = limitedAngle( srcdirA[1].get() ) ; 878 //logsink_->postLocally( LogMessage("srcdir=["+String::toString(srcdir[0])+","+String::toString(srcdir[1])+"]",LogOrigin(className_,funcName,WHERE)) ) ; 867 879 if ( srow->isDirectionCodeExists() ) { 868 880 DirectionReferenceCodeMod::DirectionReferenceCode dircode = srow->getDirectionCode() ; … … 881 893 srcpm[0] = srcpmA[0].get() ; 882 894 srcpm[1] = srcpmA[1].get() ; 883 895 //logsink_->postLocally( LogMessage("srcpm=["+String::toString(srcpm[0])+","+String::toString(srcpm[1])+"]",LogOrigin(className_,funcName,WHERE)) ) ; 884 896 // systemic velocity 885 897 if ( srow->isSysVelExists() ) { … … 891 903 sysvel = 0.0 ; 892 904 } 893 905 //logsink_->postLocally( LogMessage("sysvel="+String::toString(sysvel),LogOrigin(className_,funcName,WHERE)) ) ; 894 906 // rest frequency 895 907 if ( srow->isRestFrequencyExists() ) { … … 903 915 restfreq.resize( 0 ) ; 904 916 } 917 //logsink_->postLocally( LogMessage("restfreq.size()="+String::toString(restfreq.size()),LogOrigin(className_,funcName,WHERE)) ) ; 905 918 } 906 919 else { … … 1175 1188 vector< vector<float> > defaultT( 1, vector<float>( 1, 1.0 ) ) ; 1176 1189 SysCalRow *scrow = getSysCalRow() ; 1190 //logsink_->postLocally( LogMessage("scrow = "+String::toString((long)scrow),LogOrigin(className_,funcName,WHERE)) ) ; 1177 1191 if ( scrow == 0 ) { 1178 1192 tcal = defaultT ; … … 1184 1198 unsigned int numReceptor = tsysSpec.size() ; 1185 1199 unsigned int numChan = tsysSpec[0].size() ; 1200 //logsink_->postLocally( LogMessage("TSYS: numReceptor = "+String::toString(numReceptor),LogOrigin(className_,funcName,WHERE)) ) ; 1201 //logsink_->postLocally( LogMessage("TSYS:numChan = "+String::toString(numChan),LogOrigin(className_,funcName,WHERE)) ) ; 1186 1202 tsys.resize( numReceptor ) ; 1187 1203 for ( unsigned int ir = 0 ; ir < numReceptor ; ir++ ) { … … 1199 1215 unsigned int numReceptor = tcalSpec.size() ; 1200 1216 unsigned int numChan = tcalSpec[0].size() ; 1217 //logsink_->postLocally( LogMessage("TCAL: numReceptor = "+String::toString(numReceptor),LogOrigin(className_,funcName,WHERE)) ) ; 1218 //logsink_->postLocally( LogMessage("TCAL: numChan = "+String::toString(numChan),LogOrigin(className_,funcName,WHERE)) ) ; 1201 1219 tcal.resize( numReceptor ) ; 1202 1220 for ( unsigned int ir = 0 ; ir < numReceptor ; ir++ ) { 1203 tcal[ir].resize( num Receptor) ;1221 tcal[ir].resize( numChan ) ; 1204 1222 for ( unsigned int ic = 0 ; ic < numChan ; ic++ ) { 1205 1223 tcal[ir][ic] = tcalSpec[ir][ic].get() ; -
trunk/external-alma/oldasdm2ASAP/OldASDMReader.cc
r2307 r2355 1201 1201 tcal.resize( numReceptor ) ; 1202 1202 for ( unsigned int ir = 0 ; ir < numReceptor ; ir++ ) { 1203 tcal[ir].resize( num Receptor) ;1203 tcal[ir].resize( numChan ) ; 1204 1204 for ( unsigned int ic = 0 ; ic < numChan ; ic++ ) { 1205 1205 tcal[ir][ic] = tcalSpec[ir][ic].get() ;
Note:
See TracChangeset
for help on using the changeset viewer.