casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
casacore::MeasComet Class Reference

Position for comets and other solar system bodies. More...

#include <MeasComet.h>

Public Types

enum  Types {
  MJD,
  RA,
  DEC,
  RHO,
  RADVEL,
  DISKLONG,
  DISKLAT,
  N_Columns,
  N_Types
}
 Types of known data. More...
 

Public Member Functions

 MeasComet ()
 Construct using the aipsrc value (measures.comet.file) More...
 
 MeasComet (const String &path)
 Construct a table from the named path. More...
 
 MeasComet (const Table &tabin, const String &path)
 Construct a table from the name and the input table. More...
 
 MeasComet (const MeasComet &other)
 Copy constructor. More...
 
MeasCometoperator= (const MeasComet &other)
 Copy assign. More...
 
 ~MeasComet ()
 
Bool ok () const
 Is it a valid comet class (i.e. More...
 
const StringgetName () const
 Get the name of the comet. More...
 
const MVPositiongetTopo () const
 Get the topo position. More...
 
MDirection::Types getType () const
 Get the direction type. More...
 
Double getStart () const
 Get the start of the table (in MJD) More...
 
Double getEnd () const
 Get the end of the table (in MJD) More...
 
Int nelements () const
 Get number of entries. More...
 
Bool get (MVPosition &returnValue, Double date) const
 Get a comet position. More...
 
Bool getDisk (MVDirection &returnValue, Double date) const
 Get the local on-disk direction. More...
 
Bool getRadVel (MVRadialVelocity &returnValue, Double date) const
 Get the velocity from a comet table, interpolated for date(in MJD(TDB)). More...
 
Double getTemperature (const Bool squawk)
 Return the temperature in K, or -1 if the table does not have it. More...
 
Double getMeanRad (const Bool squawk)
 Return the mean radius in AU, or -1 if the table does not have it. More...
 
MeasCometclone () const
 Create a clone. More...
 
void closeMeas ()
 Close the Comet tabls only. More...
 
String getTablePath ()
 Convenience function that returns the absolute path to the ephemeris table connected to the MeasComet object. More...
 
Comet table has posrefsys
defined *Bool 
hasPosrefsys () const
 
MDirection::Types getPosrefsysType () const
 Get the posrefsys dir type. More...
 

Static Public Member Functions

static Double get_Quantity_keyword (const TableRecord &ks, const String &kw, const Unit &unit, Bool &success)
 Convenience function that returns ks[kw] in units of unit, setting success. More...
 

Private Member Functions

Bool initMeas (const String &which, const Table *tabin=0)
 Initialise table from the name given. More...
 
Bool fillMeas (Double utf) const
 Fill Table lines. More...
 
MVPosition getRelPosition (const uInt index) const
 Helper functions for accessing ldat_p. More...
 
MVDirection getDiskLongLat (const uInt index) const
 
Bool getExtras ()
 Try to read mean_rad_p and temperature_p, returning whether or not it was successful. More...
 

Private Attributes

Table tab_p
 Initialized in the "initialization list" of the c'tors, so maintain order: More...
 
Bool measFlag_p
 Measured data readable. More...
 
Bool measured_p
 Measured data present. More...
 
ROTableRow row_p
 Row descriptions. More...
 
Double mjd0_p
 First MJD in list - 1.0 * dmjd_p. More...
 
Double mjdl_p
 Last MJD in list. More...
 
Double dmjd_p
 Increment in rows. More...
 
Int nrow_p
 Number of rows. More...
 
String name_p
 Name of comet. More...
 
MVPosition topo_p
 Position on Earth. More...
 
MDirection::Types mtype_p
 Type of coordinates. More...
 
Bool msgDone_p
 Message given. More...
 
String tp_p
 File names. More...
 
Bool haveDiskLongLat_p
 Whether or not the sub-observer longitude and latitude are available. More...
 
uInt ncols_p
 
Vector< RORecordFieldPtr
< Double > > 
rfp_p
 These may be initialized inside the c'tors, but the order here is unimportant: More...
 
Int lnr_p [2]
 Lines in memory. More...
 
Vector< Doubleldat_p [2]
 Last read data (measlow - meashigh) More...
 
Bool haveTriedExtras_p
 which isn't. More...
 
Double temperature_p
 
Double mean_rad_p
 
Bool hasPosrefsys_p
 
MDirection::Types posrefsystype_p
 

Detailed Description

Position for comets and other solar system bodies.

Intended use:

Internal

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25
Test programs:
tMeasComet

Prerequisite

Etymology

From Measure and Comet

Synopsis

MeasComet is the interface class between generated Comet position tables and the Direction conversion machinery. Tables are found using the aipsrc (using measures.<table>.directory) mechanism. If not provided they are assumed to reside in standard places Tables are assumed to have the VS_VERSION, VS_DATE, VS_CREATE, VS_TYPE, MJD0 (first MJD in table - 1.0 * dMJD, >= 10000), dMJD (increment between successive MJDs, in days, > 0), and NAME keywords, be gapless (constant dMJD), and be of type IERS, or else an exception will be thrown.
They are also assumed to have the MJD, RA, DEC, Rho, and RadVel columns. The DiskLong and DiskLat columns can be used if they are present, but they are no longer expected. The get() method will obtain data from the cometary tables. The data obtained will be in the specified frame. Note that the normal usage of these tables is through the Measures system.


Note: A message is logged (once) if a date outside the range in the Tables is asked for;

Thrown Exceptions

Example

See test/tMeasComet.cc.

tbd

Motivation

To use the JPL data for positions of solar system bodies

Definition at line 106 of file MeasComet.h.

Member Enumeration Documentation

Types of known data.

Enumerator
MJD 

MJD (must be first in list)

RA 

Columns with data.

DEC 
RHO 
RADVEL 
DISKLONG 
DISKLAT 
N_Columns 

Number of columns.

N_Types 

Definition at line 113 of file MeasComet.h.

Constructor & Destructor Documentation

casacore::MeasComet::MeasComet ( )

Construct using the aipsrc value (measures.comet.file)

casacore::MeasComet::MeasComet ( const String path)
explicit

Construct a table from the named path.

casacore::MeasComet::MeasComet ( const Table tabin,
const String path 
)

Construct a table from the name and the input table.

casacore::MeasComet::MeasComet ( const MeasComet other)

Copy constructor.

casacore::MeasComet::~MeasComet ( )

Member Function Documentation

MeasComet* casacore::MeasComet::clone ( ) const

Create a clone.

void casacore::MeasComet::closeMeas ( )

Close the Comet tabls only.

Bool casacore::MeasComet::fillMeas ( Double  utf) const
private

Fill Table lines.

Bool casacore::MeasComet::get ( MVPosition returnValue,
Double  date 
) const

Get a comet position.

static Double casacore::MeasComet::get_Quantity_keyword ( const TableRecord ks,
const String kw,
const Unit unit,
Bool success 
)
static

Convenience function that returns ks[kw] in units of unit, setting success.

Bool casacore::MeasComet::getDisk ( MVDirection returnValue,
Double  date 
) const

Get the local on-disk direction.

Returns False if the time or sub-observer longitude and latitude are unavailable, True on success.

MVDirection casacore::MeasComet::getDiskLongLat ( const uInt  index) const
private
Double casacore::MeasComet::getEnd ( ) const

Get the end of the table (in MJD)

Bool casacore::MeasComet::getExtras ( )
private

Try to read mean_rad_p and temperature_p, returning whether or not it was successful.

(but the real mark of success is whether or not they are positive.) It sets haveTriedExtras_p to true and will return right away if it is already true.

Double casacore::MeasComet::getMeanRad ( const Bool  squawk)

Return the mean radius in AU, or -1 if the table does not have it.

If squawk is true an error message will also be posted.

const String& casacore::MeasComet::getName ( ) const

Get the name of the comet.

MDirection::Types casacore::MeasComet::getPosrefsysType ( ) const

Get the posrefsys dir type.

Bool casacore::MeasComet::getRadVel ( MVRadialVelocity returnValue,
Double  date 
) const

Get the velocity from a comet table, interpolated for date(in MJD(TDB)).

MVPosition casacore::MeasComet::getRelPosition ( const uInt  index) const
private

Helper functions for accessing ldat_p.

index should be either 0 or 1, but that isn't checked!

Double casacore::MeasComet::getStart ( ) const

Get the start of the table (in MJD)

String casacore::MeasComet::getTablePath ( )

Convenience function that returns the absolute path to the ephemeris table connected to the MeasComet object.

Double casacore::MeasComet::getTemperature ( const Bool  squawk)

Return the temperature in K, or -1 if the table does not have it.

If squawk is true an error message will also be posted.

const MVPosition& casacore::MeasComet::getTopo ( ) const

Get the topo position.

MDirection::Types casacore::MeasComet::getType ( ) const

Get the direction type.

Comet table has posrefsys defined* Bool casacore::MeasComet::hasPosrefsys ( ) const
Bool casacore::MeasComet::initMeas ( const String which,
const Table tabin = 0 
)
private

Initialise table from the name given.

Int casacore::MeasComet::nelements ( ) const

Get number of entries.

Bool casacore::MeasComet::ok ( ) const
inline

Is it a valid comet class (i.e.

can it be used)

Definition at line 144 of file MeasComet.h.

References measured_p.

MeasComet& casacore::MeasComet::operator= ( const MeasComet other)

Copy assign.

Member Data Documentation

Double casacore::MeasComet::dmjd_p
private

Increment in rows.

Definition at line 230 of file MeasComet.h.

Bool casacore::MeasComet::hasPosrefsys_p
private

Definition at line 262 of file MeasComet.h.

Bool casacore::MeasComet::haveDiskLongLat_p
private

Whether or not the sub-observer longitude and latitude are available.

Definition at line 245 of file MeasComet.h.

Bool casacore::MeasComet::haveTriedExtras_p
private

which isn't.

Definition at line 259 of file MeasComet.h.

Vector<Double> casacore::MeasComet::ldat_p[2]
mutableprivate

Last read data (measlow - meashigh)

Definition at line 257 of file MeasComet.h.

Int casacore::MeasComet::lnr_p[2]
mutableprivate

Lines in memory.

Definition at line 255 of file MeasComet.h.

Double casacore::MeasComet::mean_rad_p
private

Definition at line 261 of file MeasComet.h.

Bool casacore::MeasComet::measFlag_p
private

Measured data readable.

Definition at line 220 of file MeasComet.h.

Bool casacore::MeasComet::measured_p
private

Measured data present.

Definition at line 222 of file MeasComet.h.

Referenced by ok().

Double casacore::MeasComet::mjd0_p
private

First MJD in list - 1.0 * dmjd_p.

Definition at line 226 of file MeasComet.h.

Double casacore::MeasComet::mjdl_p
private

Last MJD in list.

Definition at line 228 of file MeasComet.h.

Bool casacore::MeasComet::msgDone_p
private

Message given.

Definition at line 240 of file MeasComet.h.

MDirection::Types casacore::MeasComet::mtype_p
private

Type of coordinates.

Definition at line 238 of file MeasComet.h.

String casacore::MeasComet::name_p
private

Name of comet.

Definition at line 234 of file MeasComet.h.

uInt casacore::MeasComet::ncols_p
private

Definition at line 247 of file MeasComet.h.

Int casacore::MeasComet::nrow_p
private

Number of rows.

Definition at line 232 of file MeasComet.h.

MDirection::Types casacore::MeasComet::posrefsystype_p
private

Definition at line 263 of file MeasComet.h.

Vector<RORecordFieldPtr<Double> > casacore::MeasComet::rfp_p
private

These may be initialized inside the c'tors, but the order here is unimportant:

Field pointers

Definition at line 253 of file MeasComet.h.

ROTableRow casacore::MeasComet::row_p
private

Row descriptions.

Definition at line 224 of file MeasComet.h.

Table casacore::MeasComet::tab_p
private

Initialized in the "initialization list" of the c'tors, so maintain order:

Actual table

Definition at line 218 of file MeasComet.h.

Double casacore::MeasComet::temperature_p
private

Definition at line 260 of file MeasComet.h.

MVPosition casacore::MeasComet::topo_p
private

Position on Earth.

Definition at line 236 of file MeasComet.h.

String casacore::MeasComet::tp_p
private

File names.

Definition at line 242 of file MeasComet.h.


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