Changeset 2289 for trunk/external-alma/atnf/PKSIO/NROReader.cc
- Timestamp:
- 09/08/11 19:35:40 (13 years ago)
- Location:
- trunk/external-alma
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/external-alma
- Property svn:mergeinfo changed
/branches/parallel/external-alma (added) merged: 2240,2247,2262-2264,2266
- Property svn:mergeinfo changed
-
trunk/external-alma/atnf/PKSIO/NROReader.cc
r2261 r2289 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 ) 553 { 552 Vector<Double> &scanrate ) 553 { 554 static const IPosition oneByOne( 1, 1 ); 555 554 556 // DEBUG 555 557 //cout << "NROReader::getScanInfo() irow = " << irow << endl ; … … 589 591 590 592 // restfreq (for MOLECULE_ID) 591 Vector<Double> rf( IPosition( 1, 1 ) ) ; 592 rf( 0 ) = record->FREQ0 ; 593 restfreq = rf ; 593 restfreq.resize( oneByOne ) ; 594 restfreq[0] = record->FREQ0 ; 594 595 //cout << "restfreq = " << rf << endl ; 595 596 … … 617 618 // spectra 618 619 vector<double> spec = dataset_->getSpectrum( irow ) ; 619 Array<Float> sp( IPosition( 1, 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 flagtra.resize( spectra.nelements() ) ; 629 flagtra.set( 0 ) ; 631 630 //cout << "flag.size() = " << flag.size() << endl ; 632 631 633 632 // tsys 634 Array<Float> tmp( IPosition( 1, 1 ), record->TSYS) ;635 tsys = tmp;633 tsys.resize( oneByOne ) ; 634 tsys[0] = record->TSYS ; 636 635 //cout << "tsys[0] = " << tsys[0] << endl ; 637 636 … … 693 692 694 693 // propermotion 695 Array<Double> srcarr( IPosition( 1, 2 ) ) ; 696 srcarr = 0.0 ; 697 propermotion = srcarr ; 698 //cout << "propermotion = [" << propermotion[0] << ", " << propermotion[1] << "]" << endl ; 694 // do nothing 699 695 700 696 // srcdir … … 703 699 704 700 // scanrate 705 Array<Double> sr( IPosition( 1, 1 ) ) ; 706 sr = 0.0 ; 707 scanrate = sr ; 708 //cout << "scanrate = " << scanrate[0] << endl ; 701 // do nothing 709 702 710 703 return 0 ;
Note: See TracChangeset
for help on using the changeset viewer.