Changeset 1674


Ignore:
Timestamp:
01/13/10 17:20:31 (15 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-1799

Ready to Release: Yes

Interface Changes: Yes

What Interface Changed: srcType is added to PKSrecord class

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): casa/atnf

Description: Describe your changes here...

Calibration scheme is updated to use SRCTYPE as an identifier of scan intent
(ON, OFF, ...). Currently, updated calibration scheme is implemented only for
ALMA data. Calibration of other data is still use SRCNAME as the identifier.

casa/atnf must be updated.


Location:
branches/alma/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/alma/src/STFiller.cpp

    r1671 r1674  
    311311#endif
    312312  PKSrecord pksrec;
     313  pksrec.srcType=-1;
    313314  int n = 0;
    314315  bool isGBTFITS = false ;
     
    376377    //*srcnCol = pksrec.srcName;//.before(rx2);
    377378    *srctCol = match;
     379    if ( pksrec.srcType != -1 ) {
     380      *srctCol = pksrec.srcType ;
     381    }
    378382    RecordFieldPtr<uInt> beamCol(rec, "BEAMNO");
    379383    *beamCol = pksrec.beamNo-beamOffset_-1;
  • branches/alma/src/STMath.cpp

    r1673 r1674  
    34123412  }
    34133413  else {
    3414     string onstr = "*_" ;
    3415     string offstr = "*_" ;
    3416    
    3417     if ( calmode == "ps" || calmode == "otf" ) {
    3418       onstr += "pson" ;
    3419       offstr += "psoff" ;
    3420     }
    3421     else if ( calmode == "wob" ) {
    3422       onstr += "wobon" ;
    3423       offstr += "woboff" ;
    3424     }
    3425    
    34263414    vector<bool> masks = s->getMask( 0 ) ;
    34273415   
    34283416    // off scan
    34293417    STSelector sel = STSelector() ;
    3430     sel.setName( offstr ) ;
     3418    string taql = "SELECT FROM $1 WHERE SRCTYPE == 0" ;
     3419    sel.setTaQL( taql ) ;
    34313420    s->setSelection( sel ) ;
    34323421    // TODO 2010/01/08 TN
     
    34753464    CountedPtr<Scantable> out = getScantable( s, true ) ;
    34763465    insitu_ = insitu ;
    3477     sel.setName( onstr ) ;
     3466    taql = "SELECT FROM $1 WHERE SRCTYPE == 1" ;
     3467    sel.setTaQL( taql ) ;
    34783468    s->setSelection( sel ) ;
    34793469    TableCopy::copyRows( out->table(), s->table() ) ;
     
    34883478      out->setSpectrum( sp, i ) ;
    34893479    }
    3490 
    3491     // remove additional string from SRCNAME
    3492     ScalarColumn<String> srcnameCol ;
    3493     srcnameCol.attach( out->table(), "SRCNAME" ) ;
    3494     Vector<String> srcnames( srcnameCol.getColumn() ) ;
    3495     for ( uInt i = 0 ; i < srcnames.nelements() ; i++ ) {
    3496       srcnames[i] = srcnames[i].substr( 0, srcnames[i].find( onstr.substr(1,onstr.size()-1) ) ) ;
    3497     }
    3498     srcnameCol.putColumn( srcnames ) ;
    34993480
    35003481    // flux unit
Note: See TracChangeset for help on using the changeset viewer.