[2197] | 1 | #ifndef ASAP_ASDM_READER_H |
---|
| 2 | #define ASAP_ASDM_READER_H |
---|
| 3 | |
---|
| 4 | #include <string> |
---|
| 5 | #include <map> |
---|
| 6 | |
---|
| 7 | #include <casa/Utilities/CountedPtr.h> |
---|
| 8 | #include <casa/Containers/Record.h> |
---|
[2208] | 9 | #include <casa/Logging/LogSinkInterface.h> |
---|
[2197] | 10 | #include <ASDMAll.h> |
---|
| 11 | #include <SDMBinData.h> |
---|
| 12 | |
---|
[2979] | 13 | namespace casa { |
---|
| 14 | class MDirection; |
---|
| 15 | class MeasFrame; |
---|
| 16 | class MPosition; |
---|
| 17 | class MEpoch; |
---|
| 18 | }; |
---|
[2755] | 19 | |
---|
[2197] | 20 | class ASDMReader |
---|
| 21 | { |
---|
| 22 | public: |
---|
| 23 | /** |
---|
| 24 | * constructor |
---|
| 25 | **/ |
---|
| 26 | ASDMReader() ; |
---|
| 27 | |
---|
| 28 | /** |
---|
| 29 | * destructor |
---|
| 30 | **/ |
---|
| 31 | ~ASDMReader() ; |
---|
| 32 | |
---|
| 33 | /** |
---|
| 34 | * open data |
---|
| 35 | * |
---|
| 36 | * @param filename input ASDM name |
---|
| 37 | * @param processing options as casa record |
---|
| 38 | * @return boolean status (true or false) |
---|
| 39 | **/ |
---|
[3106] | 40 | bool open( const std::string &filename, const casacore::Record &rec ) ; |
---|
[2197] | 41 | |
---|
| 42 | /** |
---|
| 43 | * fill data |
---|
| 44 | **/ |
---|
[2208] | 45 | // void fill() ; |
---|
[2197] | 46 | |
---|
| 47 | /** |
---|
| 48 | * close data |
---|
| 49 | **/ |
---|
| 50 | void close() ; |
---|
| 51 | |
---|
| 52 | /** |
---|
| 53 | * get antenna id |
---|
| 54 | **/ |
---|
[3106] | 55 | casacore::Int getAntennaId() { return antennaId_ ; } ; |
---|
[2197] | 56 | |
---|
| 57 | /** |
---|
| 58 | * get antenna name |
---|
| 59 | **/ |
---|
[3106] | 60 | casacore::String getAntennaName() { return antennaName_ ; } ; |
---|
[2197] | 61 | |
---|
| 62 | /** |
---|
| 63 | * fill header |
---|
| 64 | * |
---|
| 65 | * @param nchan (maximum) number of channel |
---|
| 66 | * @param npol (maximum) number of polarization |
---|
| 67 | * @param nif number of IFs |
---|
| 68 | * @param nbeam number of beam |
---|
| 69 | * @param observer observer name |
---|
| 70 | * @param project name |
---|
| 71 | * @param obstype observation type |
---|
| 72 | * @param antennaname antenna name |
---|
| 73 | * @param antennaposition antenna position |
---|
| 74 | * @param equinox equinox (numerical value) |
---|
| 75 | * @param freqref frequency frame |
---|
| 76 | * @param reffreq reference frequency |
---|
| 77 | * @param bandwidth (maximum) bandwidth |
---|
| 78 | * @param utc start time of observation |
---|
| 79 | * @param fluxunit flux unit (K or Jy) |
---|
| 80 | * @param epoch epoch (UTC) |
---|
| 81 | * @param poltype polarization type |
---|
| 82 | **/ |
---|
[3106] | 83 | void fillHeader( casacore::Int &nchan, |
---|
| 84 | casacore::Int &npol, |
---|
| 85 | casacore::Int &nif, |
---|
| 86 | casacore::Int &nbeam, |
---|
| 87 | casacore::String &observer, |
---|
| 88 | casacore::String &project, |
---|
| 89 | casacore::String &obstype, |
---|
| 90 | casacore::String &antennaname, |
---|
| 91 | casacore::Vector<casacore::Double> &antennaposition, |
---|
| 92 | casacore::Float &equinox, |
---|
| 93 | casacore::String &freqref, |
---|
| 94 | casacore::Double &reffreq, |
---|
| 95 | casacore::Double &bandwidth, |
---|
| 96 | casacore::Double &utc, |
---|
| 97 | casacore::String &fluxunit, |
---|
| 98 | casacore::String &epoch, |
---|
| 99 | casacore::String &poltype ) ; |
---|
[2197] | 100 | |
---|
| 101 | /** |
---|
| 102 | * get list of valid configDescriptionId |
---|
| 103 | * |
---|
| 104 | * only return list of configDescriptionId with correlationMode of |
---|
| 105 | * AUTO_ONLY or CROSS_AND_AUTO. |
---|
| 106 | * |
---|
| 107 | * @return list of valid configDescriptionId |
---|
| 108 | **/ |
---|
[3106] | 109 | casacore::Vector<casacore::uInt> getConfigDescriptionIdList() { return configDescIdList_ ; } ; |
---|
[2197] | 110 | |
---|
| 111 | /** |
---|
| 112 | * get list of fieldId |
---|
| 113 | * |
---|
[3106] | 114 | * @return list of fieldId as casacore::uInt |
---|
[2197] | 115 | **/ |
---|
[3106] | 116 | casacore::Vector<casacore::uInt> getFieldIdList() ; |
---|
[2197] | 117 | |
---|
| 118 | /** |
---|
| 119 | * get number of rows in Main table |
---|
| 120 | * |
---|
| 121 | * @return number of rows in Main table |
---|
| 122 | **/ |
---|
[3106] | 123 | casacore::uInt getNumMainRow() ; |
---|
[2197] | 124 | |
---|
| 125 | /** |
---|
| 126 | * binary data selection |
---|
| 127 | **/ |
---|
| 128 | void select() ; |
---|
| 129 | |
---|
| 130 | /** |
---|
[2208] | 131 | * set Main rows that matches given context (configDescId and fieldId) |
---|
| 132 | * to mainRow_ |
---|
[2197] | 133 | * |
---|
| 134 | * @param configDescId |
---|
| 135 | * @param fieldId |
---|
| 136 | **/ |
---|
[3106] | 137 | casacore::Bool setMainRow( casacore::uInt configDescId, casacore::uInt fieldId ) ; |
---|
[2197] | 138 | |
---|
| 139 | /** |
---|
| 140 | * set Main row to SDMBinData object |
---|
| 141 | * |
---|
| 142 | * @param irow row index |
---|
| 143 | * @return boolean indicating the row is valid or not |
---|
| 144 | **/ |
---|
[3106] | 145 | casacore::Bool setMainRow( casacore::uInt irow ) ; |
---|
[2197] | 146 | |
---|
| 147 | /** |
---|
| 148 | * get scan number of current row |
---|
| 149 | * |
---|
| 150 | * @return scan number |
---|
| 151 | **/ |
---|
[2301] | 152 | unsigned int getScanNoOfCurrentRow() { return (unsigned int)(mainRow_[row_]->getScanNumber()) ; } ; |
---|
[2197] | 153 | |
---|
| 154 | /** |
---|
| 155 | * get subscan number of current row |
---|
| 156 | * |
---|
| 157 | * @return subscan number |
---|
| 158 | **/ |
---|
[2301] | 159 | unsigned int getSubscanNoOfCurrentRow() { return (unsigned int)(mainRow_[row_]->getSubscanNumber()) ; } ; |
---|
[2197] | 160 | |
---|
| 161 | /** |
---|
[2301] | 162 | * set data index |
---|
| 163 | * |
---|
| 164 | * @param idx for vmsData_ |
---|
| 165 | **/ |
---|
| 166 | void prepareData( unsigned int idx ) ; |
---|
| 167 | |
---|
| 168 | /** |
---|
[2197] | 169 | * get subscan number for given index |
---|
| 170 | * |
---|
| 171 | * @param idx for vmsData_ |
---|
| 172 | * @return subscan number |
---|
| 173 | **/ |
---|
| 174 | unsigned int getSubscanNo( unsigned int idx ) ; |
---|
[2301] | 175 | unsigned int getSubscanNo() ; |
---|
[2197] | 176 | |
---|
| 177 | /** |
---|
| 178 | * get IF number for given index |
---|
| 179 | * |
---|
| 180 | * @param idx for vmsData_ |
---|
| 181 | * @return IF number |
---|
| 182 | **/ |
---|
[3106] | 183 | casacore::uInt getIFNo( unsigned int idx ) ; |
---|
| 184 | casacore::uInt getIFNo() ; |
---|
[2197] | 185 | |
---|
| 186 | /** |
---|
| 187 | * get number of polarization for given index |
---|
| 188 | * |
---|
| 189 | * @param idx for vmsData_ |
---|
| 190 | * @return number of polarizations |
---|
| 191 | **/ |
---|
| 192 | int getNumPol( unsigned int idx ) ; |
---|
[2301] | 193 | int getNumPol() ; |
---|
[2197] | 194 | |
---|
| 195 | /** |
---|
| 196 | * get REFPIX, REFVAL, INCREMENT for given index |
---|
| 197 | * |
---|
| 198 | * @param idx for vmsData_ |
---|
| 199 | * @param refpix REFPIX |
---|
| 200 | * @param refval REFVAL |
---|
| 201 | * @param incr INCREMENT |
---|
[2227] | 202 | * @param freqref frequency reference |
---|
[2197] | 203 | **/ |
---|
| 204 | void getFrequency( unsigned int idx, |
---|
| 205 | double &refpix, |
---|
| 206 | double &refval, |
---|
[2227] | 207 | double &incr, |
---|
| 208 | std::string &freqref ) ; |
---|
[2301] | 209 | void getFrequency( double &refpix, |
---|
| 210 | double &refval, |
---|
| 211 | double &incr, |
---|
| 212 | std::string &freqref ) ; |
---|
[2197] | 213 | |
---|
| 214 | /** |
---|
| 215 | * get MJD time in day for given index |
---|
| 216 | * |
---|
| 217 | * @param idx for vmsData_ |
---|
| 218 | * @return MJD time in day |
---|
| 219 | **/ |
---|
| 220 | double getTime( unsigned int idx ) ; |
---|
[2301] | 221 | double getTime() ; |
---|
[2197] | 222 | |
---|
| 223 | /** |
---|
| 224 | * get integration time in sec for given index |
---|
| 225 | * |
---|
| 226 | * @param idx for vmsData_ |
---|
| 227 | * @return integration time in sec |
---|
| 228 | **/ |
---|
| 229 | double getInterval( unsigned int idx ) ; |
---|
[2301] | 230 | double getInterval() ; |
---|
[2197] | 231 | |
---|
| 232 | /** |
---|
[2225] | 233 | * get source direction with reference |
---|
| 234 | * |
---|
| 235 | * @param dir source direction |
---|
| 236 | * @param reference frame |
---|
| 237 | * @param idx for Source table |
---|
| 238 | **/ |
---|
| 239 | void getSourceDirection( std::vector<double> &dir, std::string &ref ) ; |
---|
[2197] | 240 | |
---|
| 241 | /** |
---|
| 242 | * get row-based flag for given index |
---|
| 243 | * |
---|
| 244 | * @param idx for vmsData_ |
---|
| 245 | * @return row-based flag |
---|
| 246 | **/ |
---|
| 247 | unsigned int getFlagRow( unsigned int idx ) ; |
---|
[2301] | 248 | unsigned int getFlagRow() ; |
---|
[2197] | 249 | |
---|
| 250 | /** |
---|
| 251 | * get data shape (nPol, nChan, nApc=1) for given index |
---|
| 252 | * |
---|
| 253 | * @param idx for vmsData_ |
---|
| 254 | * @return data shape |
---|
| 255 | **/ |
---|
| 256 | std::vector<unsigned int> getDataShape( unsigned int idx ) ; |
---|
[2301] | 257 | std::vector<unsigned int> getDataShape() ; |
---|
[2197] | 258 | |
---|
| 259 | /** |
---|
| 260 | * get spectral data for given index |
---|
| 261 | * |
---|
| 262 | * @param idx for vmsData_ |
---|
| 263 | * @return spectral data |
---|
| 264 | **/ |
---|
| 265 | float *getSpectrum( unsigned int idx ) ; |
---|
[2301] | 266 | float *getSpectrum() ; |
---|
[2197] | 267 | |
---|
| 268 | /** |
---|
| 269 | * get Tsys for given index |
---|
| 270 | * |
---|
| 271 | * @param idx for vmsData_ |
---|
| 272 | * @return Tsys |
---|
| 273 | **/ |
---|
| 274 | std::vector< std::vector<float> > getTsys( unsigned int idx ) ; |
---|
[2301] | 275 | std::vector< std::vector<float> > getTsys() ; |
---|
[2197] | 276 | |
---|
| 277 | /** |
---|
| 278 | * get Tcal for given index |
---|
| 279 | * |
---|
| 280 | * @param idx for vmsData_ |
---|
| 281 | * @return Tcal |
---|
| 282 | **/ |
---|
| 283 | std::vector< std::vector<float> > getTcal( unsigned int idx ) ; |
---|
[2301] | 284 | std::vector< std::vector<float> > getTcal() ; |
---|
[2251] | 285 | |
---|
| 286 | /** |
---|
| 287 | * get Tcal and Tsys for given index |
---|
| 288 | * |
---|
| 289 | * @param idx for vmsData_ |
---|
| 290 | * @param tcal Tcal |
---|
| 291 | * @param tsys Tsys |
---|
| 292 | **/ |
---|
| 293 | void getTcalAndTsys( unsigned int idx, |
---|
| 294 | std::vector< std::vector<float> > &tcal, |
---|
| 295 | std::vector< std::vector<float> > &tsys ) ; |
---|
[2301] | 296 | void getTcalAndTsys( std::vector< std::vector<float> > &tcal, |
---|
| 297 | std::vector< std::vector<float> > &tsys ) ; |
---|
[2197] | 298 | |
---|
| 299 | /** |
---|
| 300 | * get opacity for given index |
---|
| 301 | * |
---|
| 302 | * @param idx for vmsData_ |
---|
| 303 | * @return opacity |
---|
| 304 | **/ |
---|
| 305 | std::vector<float> getOpacity( unsigned int idx ) ; |
---|
[2301] | 306 | std::vector<float> getOpacity() ; |
---|
[2197] | 307 | |
---|
| 308 | /** |
---|
| 309 | * get weather information for given index |
---|
| 310 | * |
---|
| 311 | * @param idx for vmsData_ |
---|
| 312 | * @param temperature |
---|
| 313 | * @param pressure |
---|
| 314 | * @param humidity |
---|
| 315 | * @param windspeed |
---|
| 316 | * @param windaz |
---|
| 317 | **/ |
---|
| 318 | void getWeatherInfo( unsigned int idx, |
---|
| 319 | float &temperature, |
---|
| 320 | float &pressure, |
---|
| 321 | float &humidity, |
---|
| 322 | float &windspeed, |
---|
| 323 | float &windaz ) ; |
---|
[2301] | 324 | void getWeatherInfo( float &temperature, |
---|
| 325 | float &pressure, |
---|
| 326 | float &humidity, |
---|
| 327 | float &windspeed, |
---|
| 328 | float &windaz ) ; |
---|
[2197] | 329 | |
---|
| 330 | /** |
---|
| 331 | * get pointing information for given index |
---|
| 332 | * |
---|
| 333 | * @param idx for vmsData_ |
---|
| 334 | * @param dir direction |
---|
| 335 | * @param az azimuth |
---|
| 336 | * @param el elevation |
---|
| 337 | * @param srate scan rate |
---|
| 338 | **/ |
---|
| 339 | void getPointingInfo( unsigned int idx, |
---|
| 340 | std::vector<double> &dir, |
---|
| 341 | double &az, |
---|
| 342 | double &el, |
---|
| 343 | std::vector<double> &srate ) ; |
---|
[2301] | 344 | void getPointingInfo( std::vector<double> &dir, |
---|
| 345 | double &az, |
---|
| 346 | double &el, |
---|
| 347 | std::vector<double> &srate ) ; |
---|
[2197] | 348 | |
---|
| 349 | /** |
---|
| 350 | * get source type enum (int) for given scan and subscan |
---|
| 351 | * |
---|
| 352 | * @param scan scan No. |
---|
| 353 | * @param subscan subscan No. |
---|
| 354 | * @return source type as int |
---|
| 355 | **/ |
---|
| 356 | int getSrcType( unsigned int scan, |
---|
| 357 | unsigned int subscan ) ; |
---|
| 358 | |
---|
| 359 | /** |
---|
[2301] | 360 | * get source properties |
---|
| 361 | * |
---|
| 362 | * @param idx for vmsData_ |
---|
| 363 | * @param srcname source name |
---|
| 364 | * @param fieldname field name |
---|
| 365 | * @param srcdir source direction |
---|
| 366 | * @param srcpm source proper motion |
---|
| 367 | * @param sysvel systemic velocity of the source |
---|
| 368 | * @param restfreq rest frequency |
---|
[2197] | 369 | **/ |
---|
[2301] | 370 | void getSourceProperty( unsigned int idx, |
---|
| 371 | std::string &srcname, |
---|
| 372 | std::string &fieldname, |
---|
| 373 | std::vector<double> &srcdir, |
---|
| 374 | std::vector<double> &srcpm, |
---|
| 375 | double &sysvel, |
---|
| 376 | std::vector<double> &restfreq ) ; |
---|
| 377 | void getSourceProperty( std::string &srcname, |
---|
| 378 | std::string &fieldname, |
---|
| 379 | std::vector<double> &srcdir, |
---|
| 380 | std::vector<double> &srcpm, |
---|
| 381 | double &sysvel, |
---|
| 382 | std::vector<double> &restfreq ) ; |
---|
[2197] | 383 | |
---|
| 384 | /** |
---|
| 385 | * set binary data to MSData object |
---|
| 386 | * |
---|
| 387 | * @return boolean status |
---|
| 388 | **/ |
---|
[3106] | 389 | casacore::Bool setData() ; |
---|
[2197] | 390 | |
---|
| 391 | /** |
---|
| 392 | * get number of data in the current row |
---|
| 393 | * |
---|
| 394 | * @return number of data |
---|
| 395 | **/ |
---|
| 396 | unsigned int getNumData() { return numData_ ; } ; |
---|
| 397 | |
---|
[2208] | 398 | /** |
---|
[2218] | 399 | * get frequency frame |
---|
| 400 | * |
---|
| 401 | * @return string representating frequency frame |
---|
| 402 | **/ |
---|
| 403 | std::string getFrame() ; |
---|
| 404 | |
---|
| 405 | /** |
---|
[2208] | 406 | * set Logger |
---|
| 407 | * |
---|
| 408 | * @param logger (LogSinkInterface) |
---|
| 409 | **/ |
---|
[3106] | 410 | void setLogger( casacore::CountedPtr<casacore::LogSinkInterface> &logsink ) ; |
---|
[2197] | 411 | |
---|
[2208] | 412 | |
---|
[2197] | 413 | private: |
---|
| 414 | |
---|
| 415 | /** |
---|
| 416 | * pick up valid configDescriptionId |
---|
| 417 | * |
---|
| 418 | * only retrieve configDescriptionId with correlationMode of |
---|
| 419 | * AUTO_ONLY or CROSS_AND_AUTO. |
---|
| 420 | **/ |
---|
| 421 | void selectConfigDescription() ; |
---|
| 422 | |
---|
| 423 | /** |
---|
| 424 | * pick up valid feedId |
---|
| 425 | * |
---|
| 426 | * only retrieve feedId that has corresponding row for antennaId_ |
---|
| 427 | **/ |
---|
| 428 | void selectFeed() ; |
---|
| 429 | |
---|
| 430 | /** |
---|
| 431 | * clear mainRow_ |
---|
| 432 | **/ |
---|
| 433 | void clearMainRow() ; |
---|
| 434 | |
---|
| 435 | /** |
---|
| 436 | * determine IFNO for each SpectralWindow rows |
---|
| 437 | * |
---|
| 438 | * SpectralWindow row is identified as WVR when basebandName is "NOBB" and numChan is 4. |
---|
| 439 | * All WVR SpectralWindow is merged into one IFNO. |
---|
| 440 | **/ |
---|
| 441 | void setupIFNO() ; |
---|
| 442 | |
---|
| 443 | /** |
---|
| 444 | * check if given SpectralWindow is WVR or not |
---|
| 445 | **/ |
---|
| 446 | bool isWVR( asdm::SpectralWindowRow *row ) ; |
---|
| 447 | |
---|
| 448 | /** |
---|
| 449 | * process Station table |
---|
| 450 | * |
---|
| 451 | * classify station Ids by its type |
---|
| 452 | **/ |
---|
| 453 | void processStation() ; |
---|
| 454 | |
---|
| 455 | /** |
---|
| 456 | * get the closest weather station for given antenna pad |
---|
| 457 | * |
---|
| 458 | * @return stationId for weather station |
---|
| 459 | **/ |
---|
| 460 | int getClosestWeatherStation() ; |
---|
| 461 | |
---|
| 462 | /** |
---|
| 463 | * get mid-point of ArrayTimeInterval |
---|
| 464 | * |
---|
| 465 | * @param time interval as ArrayTimeInterval |
---|
| 466 | * @return time of mid-point as ArrayTime |
---|
| 467 | **/ |
---|
| 468 | asdm::ArrayTime getMidTime( const asdm::ArrayTimeInterval &t ) ; |
---|
| 469 | |
---|
| 470 | /** |
---|
| 471 | * get start-point of ArrayTimeInterval |
---|
| 472 | * |
---|
| 473 | * @param time interval as ArrayTimeInterval |
---|
| 474 | * @return time of start-point as ArrayTime |
---|
| 475 | **/ |
---|
| 476 | asdm::ArrayTime getStartTime( const asdm::ArrayTimeInterval &t ) ; |
---|
| 477 | |
---|
| 478 | /** |
---|
| 479 | * get end-point of ArrayTimeInterval |
---|
| 480 | * |
---|
| 481 | * @param time interval as ArrayTimeInterval |
---|
| 482 | * @return time of end-point as ArrayTime |
---|
| 483 | **/ |
---|
| 484 | asdm::ArrayTime getEndTime( const asdm::ArrayTimeInterval &t ) ; |
---|
| 485 | |
---|
| 486 | /** |
---|
| 487 | * AZEL to J2000 |
---|
| 488 | * |
---|
| 489 | * @param dir pointing direction |
---|
| 490 | * @param az azimuth |
---|
| 491 | * @param el elevation |
---|
| 492 | * @param mjd reference time |
---|
| 493 | * @param antpos antenna position vector |
---|
| 494 | **/ |
---|
| 495 | void toJ2000( std::vector<double> &dir, |
---|
[2301] | 496 | double &az, |
---|
| 497 | double &el, |
---|
[2755] | 498 | double &mjd ) ; |
---|
[2220] | 499 | /** |
---|
[2225] | 500 | * to J2000 |
---|
| 501 | * |
---|
| 502 | * @param dir pointing direction |
---|
| 503 | * @param dirref direction reference |
---|
| 504 | * @param mjd reference time |
---|
| 505 | * @param antpos antenna position vector |
---|
| 506 | * @return new direction |
---|
| 507 | **/ |
---|
[2301] | 508 | std::vector<double> toJ2000( std::vector<double> &dir, |
---|
[3106] | 509 | casacore::String &dirref, |
---|
[2755] | 510 | double &mjd ) ; |
---|
| 511 | |
---|
[2225] | 512 | /** |
---|
[2220] | 513 | * get nIF |
---|
| 514 | * |
---|
| 515 | * @return number of IFs |
---|
| 516 | **/ |
---|
| 517 | int getNumIFs() ; |
---|
| 518 | |
---|
[2251] | 519 | /** |
---|
| 520 | * get appropriate row from SysCal table |
---|
| 521 | * |
---|
| 522 | * @param idx for vmsData_ |
---|
| 523 | * @return pointer to SysCalRow object (0 when no appropriate row) |
---|
| 524 | **/ |
---|
| 525 | asdm::SysCalRow *getSysCalRow( unsigned int idx ) ; |
---|
[2301] | 526 | asdm::SysCalRow *getSysCalRow() ; |
---|
[2251] | 527 | |
---|
[2252] | 528 | /** |
---|
| 529 | * limit angule in radian within [-pi,pi] |
---|
| 530 | * |
---|
| 531 | * @param any angule in radian |
---|
| 532 | * @return equivalent angle that satisfies [-pi,pi] |
---|
| 533 | **/ |
---|
| 534 | double limitedAngle( double angle ) ; |
---|
| 535 | |
---|
[2254] | 536 | /** |
---|
| 537 | * retrieve pointing direction from pointingDirection column |
---|
| 538 | * or from target+offset |
---|
| 539 | * |
---|
| 540 | * @param row pointer to PointingRow object |
---|
| 541 | * @return pointing direction vector (matrix) |
---|
| 542 | **/ |
---|
| 543 | std::vector< std::vector<double> > pointingDir( asdm::PointingRow *row ) ; |
---|
| 544 | |
---|
[2755] | 545 | /** |
---|
| 546 | * initialize conversion engine |
---|
| 547 | **/ |
---|
| 548 | void initConvert() ; |
---|
| 549 | |
---|
[2197] | 550 | asdm::ASDM *asdm_ ; // pointer to ASDM object |
---|
| 551 | sdmbin::SDMBinData *sdmBin_ ; // pointer to ASDM binary data |
---|
| 552 | /** |
---|
| 553 | * vmsData_ is a pointer to binary data |
---|
| 554 | * |
---|
| 555 | * VMSData contents |
---|
| 556 | * |
---|
| 557 | * int processorId |
---|
| 558 | * vector< double > v_time MJD time in sec |
---|
| 559 | * vector< int > v_fieldId |
---|
| 560 | * vector< double > v_interval interval in sec |
---|
| 561 | * vector< AtmPhaseCorrection > v_atmPhaseCorrection |
---|
| 562 | * int binNum |
---|
| 563 | * vector< unsigned int > v_projectPath |
---|
| 564 | * vector< int > v_antennaId1 antennaId in int |
---|
| 565 | * vector< int > v_antennaId2 antennaId in int |
---|
| 566 | * vector< int > v_feedId1 feedId in int |
---|
| 567 | * vector< int > v_feedId2 feedId in int |
---|
| 568 | * vector< int > v_dataDescId dataDescriptionId in int |
---|
| 569 | * vector< double > v_timeCentroid |
---|
| 570 | * vector< double > exposure |
---|
| 571 | * vector< int > v_numData |
---|
| 572 | * vector< vector< unsigned int > > vv_dataShape (nPol,nChan,nApc=1) |
---|
| 573 | * vector< map< AtmPhaseCorrection, float *> > v_m_data actual data |
---|
| 574 | * vector< vector< vector< Angle > > > v_pahseDir direction |
---|
| 575 | * vector< int > v_stateId |
---|
| 576 | * vector< MSState > v_msState |
---|
| 577 | * vector< unsigned int > v_flag |
---|
| 578 | **/ |
---|
[2301] | 579 | const sdmbin::VMSData *vmsData_ ; |
---|
| 580 | |
---|
[3106] | 581 | casacore::Int antennaId_ ; // antenna id |
---|
| 582 | casacore::String antennaName_ ; // antenna name |
---|
| 583 | casacore::String stationName_ ; // station name |
---|
| 584 | casacore::Vector<casacore::Quantity> antennaPosition_ ; // antenna position |
---|
| 585 | casacore::Vector<casacore::uInt> configDescIdList_ ; // list of valid configDescriptionId |
---|
| 586 | casacore::Vector<casacore::uInt> feedIdList_ ; // list of valid feedId |
---|
| 587 | casacore::Vector<casacore::uInt> fieldIdList_ ; // list of fieldId |
---|
| 588 | casacore::Int row_ ; // current row index |
---|
| 589 | map<asdm::Tag,casacore::uInt> ifno_ ; // list of IFNO for each SpectralWindow rows |
---|
[2197] | 590 | unsigned int numData_ ; // number of valid data in vmsData_ where v_antennaId equals antennaId_ |
---|
| 591 | vector<unsigned int> dataIdList_ ; // list of valid data indexes in vmsData_ |
---|
| 592 | vector<asdm::Tag> antennaPad_ ; // list of Station Tags for ANTENNA_PAD |
---|
| 593 | vector<asdm::Tag> weatherStation_ ; // list of Station Tags for WEATHER_STATION |
---|
| 594 | int weatherStationId_ ; // closest weather station for antennaId_ |
---|
| 595 | AtmPhaseCorrectionMod::AtmPhaseCorrection apc_ ; // ATM phase correction |
---|
[2208] | 596 | EnumSet<CorrelationModeMod::CorrelationMode> corrMode_ ; // input correlation mode |
---|
| 597 | EnumSet<TimeSamplingMod::TimeSampling> timeSampling_ ; // time sampling |
---|
[2215] | 598 | EnumSet<SpectralResolutionTypeMod::SpectralResolutionType> resolutionType_ ; // spectral resolution type |
---|
[3106] | 599 | casacore::CountedPtr<casacore::LogSinkInterface> logsink_ ; // Logger |
---|
| 600 | casacore::String className_ ; |
---|
[2301] | 601 | unsigned int dataIndex_ ; |
---|
| 602 | |
---|
| 603 | // Tables/Rows for ASDM |
---|
[3106] | 604 | casacore::Vector<asdm::MainRow *> mainRow_ ; // list of pointers to all Main rows |
---|
[2301] | 605 | //asdm::AntennaRow *antennaRow_p ; // pointer to target Antenna row |
---|
| 606 | //asdm::StationRow *stationRow_p ; // pointer to target Station row that target antenna is located |
---|
| 607 | asdm::SpectralWindowRow *specWinRow_p ; // pointer to SpectralWindow row |
---|
| 608 | asdm::PolarizationRow *polarizationRow_p ; // pointer to Polarization row |
---|
| 609 | asdm::FieldRow *fieldRow_p ; // pointer to Field row |
---|
| 610 | |
---|
| 611 | // Tags |
---|
| 612 | asdm::Tag antennaTag_ ; |
---|
| 613 | asdm::Tag specWinTag_ ; |
---|
| 614 | asdm::Tag execBlockTag_ ; |
---|
| 615 | |
---|
| 616 | // time |
---|
| 617 | asdm::ArrayTimeInterval timeInterval_ ; |
---|
[2755] | 618 | |
---|
[3106] | 619 | casacore::MDirection::Convert toj2000_ ; |
---|
| 620 | casacore::MeasFrame mf_ ; |
---|
| 621 | casacore::MPosition mp_ ; |
---|
| 622 | casacore::MEpoch me_ ; |
---|
[2197] | 623 | } ; |
---|
| 624 | #endif // ASAP_ASDM_READER_H |
---|