casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
casa::FluxCalc_SS_JPL_Butler Class Reference

declare a template. More...

#include <FluxCalc_SS_JPL_Butler.h>

Public Member Functions

 FluxCalc_SS_JPL_Butler ()
 Default constructor; provided mainly so an array of these can be made more easily. More...
 
 FluxCalc_SS_JPL_Butler (const casacore::String &objname, const casacore::MEpoch &time)
 The more useful constructor. More...
 
 ~FluxCalc_SS_JPL_Butler ()
 
casacore::Bool setObj (const casacore::String &objname)
 Chooses an object, and returns whether was successful. More...
 
void setTime (const casacore::MEpoch &time)
 
casacore::Bool getName (casacore::String &output) const
 void setFreq(const casacore::MFrequency& freq); More...
 
casacore::Bool getTime (casacore::MEpoch &output) const
 
casacore::MDirection getDirection ()
 casacore::Bool getFreq(casacore::MFrequency& output) const; More...
 
ComponentType::Shape getShape (casacore::Double &angdiam)
 Sets angdiam to the source's angular diameter in radians and returns the object's component type (i.e. More...
 
casacore::Double getHeliocentricDist ()
 Returns the distance from the object to the Sun in AU, or -1 if unknown. More...
 
casacore::uInt n_known () const
 returns the number of objects supported by this class. More...
 
ComponentType::Shape compute (casacore::Vector< Flux< casacore::Double > > &values, casacore::Vector< Flux< casacore::Double > > &errors, casacore::Double &angdiam, const casacore::Vector< casacore::MFrequency > &mfreqs, const casacore::Bool report=true)
 Compute the flux densities, their uncertainties, and the angular diameter of the calibration source for a set of frequencies. More...
 
ComponentType::Shape compute (casacore::Vector< casacore::Vector< Flux< casacore::Double > > > &values, casacore::Vector< casacore::Vector< Flux< casacore::Double > > > &errors, casacore::Double &angdiam, const casacore::Vector< casacore::Vector< casacore::MFrequency > > &mfreqs)
 Same as the above, but for a set of sets of frequencies, i.e. More...
 

Private Types

enum  KnownObjects {
  Mercury,
  Venus,
  Mars,
  Jupiter,
  Io,
  Ganymede,
  Europa,
  Callisto,
  Titan,
  Uranus,
  Neptune,
  Triton,
  Pluto,
  Ceres,
  Pallas,
  Vesta,
  Juno,
  Victoria,
  Davida,
  N_KNOWN
}
 

Private Member Functions

casacore::Bool setObjNum ()
 Tries to set objnum_p to the KnownObject matching name_p. More...
 
casacore::Bool readEphem ()
 Reads a JPL-Horizons ephemeris table to get temperature_p, r_p (heliocentric distance), delta_p (geocentric distance), and phang_p (phase angle). More...
 
void compute_BB (casacore::Vector< Flux< casacore::Double > > &values, casacore::Vector< Flux< casacore::Double > > &errors, const casacore::Double angdiam, const casacore::Vector< casacore::MFrequency > &mfreqs)
 Compute the flux densities assuming a uniform disk blackbody, and their uncertainties. More...
 
void compute_GB (casacore::Vector< Flux< casacore::Double > > &values, casacore::Vector< Flux< casacore::Double > > &errors, const casacore::Double angdiam, const casacore::Vector< casacore::MFrequency > &mfreqs, const casacore::Vector< casacore::Double > &temps)
 Like compute_BB(), except it uses a graybody model where each frequency has a corresponding temperature. More...
 
void compute_venus (casacore::Vector< Flux< casacore::Double > > &values, casacore::Vector< Flux< casacore::Double > > &errors, const casacore::Double angdiam, const casacore::Vector< casacore::MFrequency > &mfreqs)
 
void compute_jupiter (casacore::Vector< Flux< casacore::Double > > &values, casacore::Vector< Flux< casacore::Double > > &errors, const casacore::Double angdiam, const casacore::Vector< casacore::MFrequency > &mfreqs)
 
void compute_uranus (casacore::Vector< Flux< casacore::Double > > &values, casacore::Vector< Flux< casacore::Double > > &errors, const casacore::Double angdiam, const casacore::Vector< casacore::MFrequency > &mfreqs)
 
void compute_neptune (casacore::Vector< Flux< casacore::Double > > &values, casacore::Vector< Flux< casacore::Double > > &errors, const casacore::Double angdiam, const casacore::Vector< casacore::MFrequency > &mfreqs)
 
void compute_pluto (casacore::Vector< Flux< casacore::Double > > &values, casacore::Vector< Flux< casacore::Double > > &errors, const casacore::Double angdiam, const casacore::Vector< casacore::MFrequency > &mfreqs)
 
casacore::Bool compute_constant_temperature (casacore::Vector< Flux< casacore::Double > > &values, casacore::Vector< Flux< casacore::Double > > &errors, const casacore::Double angdiam, const casacore::Vector< casacore::MFrequency > &mfreqs, const casacore::Bool report=true)
 Uses objnum_p to look up a mean temperature, and uses that. More...
 
casacore::Bool get_row_numbers (casacore::uInt &rowbef, casacore::uInt &rowclosest, casacore::uInt &rowaft, const casacore::ScalarColumn< casacore::Double > &mjd)
 Find the row in mjd closest to time_p, and the rows just before and after it, taking boundaries into account. More...
 

Static Private Member Functions

static casacore::Bool get_interpolated_value (casacore::Double &val, const casacore::String &colname, const casacore::Table &tab, const casacore::uInt rowbef, const casacore::uInt rowclosest, const casacore::uInt rowaft, const casacore::Double f, const casacore::Double dt, const casacore::Double tp1mt0, const casacore::Double t0mtm1, const casacore::Bool verbose=true)
 Put a quadratic, linear, or nearest neighbor interpolation of colname into val. More...
 

Private Attributes

casacore::String name_p
 casacore::Data members which are initialized in the c'tor's initialization list: More...
 
casacore::Bool hasName_p
 
casacore::MEpoch time_p
 
casacore::Bool hasTime_p
 
casacore::Bool hasEphemInfo_p
 casacore::MFrequency freq_p; casacore::Bool hasFreq_p; More...
 
casacore::Unit hertz_p
 
casacore::Bool has_ra_p
 
casacore::Bool has_dec_p
 
casacore::Bool has_illu_p
 
FluxCalc_SS_JPL_Butler::KnownObjects objnum_p
 These are also initialized by the c'tor, but not in the initialization list: More...
 
casacore::Bool hasObjNum_p
 
casacore::Double temperature_p
 casacore::Data members that are not initialized by the c'tor: More...
 
casacore::Double mean_rad_p
 
casacore::Double r_p
 
casacore::Double delta_p
 
casacore::Double phang_p
 
casacore::Bool has_r_p
 
casacore::Double illu_p
 
casacore::Double ra_p
 
casacore::Double dec_p
 

Detailed Description

declare a template.

FluxCalc_SS_JPL_Butler: Compute flux densities and get angular diameters for standard Solar System reference sources.

Intended use:

Public interface

Prerequisite

Etymology

From "flux density", "Solar System", "JPL" (ephemeris provides position and angular diameter), and (Bryan) "Butler" (provides model to convert the above to a flux density).

Synopsis

This class organizes a set of functions to compute expected flux densities and angular diameters for several Solar System sources commonly used for flux calibration in (sub)mm astronomy.

Example

Motivation

Make available and encapsulate the Butler Solar System flux density models.

To Do

Definition at line 92 of file FluxCalc_SS_JPL_Butler.h.

Member Enumeration Documentation

Enumerator
Mercury 
Venus 
Mars 

Earth, // Too highly resolved.

Jupiter 
Io 
Ganymede 
Europa 
Callisto 
Titan 

Saturn, // Modeling the rings is too complicated.

Uranus 
Neptune 
Triton 
Pluto 
Ceres 
Pallas 
Vesta 
Juno 
Victoria 
Davida 
N_KNOWN 

Definition at line 157 of file FluxCalc_SS_JPL_Butler.h.

Constructor & Destructor Documentation

casa::FluxCalc_SS_JPL_Butler::FluxCalc_SS_JPL_Butler ( )

Default constructor; provided mainly so an array of these can be made more easily.

(Not that there appears to be an immediate need for that.)

casa::FluxCalc_SS_JPL_Butler::FluxCalc_SS_JPL_Butler ( const casacore::String objname,
const casacore::MEpoch time 
)

The more useful constructor.

casa::FluxCalc_SS_JPL_Butler::~FluxCalc_SS_JPL_Butler ( )

Member Function Documentation

ComponentType::Shape casa::FluxCalc_SS_JPL_Butler::compute ( casacore::Vector< Flux< casacore::Double > > &  values,
casacore::Vector< Flux< casacore::Double > > &  errors,
casacore::Double angdiam,
const casacore::Vector< casacore::MFrequency > &  mfreqs,
const casacore::Bool  report = true 
)

Compute the flux densities, their uncertainties, and the angular diameter of the calibration source for a set of frequencies.

It will try to read the right table in data/ephemerides/JPL-Horizons/.

Return value: the model's shape, or UNKNOWN_SHAPE on failure. Inputs: must be already set, or it returns UNKNOWN_SHAPE. report: If false, suppress logger messages like e.g. references for the temperature. Intended for use in a loop, i.e. print the messages for the 1st spw but do not repeat them for the others. Output args: value: the calculated flux. error: the estimated uncertainty of value. angdiam: angular diameter in radians

ComponentType::Shape casa::FluxCalc_SS_JPL_Butler::compute ( casacore::Vector< casacore::Vector< Flux< casacore::Double > > > &  values,
casacore::Vector< casacore::Vector< Flux< casacore::Double > > > &  errors,
casacore::Double angdiam,
const casacore::Vector< casacore::Vector< casacore::MFrequency > > &  mfreqs 
)

Same as the above, but for a set of sets of frequencies, i.e.

mfreqs[spw] is a set of frequencies for channels in spectral window spw.

void casa::FluxCalc_SS_JPL_Butler::compute_BB ( casacore::Vector< Flux< casacore::Double > > &  values,
casacore::Vector< Flux< casacore::Double > > &  errors,
const casacore::Double  angdiam,
const casacore::Vector< casacore::MFrequency > &  mfreqs 
)
private

Compute the flux densities assuming a uniform disk blackbody, and their uncertainties.

It does not check whether everything is setup, since it assumes compute() already took care of it!

casacore::Bool casa::FluxCalc_SS_JPL_Butler::compute_constant_temperature ( casacore::Vector< Flux< casacore::Double > > &  values,
casacore::Vector< Flux< casacore::Double > > &  errors,
const casacore::Double  angdiam,
const casacore::Vector< casacore::MFrequency > &  mfreqs,
const casacore::Bool  report = true 
)
private

Uses objnum_p to look up a mean temperature, and uses that.

report: If false, suppress logger messages like references for the temperature. Intended for use in a loop, i.e. print the messages for the 1st spw but do not repeat them for the others. Returns whether or not it was successful.

void casa::FluxCalc_SS_JPL_Butler::compute_GB ( casacore::Vector< Flux< casacore::Double > > &  values,
casacore::Vector< Flux< casacore::Double > > &  errors,
const casacore::Double  angdiam,
const casacore::Vector< casacore::MFrequency > &  mfreqs,
const casacore::Vector< casacore::Double > &  temps 
)
private

Like compute_BB(), except it uses a graybody model where each frequency has a corresponding temperature.

void casa::FluxCalc_SS_JPL_Butler::compute_jupiter ( casacore::Vector< Flux< casacore::Double > > &  values,
casacore::Vector< Flux< casacore::Double > > &  errors,
const casacore::Double  angdiam,
const casacore::Vector< casacore::MFrequency > &  mfreqs 
)
private
void casa::FluxCalc_SS_JPL_Butler::compute_neptune ( casacore::Vector< Flux< casacore::Double > > &  values,
casacore::Vector< Flux< casacore::Double > > &  errors,
const casacore::Double  angdiam,
const casacore::Vector< casacore::MFrequency > &  mfreqs 
)
private
void casa::FluxCalc_SS_JPL_Butler::compute_pluto ( casacore::Vector< Flux< casacore::Double > > &  values,
casacore::Vector< Flux< casacore::Double > > &  errors,
const casacore::Double  angdiam,
const casacore::Vector< casacore::MFrequency > &  mfreqs 
)
private
void casa::FluxCalc_SS_JPL_Butler::compute_uranus ( casacore::Vector< Flux< casacore::Double > > &  values,
casacore::Vector< Flux< casacore::Double > > &  errors,
const casacore::Double  angdiam,
const casacore::Vector< casacore::MFrequency > &  mfreqs 
)
private
void casa::FluxCalc_SS_JPL_Butler::compute_venus ( casacore::Vector< Flux< casacore::Double > > &  values,
casacore::Vector< Flux< casacore::Double > > &  errors,
const casacore::Double  angdiam,
const casacore::Vector< casacore::MFrequency > &  mfreqs 
)
private
static casacore::Bool casa::FluxCalc_SS_JPL_Butler::get_interpolated_value ( casacore::Double val,
const casacore::String colname,
const casacore::Table tab,
const casacore::uInt  rowbef,
const casacore::uInt  rowclosest,
const casacore::uInt  rowaft,
const casacore::Double  f,
const casacore::Double  dt,
const casacore::Double  tp1mt0,
const casacore::Double  t0mtm1,
const casacore::Bool  verbose = true 
)
staticprivate

Put a quadratic, linear, or nearest neighbor interpolation of colname into val.

Returns whether or not it did it. verbose: Send a message to the logger if nearest neighbor is used.

casacore::Bool casa::FluxCalc_SS_JPL_Butler::get_row_numbers ( casacore::uInt rowbef,
casacore::uInt rowclosest,
casacore::uInt rowaft,
const casacore::ScalarColumn< casacore::Double > &  mjd 
)
private

Find the row in mjd closest to time_p, and the rows just before and after it, taking boundaries into account.

casacore::MDirection casa::FluxCalc_SS_JPL_Butler::getDirection ( )

casacore::Bool getFreq(casacore::MFrequency& output) const;

Returns the default direction (N. Pole) on failure.

casacore::Double casa::FluxCalc_SS_JPL_Butler::getHeliocentricDist ( )

Returns the distance from the object to the Sun in AU, or -1 if unknown.

casacore::Bool casa::FluxCalc_SS_JPL_Butler::getName ( casacore::String output) const

void setFreq(const casacore::MFrequency& freq);

These return whether or not the item has been set, and if has, copy their item to the arg.

ComponentType::Shape casa::FluxCalc_SS_JPL_Butler::getShape ( casacore::Double angdiam)

Sets angdiam to the source's angular diameter in radians and returns the object's component type (i.e.

DISK), or UNKNOWN_SHAPE on failure.

casacore::Bool casa::FluxCalc_SS_JPL_Butler::getTime ( casacore::MEpoch output) const
casacore::uInt casa::FluxCalc_SS_JPL_Butler::n_known ( ) const

returns the number of objects supported by this class.

casacore::Bool casa::FluxCalc_SS_JPL_Butler::readEphem ( )
private

Reads a JPL-Horizons ephemeris table to get temperature_p, r_p (heliocentric distance), delta_p (geocentric distance), and phang_p (phase angle).

Returns whether or not it was able to get the info.

casacore::Bool casa::FluxCalc_SS_JPL_Butler::setObj ( const casacore::String objname)

Chooses an object, and returns whether was successful.

It ignores the case of objname.

casacore::Bool casa::FluxCalc_SS_JPL_Butler::setObjNum ( )
private

Tries to set objnum_p to the KnownObject matching name_p.

Returns whether or not it found a match.

void casa::FluxCalc_SS_JPL_Butler::setTime ( const casacore::MEpoch time)

Member Data Documentation

casacore::Double casa::FluxCalc_SS_JPL_Butler::dec_p
private

Definition at line 276 of file FluxCalc_SS_JPL_Butler.h.

casacore::Double casa::FluxCalc_SS_JPL_Butler::delta_p
private

Definition at line 271 of file FluxCalc_SS_JPL_Butler.h.

casacore::Bool casa::FluxCalc_SS_JPL_Butler::has_dec_p
private

Definition at line 259 of file FluxCalc_SS_JPL_Butler.h.

casacore::Bool casa::FluxCalc_SS_JPL_Butler::has_illu_p
private

Definition at line 260 of file FluxCalc_SS_JPL_Butler.h.

casacore::Bool casa::FluxCalc_SS_JPL_Butler::has_r_p
private

Definition at line 273 of file FluxCalc_SS_JPL_Butler.h.

casacore::Bool casa::FluxCalc_SS_JPL_Butler::has_ra_p
private

Definition at line 258 of file FluxCalc_SS_JPL_Butler.h.

casacore::Bool casa::FluxCalc_SS_JPL_Butler::hasEphemInfo_p
private

casacore::MFrequency freq_p; casacore::Bool hasFreq_p;

Definition at line 256 of file FluxCalc_SS_JPL_Butler.h.

casacore::Bool casa::FluxCalc_SS_JPL_Butler::hasName_p
private

Definition at line 251 of file FluxCalc_SS_JPL_Butler.h.

casacore::Bool casa::FluxCalc_SS_JPL_Butler::hasObjNum_p
private

Definition at line 265 of file FluxCalc_SS_JPL_Butler.h.

casacore::Bool casa::FluxCalc_SS_JPL_Butler::hasTime_p
private

Definition at line 253 of file FluxCalc_SS_JPL_Butler.h.

casacore::Unit casa::FluxCalc_SS_JPL_Butler::hertz_p
private

Definition at line 257 of file FluxCalc_SS_JPL_Butler.h.

casacore::Double casa::FluxCalc_SS_JPL_Butler::illu_p
private

Definition at line 274 of file FluxCalc_SS_JPL_Butler.h.

casacore::Double casa::FluxCalc_SS_JPL_Butler::mean_rad_p
private

Definition at line 269 of file FluxCalc_SS_JPL_Butler.h.

casacore::String casa::FluxCalc_SS_JPL_Butler::name_p
private

casacore::Data members which are initialized in the c'tor's initialization list:

Definition at line 250 of file FluxCalc_SS_JPL_Butler.h.

FluxCalc_SS_JPL_Butler::KnownObjects casa::FluxCalc_SS_JPL_Butler::objnum_p
private

These are also initialized by the c'tor, but not in the initialization list:

Definition at line 264 of file FluxCalc_SS_JPL_Butler.h.

casacore::Double casa::FluxCalc_SS_JPL_Butler::phang_p
private

Definition at line 272 of file FluxCalc_SS_JPL_Butler.h.

casacore::Double casa::FluxCalc_SS_JPL_Butler::r_p
private

Definition at line 270 of file FluxCalc_SS_JPL_Butler.h.

casacore::Double casa::FluxCalc_SS_JPL_Butler::ra_p
private

Definition at line 275 of file FluxCalc_SS_JPL_Butler.h.

casacore::Double casa::FluxCalc_SS_JPL_Butler::temperature_p
private

casacore::Data members that are not initialized by the c'tor:

Definition at line 268 of file FluxCalc_SS_JPL_Butler.h.

casacore::MEpoch casa::FluxCalc_SS_JPL_Butler::time_p
private

Definition at line 252 of file FluxCalc_SS_JPL_Butler.h.


The documentation for this class was generated from the following file: