Ignore:
Timestamp:
08/04/11 15:42:43 (13 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready for Test: No

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No?

Module(s): Module Names change impacts.

Description: Describe your changes here...

Tuning NROFiller.
Filler is about 6 times faster than before (~660sec->~110sec).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/parallel/src/NROFiller.cpp

    r2262 r2263  
    100100  String srcname ;
    101101  String fieldname ;
    102   Array<Float> spectra ;
    103   Array<uChar> flagtra ;
    104   Array<Float> tsys ;
    105   Array<Double> direction ;
     102  Vector<Float> spectra ;
     103  Vector<uChar> flagtra ;
     104  Vector<Float> tsys ;
     105  Vector<Double> direction ;
    106106  Float azimuth ;
    107107  Float elevation ;
    108   Float parangle ;
     108  Float parangle = 0.0 ;
    109109  Float opacity ;
    110110  uInt tcalid ;
     
    117117  Float winddir ;
    118118  Double srcvel ;
    119   Array<Double> propermotion ;
     119  Vector<Double> propermotion( 2, 0.0 ) ;
    120120  Vector<Double> srcdir ;
    121   Array<Double> scanrate ;
     121  Vector<Double> scanrate( 2, 0.0 ) ;
    122122  Int rowCount = 0 ;
    123123
     
    126126  Vector<Float> defaultTcal( 1, 1.0 ) ;
    127127  String tcalTime = MVTime( header.utc ).string( MVTime::YMD ) ;
     128
     129  // TCAL subtable rows
     130  setTcal( tcalTime, defaultTcal ) ;
     131
     132  // FOCUS subtable rows
     133  setFocus( parangle ) ;
     134
    128135  for ( Int irow = 0 ; irow < (Int)nRow ; irow++ ) {
    129136    // check scan intent
     
    195202    setMolecule( restfreq ) ;
    196203
    197     // FOCUS subtable row
    198     setFocus( parangle ) ;
    199 
    200204    // WEATHER subtable row
    201     setWeather( temperature, pressure, humidity, windvel, winddir ) ;
    202 
    203     // TCAL subtable row
    204     // use default since NRO input is calibrated data
    205     setTcal( tcalTime, defaultTcal ) ;
    206    
     205    setWeather2( temperature, pressure, humidity, windvel, winddir ) ;
    207206
    208207    // set row attributes
    209208    // SPECTRA, FLAGTRA, and TSYS
    210     Vector<Float> spectrum( spectra );
    211     Vector<uChar> flags( flagtra ) ;
    212     Vector<Float> Tsys( tsys ) ;
    213     setSpectrum( spectrum, flags, Tsys ) ;
     209    setSpectrum( spectra, flagtra, tsys ) ;
    214210
    215211    // SCANNO, CYCLENO, IFNO, POLNO, and BEAMNO
    216     //uInt ifno = table_->frequencies().addEntry( (Double)fqs[0], (Double)fqs[1], (Double)fqs[2] ) ;
    217212    setIndex( scanno, cycleno, ifno, polno, beamno ) ;
    218213
     
    221216
    222217    // DIRECTION
    223     Vector<Double> dir( direction ) ;
    224     setDirection(dir, azimuth, elevation ) ;
     218    setDirection( direction, azimuth, elevation ) ;
    225219
    226220    // TIME and INTERVAL
     
    228222
    229223    // SRCNAME, SRCTYPE, FIELDNAME, SRCDIRECTION, SRCPROPERMOTION, and SRCVELOCITY
    230     Vector<Double> propermot( propermotion ) ;
    231     setSource( srcname, srcType, fieldname, srcdir, propermot, srcvel ) ;
     224    setSource( srcname, srcType, fieldname, srcdir, propermotion, srcvel ) ;
    232225
    233226    // SCANRATE
    234     Vector<Double> srate( scanrate ) ;
    235     setScanRate( srate ) ;
     227    setScanRate( scanrate ) ;
    236228
    237229    // OPACITY
Note: See TracChangeset for help on using the changeset viewer.