Changeset 3101 for trunk/external-alma/atnf/PKSIO
- Timestamp:
- 06/27/16 18:22:47 (8 years ago)
- Location:
- trunk/external-alma/atnf/PKSIO
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/external-alma/atnf/PKSIO/NRODataset.cc
r3095 r3101 1404 1404 vector<double> chcal = getCHCAL()[ib] ; 1405 1405 double f0cal = getF0CAL()[ib] ; 1406 //cout << "FREQ0=" << fq0 << " F0CAL=" << f0cal << endl; 1406 1407 Vector<Double> freqs( ncal, fq0-f0cal ) ; 1407 1408 … … 1409 1410 if ( ivdef == 0 ) 1410 1411 factor = 1.0 / ( 1.0 - factor ) ; 1412 1411 1413 for ( int ii = 0 ; ii < ncal ; ii++ ) { 1414 //double freqs_org = freqs[ii]; 1412 1415 freqs[ii] += fqcal[ii] ; 1413 if ( ivdef == 0 ) { 1414 freqs[ii] = freqs[ii] * factor + record->FQTRK * ( 1.0 - factor ) ; 1415 } 1416 else if ( ivdef == 1 ) { 1417 freqs[ii] = freqs[ii] * ( 1.0 + factor ) - record->FQTRK * factor ; 1416 if (isNewstarFormat()) { 1417 if ( ivdef == 0 ) { 1418 freqs[ii] = freqs[ii] * factor + record->FQTRK * ( 1.0 - factor ) ; 1419 } 1420 else if ( ivdef == 1 ) { 1421 freqs[ii] = freqs[ii] * ( 1.0 + factor ) - record->FQTRK * factor ; 1422 } 1418 1423 } 1419 1424 … … 1422 1427 //ofs << i << " " << record->ARRYT << " " << chcal[ii] << " " << freqs[ii] << " " << record->ISCAN << " " << fqcal[ii] << " " << f0cal << " " << record->FQTRK << " " << vel << endl ; 1423 1428 //ofs.close() ; 1429 // cout << setprecision(16) ; 1430 // cout << "LOOP " << ii << " ARRAY ID=" << record->ARRYT << " CHCAL=" << chcal[ii] << " FREQS(ORG)=" << freqs_org << " FREQS=" << freqs[ii] << " ISCAN=" << record->ISCAN << " FQCAL=" << fqcal[ii] << " F0CAL=" << f0cal << " FQTRK=" << record->FQTRK << " VEL=" << vel << endl ; 1424 1431 1425 1432 } … … 1447 1454 } 1448 1455 else { 1449 1450 cw = ( freqs[1] - freqs[0] ) 1451 / ( chcal[1] - chcal[0] ) ; 1456 double nchcal = static_cast<double>(chcal[1] - chcal[0]); 1457 //cout << "nchcal = " << nchcal << endl; 1458 double bw = freqs[1] - freqs[0]; 1459 //cout << "bw = " << bw << " (effective bw " << bw * (nchcal + 1.0) / nchcal << ")"<< endl; 1460 cw = bw / nchcal; 1461 //cout << "cw = " << cw << endl; 1452 1462 1453 1463 if ( isUSB ) { … … 1471 1481 frec_.define( key, f ) ; 1472 1482 1483 //cout << "refpix " << v[0] << " refval " << v[1] << " increment " << v[2] << endl; 1473 1484 return v ; 1474 1485 } -
trunk/external-alma/atnf/PKSIO/NRODataset.h
r3066 r3101 90 90 // Data initialization 91 91 virtual void initialize() = 0 ; 92 93 // whether data is NEWSTAR or not 94 virtual bool isNewstarFormat() const {return true;} 92 95 93 96 // open file -
trunk/external-alma/atnf/PKSIO/NROOTFDataset.h
r2782 r3101 77 77 virtual void initialize() ; 78 78 79 // this is NOSTAR data 80 virtual bool isNewstarFormat() const {return false;} 81 79 82 protected: 80 83 // fill header information
Note:
See TracChangeset
for help on using the changeset viewer.