Changeset 2154 for trunk/external-alma


Ignore:
Timestamp:
04/25/11 19:06:56 (14 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-2819

Ready for Test: Yes

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...

Bug fix on nif and nbeam.
For BEARS (MULT2), nif and nbeam is fixed as 1 and 25, respectively.
Otherwise, nif is number of arrays used and nbeam is 1.


Location:
trunk/external-alma/atnf/PKSIO
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/external-alma/atnf/PKSIO/ASTEReader.cc

    r1868 r2154  
    118118}
    119119
     120Int ASTEReader::getNumIF()
     121{
     122  vector<Bool> v ;
     123  vector<int> arry = dataset_->getARRY() ;
     124  for ( uInt i = 0 ; i < arry.size() ; i++ ) {
     125    if ( arry[i] != 0 ) {
     126      v.push_back( True ) ;
     127    }
     128  }
     129  Int nif = v.size() ;
     130  return nif ;
     131}
     132
     133Int ASTEReader::getNumBeam()
     134{
     135  // ASTE doesn't have array receiver so far
     136  return 1 ;
     137}
  • trunk/external-alma/atnf/PKSIO/ASTEReader.h

    r1757 r2154  
    8181  virtual int read() ;
    8282
     83  // get number of IF
     84  virtual Int getNumIF() ;
     85
     86  // get number of Beams
     87  virtual Int getNumBeam() ;
     88
    8389 protected:
    8490  // Get Antenna Position in ITRF coordinate
  • trunk/external-alma/atnf/PKSIO/NRO45Reader.cc

    r1868 r2154  
    124124}
    125125
     126Int NRO45Reader::getNumIF()
     127{
     128  Int nif = 1 ;
     129  if ( (dataset_->getRX()[0]).find("MULT2-") == string::npos ) {
     130    vector<Bool> v ;
     131    vector<int> arry = dataset_->getARRY() ;
     132    for ( uInt i = 0 ; i < arry.size() ; i++ ) {
     133      if ( arry[i] != 0 ) {
     134        v.push_back( True ) ;
     135      }
     136    }
     137    nif = v.size() ;
     138  }
     139  return nif ;
     140}
     141
     142Int NRO45Reader::getNumBeam()
     143{
     144  Int nbeam = 25 ;
     145  if ( (dataset_->getRX()[0]).find("MULT2-") == string::npos ) {
     146    nbeam = 1 ;
     147  }
     148  return nbeam ;
     149}
  • trunk/external-alma/atnf/PKSIO/NRO45Reader.h

    r1757 r2154  
    8383  virtual int read() ;
    8484
     85  // get number of IF
     86  virtual Int getNumIF() ;
     87
     88  // get number of Beams
     89  virtual Int getNumBeam() ;
     90
    8591 protected:
    8692  // Get Antenna Position in ITRF coordinate
  • trunk/external-alma/atnf/PKSIO/NROReader.cc

    r1868 r2154  
    457457  //freqref = vref ;
    458458  freqref = "LSRK" ;
     459  //freqref = "REST" ;
    459460  //cout << "freqref = " << freqref << endl ;
    460461  NRODataRecord *record = dataset_->getRecord( 0 ) ;
     
    483484  //cout << "poltype = " << poltype << endl ;
    484485
    485   vector<Bool> ifs = getIFs() ;
    486   nif = ifs.size() ;
     486  //vector<Bool> ifs = getIFs() ;
     487  //nif = ifs.size() ;
     488  nif = getNumIF() ;
    487489  //cout << "nif = " << nif << endl ;
    488490
    489   vector<Bool> beams = getBeams() ;
    490   nbeam = beams.size() ;
     491  //vector<Bool> beams = getBeams() ;
     492  //nbeam = beams.size() ;
     493  nbeam = getNumBeam() ;
    491494  //cout << "nbeam = " << nbeam << endl ;
    492495
  • trunk/external-alma/atnf/PKSIO/NROReader.h

    r1757 r2154  
    171171  virtual vector<Bool> getIFs() ;
    172172
     173  // Get Number of IFs
     174  virtual Int getNumIF() = 0 ;
     175
    173176  // Get Beam settings
    174177  virtual vector<Bool> getBeams() ;
     178
     179  // Get Number of Beams
     180  virtual Int getNumBeam() = 0 ;
    175181
    176182 protected:
Note: See TracChangeset for help on using the changeset viewer.