Changeset 2263 for branches/parallel/external-alma/atnf/PKSIO
- Timestamp:
- 08/04/11 15:42:43 (13 years ago)
- Location:
- branches/parallel/external-alma/atnf/PKSIO
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/parallel/external-alma/atnf/PKSIO/NROReader.cc
r2262 r2263 531 531 String &srcname, 532 532 String &fieldname, 533 Array<Float> &spectra,534 Array<uChar> &flagtra,535 Array<Float> &tsys,536 Array<Double> &direction,533 Vector<Float> &spectra, 534 Vector<uChar> &flagtra, 535 Vector<Float> &tsys, 536 Vector<Double> &direction, 537 537 Float &azimuth, 538 538 Float &elevation, … … 548 548 Float &winddir, 549 549 Double &srcvel, 550 Array<Double> &propermotion,550 Vector<Double> &propermotion, 551 551 Vector<Double> &srcdir, 552 Array<Double> &scanrate )552 Vector<Double> &scanrate ) 553 553 { 554 554 // DEBUG … … 589 589 590 590 // restfreq (for MOLECULE_ID) 591 Vector<Double> rf( IPosition( 1, 1 ) ) ;592 rf( 0 ) = record->FREQ0;593 restfreq = rf;591 if ( restfreq.size() != 1 ) 592 restfreq.resize( 1 ) ; 593 restfreq[0] = record->FREQ0 ; 594 594 //cout << "restfreq = " << rf << endl ; 595 595 … … 617 617 // spectra 618 618 vector<double> spec = dataset_->getSpectrum( irow ) ; 619 Array<Float> sp( IPosition( 1, spec.size() ) ) ; 619 if ( spectra.size() != spec.size() ) 620 spectra.resize( spec.size() ) ; 620 621 int index = 0 ; 621 for ( Array<Float>::iterator itr = sp.begin() ; itr != sp.end() ; itr++ ) {622 for ( Vector<Float>::iterator itr = spectra.begin() ; itr != spectra.end() ; itr++ ) { 622 623 *itr = spec[index++] ; 623 624 } 624 spectra = sp ;625 625 //cout << "spec.size() = " << spec.size() << endl ; 626 626 627 627 // flagtra 628 Array<uChar> flag( spectra.shape() ) ;629 flag.set( 0) ;630 flagtra = flag;628 if ( flagtra.size() != spectra.size() ) 629 flagtra.resize( spectra.nelements() ) ; 630 flagtra.set( 0 ) ; 631 631 //cout << "flag.size() = " << flag.size() << endl ; 632 632 633 633 // tsys 634 Array<Float> tmp( IPosition( 1, 1 ), record->TSYS ) ; 635 tsys = tmp ; 634 if ( tsys.size() != 1 ) 635 tsys.resize( 1 ) ; 636 tsys[0] = record->TSYS ; 636 637 //cout << "tsys[0] = " << tsys[0] << endl ; 637 638 … … 693 694 694 695 // propermotion 695 Array<Double> srcarr( IPosition( 1, 2 ) ) ; 696 srcarr = 0.0 ; 697 propermotion = srcarr ; 698 //cout << "propermotion = [" << propermotion[0] << ", " << propermotion[1] << "]" << endl ; 696 // do nothing 699 697 700 698 // srcdir … … 703 701 704 702 // scanrate 705 Array<Double> sr( IPosition( 1, 1 ) ) ; 706 sr = 0.0 ; 707 scanrate = sr ; 708 //cout << "scanrate = " << scanrate[0] << endl ; 703 // do nothing 709 704 710 705 return 0 ; -
branches/parallel/external-alma/atnf/PKSIO/NROReader.h
r2262 r2263 139 139 String &srcname, 140 140 String &fieldname, 141 Array<Float> &spectra,142 Array<uChar> &flagtra,143 Array<Float> &tsys,144 Array<Double> &direction,141 Vector<Float> &spectra, 142 Vector<uChar> &flagtra, 143 Vector<Float> &tsys, 144 Vector<Double> &direction, 145 145 Float &azimuth, 146 146 Float &elevation, … … 156 156 Float &winddir, 157 157 Double &srcvel, 158 Array<Double> &propermotion,158 Vector<Double> &propermotion, 159 159 Vector<Double> &srcdir, 160 Array<Double> &scanrate ) ;160 Vector<Double> &scanrate ) ; 161 161 162 162 // Get scan type
Note:
See TracChangeset
for help on using the changeset viewer.