Changeset 1792 for branches/newfiller
- Timestamp:
- 07/30/10 17:49:03 (14 years ago)
- Location:
- branches/newfiller/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/newfiller/src/FillerWrapper.h
r1787 r1792 45 45 return; 46 46 } 47 //filler_ = new NROFiller(stable_);47 filler_ = new NROFiller(stable_); 48 48 // if (filler_->open(filename, rec)) { 49 49 if (filler_->open(filename)) { … … 51 51 return; 52 52 } 53 if ( filler_ ) 54 delete filler_ ; 53 55 filler_ = 0; 54 56 attached_ = false; -
branches/newfiller/src/Makefile
r1762 r1792 130 130 STAtmosphere.o \ 131 131 Scantable.o \ 132 FillerBase.o \ 133 NROFiller.o \ 132 134 Templates.o 133 135 PYOBJECTS := python_Scantable.o \ … … 144 146 python_STAtmosphere.o \ 145 147 python_STCoordinate.o \ 148 python_Filler.o \ 146 149 python_asap.o 147 150 -
branches/newfiller/src/NROFiller.cpp
r1791 r1792 18 18 // 19 19 20 #include "NROFill ber.h"20 #include "NROFiller.h" 21 21 #include "STHeader.h" 22 22 #include <atnf/PKSIO/SrcType.h> … … 48 48 49 49 // get header information 50 STHeader h eader();51 if ( reader_->getHeaderInfo( h eader.nchan,52 h eader.npol,53 h eader.nIF,54 h eader.nBeam,55 h eader.observer,56 h eader.project,57 h eader.obstype,58 h eader.antennaname,59 h eader.antennaposition,60 h eader.equinox,61 h eader.freqref,62 h eader.reffreq,63 h eader.bandwidth,64 h eader.utc,65 h eader.fluxunit,66 h eader.epoch,67 h eader.poltype ) ) {50 STHeader hdr ; 51 if ( reader_->getHeaderInfo( hdr.nchan, 52 hdr.npol, 53 hdr.nif, 54 hdr.nbeam, 55 hdr.observer, 56 hdr.project, 57 hdr.obstype, 58 hdr.antennaname, 59 hdr.antennaposition, 60 hdr.equinox, 61 hdr.freqref, 62 hdr.reffreq, 63 hdr.bandwidth, 64 hdr.utc, 65 hdr.fluxunit, 66 hdr.epoch, 67 hdr.poltype ) ) { 68 68 status = false ; 69 69 return status ; … … 71 71 72 72 // 2010/07/30 TBD: Do we need to set frame here? 73 getTable()->frequencies().setFrame( h eader->freqref, true ) ;73 getTable()->frequencies().setFrame( hdr.freqref, true ) ; 74 74 getTable()->frequencies().setFrame( String("LSRK"), false ) ; 75 75 76 76 // set Header 77 setHeader( h eader ) ;77 setHeader( hdr ) ; 78 78 79 79 return status ; … … 84 84 // for each row 85 85 uInt nRow = reader_->getRowNum() ; 86 uInt id ;87 86 vector< vector<double > > freqs ; 88 87 uInt scanno ; … … 119 118 Int rowCount = 0 ; 120 119 121 STHeader header = table_->getHeader() ;120 STHeader header = getTable()->getHeader() ; 122 121 String obsType = header.obstype.substr( 0, 3 ) ; 123 122 for ( Int irow = 0 ; irow < (Int)nRow ; irow++ ) { 124 123 // check scan intent 125 IntscanType = reader_->getScanType( irow ) ;124 String scanType = reader_->getScanType( irow ) ; 126 125 SrcType::type srcType = SrcType::NOTYPE ; 127 126 … … 146 145 147 146 // get scan ifnromation 148 if ( reader_->getScanInfo( i ,147 if ( reader_->getScanInfo( irow, 149 148 scanno, 150 149 cycleno, … … 178 177 srcdir, 179 178 scanrate ) ) { 179 throw AipsError( "Failed to read scan record" ) ; 180 180 return ; 181 181 } 182 183 // set IDs and subtable rows 184 // FREQUENCIES subtable row 185 setFrequency( (Double)fqs[0], (Double)fqs[1], (Double)fqs[2] ) ; 186 187 // MOLECULES subtable row 188 setMolecule( restfreq ) ; 189 190 // FOCUS subtable row 191 setFocus( parangle ) ; 192 193 // WEATHER subtable row 194 setWeather( temperature, pressure, humidity, windvel, winddir ) ; 195 196 // TCAL subtable row 197 // use default since NRO input is calibrated data 198 setTcal() ; 199 182 200 183 201 // set row attributes … … 189 207 190 208 // SCANNO, CYCLENO, IFNO, POLNO, and BEAMNO 209 uInt ifno = getTable()->frequencies().addEntry( (Double)fqs[0], (Double)fqs[1], (Double)fqs[2] ) ; 191 210 setIndex( scanno, cycleno, ifno, polno, beamno ) ; 192 211 … … 212 231 setOpacity( opacity ) ; 213 232 214 // FREQUENCIES subtable row215 setFrequency( (Double)fqs[0], (Double)fqs[1], (Double)fqs[2] ) ;216 217 // MOLECULES subtable row218 setMolecule( restfreq ) ;219 220 // FOCUS subtable row221 setFocus( parangle ) ;222 223 // WEATHER subtable row224 setWeather( temperature, pressure, humidity, windvel, windaz ) ;225 226 // TCAL subtable row227 // use default since NRO input is calibrated data228 setTcal() ;229 230 233 // finally, commit row 231 234 commitRow() ; -
branches/newfiller/src/NROFiller.h
r1791 r1792 27 27 #define ASAPNROFILLER_H 28 28 29 #include "FillerBase.h" 30 29 31 // STL 30 32 #include <string> … … 52 54 // pointer to the reader 53 55 NROReader *reader_ ; 54 } 56 }; 55 57 56 58 57 }; 59 } 60 #endif
Note:
See TracChangeset
for help on using the changeset viewer.