Changeset 2005 for trunk/src


Ignore:
Timestamp:
02/23/11 19:19:36 (14 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: Yes (CAS-2817/ASAP-232)

Ready for Test: Yes

Interface Changes: Yes

What Interface Changed: added a new function SrcType::getName(int)

Test Programs: sdlist (CASA) or scantable.summary()

Put in Release Notes: No

Module(s): scantable, sdlist, sdplot

Description:

Added a new function SrcType::getName(int srctype) which returns
a source type in string.
The source type of each scan is retuned by Scantable::summary.


Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STWriter.cpp

    r2004 r2005  
    387387String STWriter::getObsTypes( Int srctype )
    388388{
    389   String obsType ;
    390   switch( srctype ) {
    391   case Int(SrcType::PSON):
    392     obsType = "PSON" ;
    393     break ;
    394   case Int(SrcType::PSOFF):
    395     obsType = "PSOFF" ;
    396     break ;
    397   case Int(SrcType::NOD):
    398     obsType = "NOD" ;
    399     break ;
    400   case Int(SrcType::FSON):
    401     obsType = "FSON" ;
    402     break ;
    403   case Int(SrcType::FSOFF):
    404     obsType = "FSOFF" ;
    405     break ;
    406   case Int(SrcType::SKY):
    407     obsType = "SKY" ;
    408     break ;
    409   case Int(SrcType::HOT):
    410     obsType = "HOT" ;
    411     break ;
    412   case Int(SrcType::WARM):
    413     obsType = "WARM" ;
    414     break ;
    415   case Int(SrcType::COLD):
    416     obsType = "COLD" ;
    417     break ;
    418   case Int(SrcType::PONCAL):
    419     obsType = "PSON:CALON" ;
    420     break ;
    421   case Int(SrcType::POFFCAL):
    422     obsType = "PSOFF:CALON" ;
    423     break ;
    424   case Int(SrcType::NODCAL):
    425     obsType = "NOD:CALON" ;
    426     break ;
    427   case Int(SrcType::FONCAL):
    428     obsType = "FSON:CALON" ;
    429     break ;
    430   case Int(SrcType::FOFFCAL):
    431     obsType = "FSOFF:CALOFF" ;
    432     break ;
    433   case Int(SrcType::FSLO):
    434     obsType = "FSLO" ;
    435     break ;
    436   case Int(SrcType::FLOOFF):
    437     obsType = "FS:LOWER:OFF" ;
    438     break ;
    439   case Int(SrcType::FLOSKY):
    440     obsType = "FS:LOWER:SKY" ;
    441     break ;
    442   case Int(SrcType::FLOHOT):
    443     obsType = "FS:LOWER:HOT" ;
    444     break ;
    445   case Int(SrcType::FLOWARM):
    446     obsType = "FS:LOWER:WARM" ;
    447     break ;
    448   case Int(SrcType::FLOCOLD):
    449     obsType = "FS:LOWER:COLD" ;
    450     break ;
    451   case Int(SrcType::FSHI):
    452     obsType = "FSHI" ;
    453     break ;
    454   case Int(SrcType::FHIOFF):
    455     obsType = "FS:HIGHER:OFF" ;
    456     break ;
    457   case Int(SrcType::FHISKY):
    458     obsType = "FS:HIGHER:SKY" ;
    459     break ;
    460   case Int(SrcType::FHIHOT):
    461     obsType = "FS:HIGHER:HOT" ;
    462     break ;
    463   case Int(SrcType::FHIWARM):
    464     obsType = "FS:HIGHER:WARM" ;
    465     break ;
    466   case Int(SrcType::FHICOLD):
    467     obsType = "FS:HIGHER:COLD" ;
    468     break ;
    469   default:
    470     obsType = "NOTYPE" ;
    471   }
    472 
    473   return obsType ;
    474 }
    475 
    476 }
     389  return SrcType::getName(srctype) ;
     390}
     391
     392}
  • trunk/src/Scantable.cpp

    r1994 r2005  
    6161#include <coordinates/Coordinates/CoordinateUtil.h>
    6262
     63#include <atnf/PKSIO/SrcType.h>
    6364#include "Scantable.h"
    6465#include "STPolLinear.h"
     
    994995                  + ")";
    995996  oss << setw(5) << "Scan" << setw(15) << "Source"
    996       << setw(10) << "Time" << setw(18) << "Integration" << endl;
     997      << setw(10) << "Time" << setw(18) << "Integration"
     998      << setw(15) << "Source Type" << endl;
    997999  oss << setw(5) << "" << setw(5) << "Beam" << setw(3) << "" << dirtype << endl;
    9981000  oss << setw(10) << "" << setw(3) << "IF" << setw(3) << ""
     
    10201022    }
    10211023    oss << setw(3) << std::right << nint  << setw(3) << " x " << std::left
    1022         << setw(6) <<  formatSec(rec.asFloat("INTERVAL")) << endl;
     1024        << setw(11) <<  formatSec(rec.asFloat("INTERVAL")) << setw(1) << ""
     1025        << setw(15) << SrcType::getName(rec.asInt("SRCTYPE")) << endl;
    10231026
    10241027    TableIterator biter(subt, "BEAMNO");
  • trunk/src/Scantable.h

    r1994 r2005  
    501501
    502502  /**
    503    * Turns a time vale into a formatted string
     503   * Turns a time value into a formatted string
    504504   * @param x
    505505   * @return
Note: See TracChangeset for help on using the changeset viewer.