Changeset 2784
- Timestamp:
- 03/08/13 17:51:11 (12 years ago)
- Location:
- trunk/external-alma/atnf/PKSIO
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/external-alma/atnf/PKSIO/NROFITSDataset.cc
r2783 r2784 66 66 67 67 // field names, units, and sizes 68 readHeader( numField_, "TFIELDS" , same_) ;68 readHeader( numField_, "TFIELDS" ) ; 69 69 names_.resize( numField_ ) ; 70 70 units_.resize( numField_ ) ; … … 96 96 // initialization 97 97 int status = 0 ; 98 status = readHeader( ARYNM, "ARYNM" , same_) ;98 status = readHeader( ARYNM, "ARYNM" ) ; 99 99 if ( status != 0 ) 100 100 ARYNM = 1 ; 101 readHeader( rowNum_, "NAXIS2" , same_) ;102 readHeader( scanLen_, "NAXIS1" , same_) ;101 readHeader( rowNum_, "NAXIS2" ) ; 102 readHeader( scanLen_, "NAXIS1" ) ; 103 103 status = 0 ; 104 104 scanNum_ = rowNum_ / ARYNM ; … … 264 264 //cout << "LOETM = \'" << LOETM << "\'" << endl ; 265 265 // 266 if ( readHeader( NSCAN, "NAXIS2" , sameEndian) != 0 ) {266 if ( readHeader( NSCAN, "NAXIS2" ) != 0 ) { 267 267 os << LogIO::WARN << "Error while reading data NSCAN." << LogIO::POST ; 268 268 return -1 ; … … 295 295 //cout << "OBJ = \'" << OBJ << "\'" << endl ; 296 296 // 297 if ( readHeader( ftmp, "EPOCH" , sameEndian) != 0 ) {297 if ( readHeader( ftmp, "EPOCH" ) != 0 ) { 298 298 os << LogIO::WARN << "Error while reading data EPOCH." << LogIO::POST ; 299 299 return -1 ; … … 327 327 //cout << "DEC0 = " << DEC0 << endl ; 328 328 // 329 if ( readHeader( GLNG0, "GL0" , sameEndian) != 0 ) {329 if ( readHeader( GLNG0, "GL0" ) != 0 ) { 330 330 os << LogIO::WARN << "Error while reading data GLNG0." << LogIO::POST ; 331 331 return -1 ; … … 334 334 //cout << "GLNG0 = " << GLNG0 << endl ; 335 335 // 336 if ( readHeader( GLAT0, "GB0" , sameEndian) != 0 ) {336 if ( readHeader( GLAT0, "GB0" ) != 0 ) { 337 337 os << LogIO::WARN << "Error while reading data GLAT0." << LogIO::POST ; 338 338 return -1 ; … … 341 341 //cout << "GLAT0 = " << GLAT0 << endl ; 342 342 // 343 if ( readHeader( NCALB, "NCALB" , sameEndian) != 0 ) {343 if ( readHeader( NCALB, "NCALB" ) != 0 ) { 344 344 os << LogIO::WARN << "Error while reading data NCALB." << LogIO::POST ; 345 345 return -1 ; … … 348 348 //cout << "NCALB = " << NCALB << endl ; 349 349 // 350 if ( readHeader( SCNCD, "SCNCD" , sameEndian) != 0 ) {350 if ( readHeader( SCNCD, "SCNCD" ) != 0 ) { 351 351 os << LogIO::NORMAL << "SCNCD set to 0 (RADEC)." << LogIO::POST ; 352 352 SCNCD = 0 ; … … 398 398 //cout << "SCMOD = \'" << SCMOD << "\'" << endl ; 399 399 // 400 if ( readHeader( URVEL, "VEL" , sameEndian) != 0 ) {400 if ( readHeader( URVEL, "VEL" ) != 0 ) { 401 401 os << LogIO::WARN << "Error while reading data URVEL." << LogIO::POST ; 402 402 return -1 ; … … 426 426 //cout << "SWMOD = \'" << SWMOD << "\'" << endl ; 427 427 // 428 if ( readHeader( FRQSW, "FRQSW" , sameEndian) != 0 ) {428 if ( readHeader( FRQSW, "FRQSW" ) != 0 ) { 429 429 os << LogIO::NORMAL << "FRQSW set to 0." << LogIO::POST ; 430 430 FRQSW = 0.0 ; … … 433 433 //cout << "FRQSW = " << FRQSW << endl ; 434 434 // 435 if ( readHeader( DBEAM, "DBEAM" , sameEndian) != 0 ) {435 if ( readHeader( DBEAM, "DBEAM" ) != 0 ) { 436 436 os << LogIO::WARN << "Error while reading data DBEAM." << LogIO::POST ; 437 437 return -1 ; … … 440 440 //cout << "DBEAM = " << DBEAM << endl ; 441 441 // 442 if ( readHeader( MLTOF, "MLTOF" , sameEndian) != 0 ) {442 if ( readHeader( MLTOF, "MLTOF" ) != 0 ) { 443 443 os << LogIO::NORMAL << "MLTOF set to 0." << LogIO::POST ; 444 444 MLTOF = 0.0 ; … … 447 447 //cout << "MLTOF = " << MLTOF << endl ; 448 448 // 449 if ( readHeader( CMTQ, "CMTQ" , sameEndian) != 0 ) {449 if ( readHeader( CMTQ, "CMTQ" ) != 0 ) { 450 450 os << LogIO::WARN << "Error while reading data CMTQ." << LogIO::POST ; 451 451 return -1 ; … … 454 454 //cout << "CMTQ = " << CMTQ << endl ; 455 455 // 456 if ( readHeader( CMTE, "CMTE" , sameEndian) != 0 ) {456 if ( readHeader( CMTE, "CMTE" ) != 0 ) { 457 457 os << LogIO::WARN << "Error while reading data CMTE." << LogIO::POST ; 458 458 return -1 ; … … 461 461 //cout << "CMTE = " << CMTE << endl ; 462 462 // 463 if ( readHeader( CMTSOM, "CMTSOM" , sameEndian) != 0 ) {463 if ( readHeader( CMTSOM, "CMTSOM" ) != 0 ) { 464 464 os << LogIO::WARN << "Error while reading data CMTSOM." << LogIO::POST ; 465 465 return -1 ; … … 468 468 //cout << "CMTSOM = " << CMTSOM << endl ; 469 469 // 470 if ( readHeader( CMTNODE, "CMTNODE" , sameEndian) != 0 ) {470 if ( readHeader( CMTNODE, "CMTNODE" ) != 0 ) { 471 471 os << LogIO::WARN << "Error while reading data CMTNODE." << LogIO::POST ; 472 472 return -1 ; … … 475 475 //cout << "CMTNODE = " << CMTNODE << endl ; 476 476 // 477 if ( readHeader( CMTI, "CMTI" , sameEndian) != 0 ) {477 if ( readHeader( CMTI, "CMTI" ) != 0 ) { 478 478 os << LogIO::WARN << "Error while reading data CMTI." << LogIO::POST ; 479 479 return -1 ; … … 489 489 //cout << "CMTTM = \'" << CMTTM << "\'" << endl ; 490 490 // 491 if ( readHeader( SBDX, "SDBX" , sameEndian) != 0 ) {491 if ( readHeader( SBDX, "SDBX" ) != 0 ) { 492 492 os << LogIO::WARN << "Error while reading data SBDX." << LogIO::POST ; 493 493 return -1 ; … … 496 496 //cout << "SBDX = " << SBDX << endl ; 497 497 // 498 if ( readHeader( SBDY, "SDBY" , sameEndian) != 0 ) {498 if ( readHeader( SBDY, "SDBY" ) != 0 ) { 499 499 os << LogIO::WARN << "Error while reading data SBDY." << LogIO::POST ; 500 500 return -1 ; … … 503 503 //cout << "SBDY = " << SBDY << endl ; 504 504 // 505 if ( readHeader( SBDZ1, "SDBZ1" , sameEndian) != 0 ) {505 if ( readHeader( SBDZ1, "SDBZ1" ) != 0 ) { 506 506 os << LogIO::WARN << "Error while reading data SBDZ1." << LogIO::POST ; 507 507 return -1 ; … … 510 510 //cout << "SBDZ1 = " << SBDZ1 << endl ; 511 511 // 512 if ( readHeader( SBDZ2, "SDBZ2" , sameEndian) != 0 ) {512 if ( readHeader( SBDZ2, "SDBZ2" ) != 0 ) { 513 513 os << LogIO::WARN << "Error while reading data SBDZ2." << LogIO::POST ; 514 514 return -1 ; … … 517 517 //cout << "SBDZ2 = " << SBDZ2 << endl ; 518 518 // 519 if ( readHeader( DAZP, "DAZP" , sameEndian) != 0 ) {519 if ( readHeader( DAZP, "DAZP" ) != 0 ) { 520 520 os << LogIO::NORMAL << "DAZP set to 0." << LogIO::POST ; 521 521 DAZP = 0.0 ; … … 524 524 //cout << "DAZP = " << DAZP << endl ; 525 525 // 526 if ( readHeader( DELP, "DELP" , sameEndian) != 0 ) {526 if ( readHeader( DELP, "DELP" ) != 0 ) { 527 527 os << LogIO::NORMAL << "DELP set to 0." << LogIO::POST ; 528 528 DELP = 0.0 ; … … 531 531 //cout << "DELP = " << DELP << endl ; 532 532 // 533 if ( readHeader( CHBIND, "CHBIND" , sameEndian) != 0 ) {533 if ( readHeader( CHBIND, "CHBIND" ) != 0 ) { 534 534 os << LogIO::NORMAL << "CHBIND set to 1." << LogIO::POST ; 535 535 CHBIND = 1 ; … … 538 538 //cout << "CHBIND = " << CHBIND << endl ; 539 539 // 540 if ( readHeader( NUMCH, "NCH" , sameEndian) != 0 ) {540 if ( readHeader( NUMCH, "NCH" ) != 0 ) { 541 541 if ( readTable( NUMCH, "NCH", sameEndian ) != 0 ) { 542 542 os << LogIO::NORMAL << "NUMCH set to " << chmax_ << "." << LogIO::POST ; … … 547 547 //cout << "NUMCH = " << NUMCH << endl ; 548 548 // 549 if ( readHeader( CHMIN, "CHMIN" , sameEndian) != 0 ) {549 if ( readHeader( CHMIN, "CHMIN" ) != 0 ) { 550 550 os << LogIO::NORMAL << "CHMIN set to 1." << LogIO::POST ; 551 551 CHMIN = 1 ; … … 554 554 //cout << "CHMIN = " << CHMIN << endl ; 555 555 // 556 if ( readHeader( CHMAX, "CHMAX" , sameEndian) != 0 ) {556 if ( readHeader( CHMAX, "CHMAX" ) != 0 ) { 557 557 os << LogIO::NORMAL << "CHMAX set to " << chmax_ << "." << LogIO::POST ; 558 558 CHMAX = chmax_ ; … … 561 561 //cout << "CHMAX = " << CHMAX << endl ; 562 562 // 563 if ( readHeader( ALCTM, "ALCTM" , sameEndian) != 0 ) {563 if ( readHeader( ALCTM, "ALCTM" ) != 0 ) { 564 564 if ( readTable( ALCTM, "ALCTM", sameEndian ) != 0 ) { 565 565 os << LogIO::WARN << "Error while reading data ALCTM." << LogIO::POST ; … … 571 571 // 572 572 int itmp ; 573 if ( readHeader( itmp, "INTEG" , sameEndian) != 0 ) {573 if ( readHeader( itmp, "INTEG" ) != 0 ) { 574 574 if ( readTable( itmp, "INTEG", sameEndian ) != 0 ) { 575 575 os << LogIO::WARN << "Error while reading data IPTIM." << LogIO::POST ; … … 581 581 //cout << "IPTIM = " << IPTIM << endl ; 582 582 // 583 if ( readHeader( PA, "PA" , sameEndian) != 0 ) {583 if ( readHeader( PA, "PA" ) != 0 ) { 584 584 if ( readTable( PA, "PA", sameEndian ) != 0 ) { 585 585 os << LogIO::WARN << "Error while reading data PA." << LogIO::POST ; … … 804 804 // nro_debug_output( "CWCAL", ARYNM, 10, CWCAL ) ; 805 805 // 806 if ( readHeader( SCNLEN, "NAXIS1" , sameEndian) != 0 ) {806 if ( readHeader( SCNLEN, "NAXIS1" ) != 0 ) { 807 807 os << LogIO::WARN << "Error while reading data SCNLEN." << LogIO::POST ; 808 808 return -1 ; … … 811 811 //cout << "SCNLEN = " << SCNLEN << endl ; 812 812 // 813 if ( readHeader( SBIND, "SBIND" , sameEndian) != 0 ) {813 if ( readHeader( SBIND, "SBIND" ) != 0 ) { 814 814 os << LogIO::NORMAL << "SBIND set to 0." << LogIO::POST ; 815 815 SBIND = 0 ; … … 818 818 //cout << "SBIND = " << SBIND << endl ; 819 819 // 820 if ( readHeader( IBIT, "IBIT" , sameEndian) != 0 ) {820 if ( readHeader( IBIT, "IBIT" ) != 0 ) { 821 821 os << LogIO::NORMAL << "IBIT set to 8." << LogIO::POST ; 822 822 IBIT = 8 ; // 8 bit? 12 bit? … … 1802 1802 } 1803 1803 1804 int NROFITSDataset::readHeader( int &v, char *name , int /*b*/)1804 int NROFITSDataset::readHeader( int &v, char *name ) 1805 1805 { 1806 1806 // … … 1838 1838 1839 1839 1840 int NROFITSDataset::readHeader( float &v, char *name , int /*b*/)1840 int NROFITSDataset::readHeader( float &v, char *name ) 1841 1841 { 1842 1842 // … … 1872 1872 } 1873 1873 1874 int NROFITSDataset::readHeader( double &v, char *name , int /*b*/)1874 int NROFITSDataset::readHeader( double &v, char *name ) 1875 1875 { 1876 1876 // -
trunk/external-alma/atnf/PKSIO/NROFITSDataset.h
r2783 r2784 83 83 virtual void initialize() ; 84 84 85 // // fill header from file86 // virtual int fillHeader() ;87 88 85 // fill data record 89 86 virtual int fillRecord( int i ) ; … … 110 107 111 108 // Read int data 112 int readHeader( int &v, char *name , int b) ;109 int readHeader( int &v, char *name) ; 113 110 int readTable( int &v, char *name, int b, int idx=0 ) ; 114 111 int readTable( vector<int> &v, char *name, int b, int idx=0 ) ; … … 116 113 117 114 // Read float data 118 int readHeader( float &v, char *name , int b) ;115 int readHeader( float &v, char *name) ; 119 116 int readTable( float &v, char *name, int b, int idx=0 ) ; 120 117 int readTable( vector<float> &v, char *name, int b, int idx=0 ) ; … … 122 119 123 120 // Read double data 124 int readHeader( double &v, char *name , int b) ;121 int readHeader( double &v, char *name) ; 125 122 int readTable( double &v, char *name, int b, int idx=0 ) ; 126 123 int readTable( vector<double> &v, char *name, int b, int idx=0 ) ;
Note:
See TracChangeset
for help on using the changeset viewer.