Ignore:
Timestamp:
09/16/11 14:09:32 (13 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-1913

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: test_importasdm_sd

Put in Release Notes: Yes/No?

Module(s): Module Names change impacts.

Description: Describe your changes here...

Merged refactoring the code in trunk (r2301).


Location:
branches/casa-prerelease/pre-asap
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/casa-prerelease/pre-asap

    • Property svn:mergeinfo changed
      /trunk (added)merged: 2301
  • branches/casa-prerelease/pre-asap/external-alma

  • branches/casa-prerelease/pre-asap/external-alma/asdm2ASAP/ASDMReader.h

    r2254 r2302  
    143143   * @return scan number
    144144   **/
    145   unsigned int getScanNo() { return (unsigned int)(mainRow_[row_]->getScanNumber()) ; } ;
     145  unsigned int getScanNoOfCurrentRow() { return (unsigned int)(mainRow_[row_]->getScanNumber()) ; } ;
    146146
    147147  /**
     
    150150   * @return subscan number
    151151   **/
    152   unsigned int getSubscanNo() { return (unsigned int)(mainRow_[row_]->getSubscanNumber()) ; } ;
     152  unsigned int getSubscanNoOfCurrentRow() { return (unsigned int)(mainRow_[row_]->getSubscanNumber()) ; } ;
     153
     154  /**
     155   * set data index
     156   *
     157   * @param idx for vmsData_
     158   **/
     159  void prepareData( unsigned int idx ) ;
    153160
    154161  /**
     
    159166   **/
    160167  unsigned int getSubscanNo( unsigned int idx ) ;
     168  unsigned int getSubscanNo() ;
    161169
    162170  /**
     
    167175   **/
    168176  casa::uInt getIFNo( unsigned int idx ) ;
     177  casa::uInt getIFNo() ;
    169178
    170179  /**
     
    175184   **/
    176185  int getNumPol( unsigned int idx ) ;
     186  int getNumPol() ;
    177187
    178188  /**
     
    190200                     double &incr,
    191201                     std::string &freqref ) ;
    192 
    193   /**
    194    * get rest frequencies for given index
    195    *
    196    * @param idx for vmsData_
    197    * @return rest frequencies
    198    **/
    199   vector<double> getRestFrequency( unsigned int idx ) ;
     202  void getFrequency( double &refpix,
     203                     double &refval,
     204                     double &incr,
     205                     std::string &freqref ) ;
    200206
    201207  /**
     
    206212   **/
    207213  double getTime( unsigned int idx ) ;
     214  double getTime() ;
    208215
    209216  /**
     
    214221   **/
    215222  double getInterval( unsigned int idx ) ;
    216 
    217   /**
    218    * get source name for given index
    219    *
    220    * @param idx for vmsData_
    221    * @return source name
    222    **/
    223   string getSourceName( unsigned int idx ) ;
    224 
    225   /**
    226    * get field name for given index
    227    * field name = fieldName + "__" + fieldId
    228    *
    229    * @param idx for vmsData_
    230    * @return field name
    231    **/
    232   string getFieldName( unsigned int idx ) ;
    233 
    234   /**
    235    * get source direction for given index
    236    *
    237    * @param idx for vmsData_
    238    * @return source direction as vector<double>
    239    **/
    240   std::vector<double> getSourceDirection( unsigned int idx ) ;
    241   void getSourceDirection( unsigned int idx,
    242                            std::vector<double> &dir,
    243                            std::string &ref  ) ;
     223  double getInterval() ;
    244224
    245225  /**
     
    253233 
    254234  /**
    255    * get source proper motion for given index
    256    *
    257    * @param idx for vmsData_
    258    * @return source proper motion as vector<double>
    259    **/
    260   std::vector<double> getSourceProperMotion( unsigned int idx ) ;
    261 
    262   /**
    263    * get systemic velocity of the source for given index
    264    * at the moment return 0-th element of sysVel vector
    265    *
    266    * @param idx for vmsData_
    267    * @return systemic velocity of the source
    268    **/
    269   double getSysVel( unsigned int idx ) ;
    270 
    271   /**
    272235   * get row-based flag for given index
    273236   *
     
    276239   **/
    277240  unsigned int getFlagRow( unsigned int idx ) ;
     241  unsigned int getFlagRow() ;
    278242
    279243  /**
     
    284248   **/
    285249  std::vector<unsigned int> getDataShape( unsigned int idx ) ;
     250  std::vector<unsigned int> getDataShape() ;
    286251
    287252  /**
     
    292257   **/
    293258  float *getSpectrum( unsigned int idx ) ;
    294 
    295   /**
    296    * get channel flag data for given index
    297    *
    298    * @param idx for vmsData_
    299    * @return channel flag
    300    **/
    301   //bool *getFlagChannel( unsigned int idx ) ;
     259  float *getSpectrum() ;
     260
     261  /**
     262   * get Tsys for given index
     263   *
     264   * @param idx for vmsData_
     265   * @return Tsys
     266   **/
     267  std::vector< std::vector<float> > getTsys( unsigned int idx ) ;
     268  std::vector< std::vector<float> > getTsys() ;
    302269 
    303270  /**
    304    * get Tsys for given index
    305    *
    306    * @param idx for vmsData_
    307    * @return Tsys
    308    **/
    309   std::vector< std::vector<float> > getTsys( unsigned int idx ) ;
    310  
    311   /**
    312271   * get Tcal for given index
    313272   *
     
    316275   **/
    317276  std::vector< std::vector<float> > getTcal( unsigned int idx ) ;
     277  std::vector< std::vector<float> > getTcal() ;
    318278
    319279  /**
     
    327287                       std::vector< std::vector<float> > &tcal,
    328288                       std::vector< std::vector<float> > &tsys ) ;
     289  void getTcalAndTsys( std::vector< std::vector<float> > &tcal,
     290                       std::vector< std::vector<float> > &tsys ) ;
    329291 
    330292  /**
     
    335297   **/
    336298  std::vector<float> getOpacity( unsigned int idx ) ;
     299  std::vector<float> getOpacity() ;
    337300 
    338301  /**
     
    352315                       float &windspeed,
    353316                       float &windaz ) ;
     317  void getWeatherInfo( float &temperature,
     318                       float &pressure,
     319                       float &humidity,
     320                       float &windspeed,
     321                       float &windaz ) ;
    354322
    355323  /**
     
    367335                        double &el,
    368336                        std::vector<double> &srate ) ;
     337  void getPointingInfo( std::vector<double> &dir,
     338                        double &az,
     339                        double &el,
     340                        std::vector<double> &srate ) ;
    369341
    370342  /**
     
    379351
    380352  /**
    381    * get list of dataDescId for given configDescId
    382    *
    383    * @param configDescId
    384    * @return list of dataDescId
    385    **/
    386 //   casa::Vector<casa::uInt> getDataDescIdList( casa::uInt cdid ) ;
    387 
    388   /**
    389    * get list of switchCycleId for given configDescId
    390    *
    391    * @param configDescId
    392    * @return list of dataDescId
    393    **/
    394 //   casa::Vector<casa::uInt> getSwitchCycleIdList( casa::uInt cdid ) ;
    395 
    396   /**
    397    * get list of feedId for given configDescId
    398    *
    399    * only return list of feedId that corresponds to specified antenna.
    400    *
    401    * @param configDescId
    402    * @return list of valid feedId
    403    **/
    404 //   casa::Vector<casa::uInt> getFeedIdList( casa::uInt cdid ) ;
     353   * get source properties
     354   *
     355   * @param idx for vmsData_
     356   * @param srcname source name
     357   * @param fieldname field name
     358   * @param srcdir source direction
     359   * @param srcpm source proper motion
     360   * @param sysvel systemic velocity of the source
     361   * @param restfreq rest frequency
     362   **/
     363  void getSourceProperty( unsigned int idx,
     364                          std::string &srcname,
     365                          std::string &fieldname,
     366                          std::vector<double> &srcdir,
     367                          std::vector<double> &srcpm,
     368                          double &sysvel,
     369                          std::vector<double> &restfreq ) ;
     370  void getSourceProperty( std::string &srcname,
     371                          std::string &fieldname,
     372                          std::vector<double> &srcdir,
     373                          std::vector<double> &srcpm,
     374                          double &sysvel,
     375                          std::vector<double> &restfreq ) ;
    405376
    406377  /**
     
    516487   **/
    517488  void toJ2000( std::vector<double> &dir,
    518                 double az,
    519                 double el,
    520                 double mjd,
    521                 casa::Vector<casa::Double> antpos ) ;
     489                double &az,
     490                double &el,
     491                double &mjd,
     492                casa::Vector<casa::Quantity> &antpos ) ;
    522493
    523494  /**
     
    530501  * @return new direction
    531502  **/
    532   std::vector<double> toJ2000( std::vector<double> dir,
    533                                casa::String dirref,
    534                                double mjd,
    535                                casa::Vector<casa::Double> antpos ) ;
     503  std::vector<double> toJ2000( std::vector<double> &dir,
     504                               casa::String &dirref,
     505                               double &mjd,
     506                               casa::Vector<casa::Quantity> &antpos ) ;
    536507  /**
    537508   * get nIF
     
    548519   **/
    549520  asdm::SysCalRow *getSysCalRow( unsigned int idx ) ;
     521  asdm::SysCalRow *getSysCalRow() ;
    550522
    551523  /**
     
    595567   * vector< unsigned int > v_flag
    596568   **/
    597   const sdmbin::VMSData *vmsData_ ;
     569  const sdmbin::VMSData *vmsData_ ;
     570 
    598571  casa::Int antennaId_ ; // antenna id
    599572  casa::String antennaName_ ; // antenna name
    600   casa::Vector<asdm::MainRow *> mainRow_ ; // list of pointers to all Main rows
     573  casa::String stationName_ ; // station name
     574  casa::Vector<casa::Quantity> antennaPosition_ ; // antenna position
    601575  casa::Vector<casa::uInt> configDescIdList_ ; // list of valid configDescriptionId
    602576  casa::Vector<casa::uInt> feedIdList_ ; // list of valid feedId
     
    615589  casa::CountedPtr<casa::LogSinkInterface> logsink_ ; // Logger
    616590  casa::String className_ ;
     591  unsigned int dataIndex_ ;
     592
     593  // Tables/Rows for ASDM
     594  casa::Vector<asdm::MainRow *> mainRow_ ; // list of pointers to all Main rows
     595  //asdm::AntennaRow *antennaRow_p ; // pointer to target Antenna row
     596  //asdm::StationRow *stationRow_p ; // pointer to target Station row that target antenna is located
     597  asdm::SpectralWindowRow *specWinRow_p ; // pointer to SpectralWindow row
     598  asdm::PolarizationRow *polarizationRow_p ; // pointer to Polarization row
     599  asdm::FieldRow *fieldRow_p ; // pointer to Field row
     600
     601  // Tags
     602  asdm::Tag antennaTag_ ;
     603  asdm::Tag specWinTag_ ;
     604  asdm::Tag execBlockTag_ ;
     605
     606  // time
     607  asdm::ArrayTimeInterval timeInterval_ ;
    617608} ;
    618609#endif // ASAP_ASDM_READER_H
Note: See TracChangeset for help on using the changeset viewer.