Changeset 475 for trunk


Ignore:
Timestamp:
02/18/05 11:53:17 (20 years ago)
Author:
kil064
Message:

move function convertInstrument into here from SDMemTable
fix error in apertureEfficiency function (missing break)

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SDAttr.cc

    r467 r475  
    165165            facs = interp (freqs/1.0e9f, TidEtaApX_, TidEtaApY_);
    166166        }
     167        break;
    167168      default:
    168169        {
     
    185186   Vector<Float> facs(freqs.nelements(),1.0);
    186187   for (uInt i=0; i<freqs.nelements(); i++) {
    187       facs(i) = SDAttr::findJyPerKFac (etaAp(i), D);
     188      facs(i) = SDAttr::findJyPerK (etaAp(i), D);
    188189   }
    189190//
     
    192193
    193194
    194 Float SDAttr::findJyPerKFac (Float etaAp, Float D)
     195Float SDAttr::findJyPerK (Float etaAp, Float D)
    195196//
    196197// Converts K -> Jy
     
    293294   TidGainElPoly_(2) = -3.219093e-4;
    294295}
     296
     297
     298Instrument SDAttr::convertInstrument(const String& instrument,
     299                                     Bool throwIt)
     300{
     301   String t(instrument);
     302   t.upcase();
     303
     304   // The strings are what SDReader returns, after cunning interrogation
     305   // of station names... :-(
     306   Instrument inst = asap::UNKNOWN;
     307   if (t==String("DSS-43")) {
     308      inst = TIDBINBILLA;
     309   } else if (t==String("ATPKSMB")) {
     310      inst = ATPKSMB;
     311   } else if (t==String("ATPKSHOH")) {
     312      inst = ATPKSHOH;
     313   } else if (t==String("ATMOPRA")) {
     314      inst = ATMOPRA;
     315   } else if (t==String("CEDUNA")) {
     316      inst = CEDUNA;
     317   } else if (t==String("HOBART")) {
     318      inst = HOBART;
     319   } else {
     320     if (throwIt) {
     321       throw AipsError("Unrecognized instrument - use function scan.set_instrument to set");
     322     }
     323   }
     324   return inst;
     325}
     326
     327
  • trunk/src/SDAttr.h

    r467 r475  
    7474                                     const casa::Vector<casa::Float>& freqs) const;
    7575
    76 // Factor to convert K -> Jy. Provide aperture efficiency and dish geometric diameter (m)
    77    static casa::Float findJyPerKFac (casa::Float etaAp, casa::Float D);
    78 
    7976// Gain Elevation polynomial correction coefficients (elevation in degrees)
    8077// Returns length 0 if not known.
    8178   casa::Vector<casa::Float> gainElevationPoly (Instrument instr) const;
     79
     80
     81// Helper function to check instrument (antenna) name and give enum
     82  static Instrument convertInstrument(const casa::String& instrument,
     83                                      casa::Bool throwIt);
     84
     85// Helper function.  Finds factor to convert K -> Jy. Provide aperture efficiency and dish geometric diameter (m)
     86   static casa::Float findJyPerK (casa::Float etaAp, casa::Float D);
    8287
    8388 private:
Note: See TracChangeset for help on using the changeset viewer.