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