Changeset 1518 for branches/alma
- Timestamp:
- 02/25/09 16:48:24 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alma/src/STFiller.cpp
r1495 r1518 455 455 << ttm->tm_hour << ":" << ttm->tm_min << ":" << ttm->tm_sec 456 456 << ")" << endl ; 457 //458 // if ( nreader_->open() != 0 ) {459 // throw( AipsError( "Error while opening file "+filename_ ) ) ;460 // }461 462 isNRO_ = true ;463 464 // store data into NROHeader and NRODataset465 //if ( nreader_->readHeader() != 0 ) {466 //throw( AipsError( "Error while reading file "+filename_ ) ) ;467 //}468 469 // get header data470 NROHeader *nheader = nreader_->getHeader() ;471 457 472 458 // fill STHeader 473 459 header_ = new STHeader() ; 474 460 475 header_->nchan = nheader->getNUMCH() ; 476 header_->npol = nreader_->getPolarizationNum() ; 477 header_->observer = nheader->getOBSVR() ; 478 header_->project = nheader->getPROJ() ; 479 header_->obstype = nheader->getSWMOD() ; 480 header_->antennaname = nheader->getSITE() ; 481 // TODO: should be investigated antenna position since there are 482 // no corresponding information in the header 483 // 2008/11/13 Takeshi Nakazato 484 // 485 // INFO: tentative antenna posiiton is obtained for NRO 45m from ITRF website 486 // 2008/11/26 Takeshi Nakazato 487 vector<double> pos = nreader_->getAntennaPosition() ; 488 header_->antennaposition = pos ; 489 char *eq = nheader->getEPOCH() ; 490 if ( strncmp( eq, "B1950", 5 ) == 0 ) 491 header_->equinox = 1950.0 ; 492 else if ( strncmp( eq, "J2000", 5 ) == 0 ) 493 header_->equinox = 2000.0 ; 494 // char *vref = nheader->getVREF() ; 495 // if ( strncmp( vref, "LSR", 3 ) == 0 ) { 496 // strcat( vref, "K" ) ; 497 // } 498 // header_->freqref = vref ; 499 nreader_->getData( 0 ) ; 500 header_->reffreq = nreader_->getData()->FREQ0 ; 501 header_->bandwidth = nheader->getBEBW()[0] ; 502 header_->utc = nreader_->getStartTime() ; 503 header_->fluxunit = "K" ; 504 header_->epoch = "UTC" ; 505 char *poltp = nheader->getPOLTP()[0] ; 506 if ( strcmp( poltp, "" ) == 0 ) 507 poltp = "None" ; 508 header_->poltype = poltp ; 509 // DEBUG 510 cout << "STFiller::openNRO() poltype = " << header_->poltype << endl ; 511 // 512 461 if ( nreader_->getHeaderInfo( header_->nchan, 462 header_->npol, 463 nIF_, 464 nBeam_, 465 header_->observer, 466 header_->project, 467 header_->obstype, 468 header_->antennaname, 469 header_->antennaposition, 470 header_->equinox, 471 header_->freqref, 472 header_->reffreq, 473 header_->bandwidth, 474 header_->utc, 475 header_->fluxunit, 476 header_->epoch, 477 header_->poltype ) ) { 478 cout << "STFiller::openNRO() Failed to get header information." << endl ; 479 return ; 480 } 481 482 ifOffset_ = 0; 513 483 vector<Bool> ifs = nreader_->getIFs() ; 514 ifOffset_ = 0;515 nIF_ = ifs.size() ;516 484 if ( whichIF >= 0 ) { 517 485 if ( whichIF >= 0 && whichIF < nIF_ ) { … … 533 501 beamOffset_ = 0; 534 502 vector<Bool> beams = nreader_->getBeams() ; 535 nBeam_ = beams.size() ;536 503 if (whichBeam>=0) { 537 504 if (whichBeam>=0 && whichBeam<nBeam_) { … … 550 517 } 551 518 } 519 552 520 header_->nbeam = nBeam_ ; 553 521 header_->nif = nIF_ ;
Note:
See TracChangeset
for help on using the changeset viewer.