Changeset 1391 for trunk/src/STFiller.cpp
- Timestamp:
- 07/30/07 11:59:36 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STFiller.cpp
r1188 r1391 26 26 27 27 #include <atnf/PKSIO/PKSreader.h> 28 //#include <casa/System/ProgressMeter.h> 29 28 30 29 31 #include "STDefs.h" … … 134 136 } 135 137 // Determine Telescope and set brightness unit 138 136 139 137 140 Bool throwIt = False; … … 184 187 reader_->select(beams, ifs, start, end, ref, True, haveXPol_[0], False); 185 188 table_->setHeader(*header_); 189 //For MS, add the location of POINTING of the input MS so one get 190 //pointing data from there, if necessary. 191 //Also find nrow in MS 192 nInDataRow = 0; 193 if (format == "MS2") { 194 Path datapath(inName); 195 String ptTabPath = datapath.absoluteName(); 196 Table inMS(ptTabPath); 197 nInDataRow = inMS.nrow(); 198 ptTabPath.append("/POINTING"); 199 table_->table().rwKeywordSet().define("POINTING", ptTabPath); 200 if ((header_->antennaname).matches("GBT")) { 201 String GOTabPath = datapath.absoluteName(); 202 GOTabPath.append("/GBT_GO"); 203 table_->table().rwKeywordSet().define("GBT_GO", GOTabPath); 204 } 205 } 206 186 207 } 187 208 … … 209 230 Complex xCalFctr; 210 231 Vector<Complex> xPol; 232 Double min = 0.0; 233 Double max = nInDataRow; 234 //ProgressMeter fillpm(min, max, "Data importing progress"); 235 int n = 0; 211 236 while ( status == 0 ) { 212 237 status = reader_->read(scanNo, cycleNo, mjd, interval, fieldName, … … 220 245 spectra, flagtra, xCalFctr, xPol); 221 246 if ( status != 0 ) break; 247 n += 1; 248 222 249 Regex filterrx(".*[SL|PA]$"); 223 250 Regex obsrx("^AT.+"); … … 250 277 RecordFieldPtr<String> srcnCol(rec, "SRCNAME"); 251 278 RecordFieldPtr<Int> srctCol(rec, "SRCTYPE"); 279 RecordFieldPtr<String> fieldnCol(rec, "FIELDNAME"); 280 *fieldnCol = fieldName; 252 281 // try to auto-identify if it is on or off. 253 282 Regex rx(".*[e|w|_R]$"); … … 340 369 row.put(table_->table().nrow()-1, rec); 341 370 } 371 //fillpm._update(n); 342 372 } 343 373 if (status > 0) { … … 345 375 throw(AipsError("Reading error occured, data possibly corrupted.")); 346 376 } 377 //fillpm.done(); 347 378 return status; 348 379 }
Note: See TracChangeset
for help on using the changeset viewer.