casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
casa::MeasComet Class Reference

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

#include <MeasComet.h>

List of all members.

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

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.

Private Member Functions

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

Private Attributes

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

Detailed Description

Position for comets and other solar system bodies.

Intended use:

Internal

 <h3>Review Status</h3><dl><dt>Reviewed By:<dd>UNKNOWN<dt>Date Reviewed:<dd>before2004/08/25<dt>Test programs:<dd>tMeasComet</dl> 

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

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

casa::MeasComet::MeasComet ( const String path) [explicit]

Construct a table from the named path.

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

Construct a table from the name and the input table.

Copy constructor.


Member Function Documentation

Create a clone.

Close the Comet tabls only.

Bool casa::MeasComet::fillMeas ( Double  utf) const [private]

Fill Table lines.

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

Get a comet position.

static Double casa::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 casa::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 casa::MeasComet::getDiskLongLat ( const uInt  index) const [private]

Get the end of the table (in MJD)

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.

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& casa::MeasComet::getName ( ) const

Get the name of the comet.

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

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

MVPosition casa::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!

Get the start of the table (in MJD)

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

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.

Get the topo position.

Get the direction type.

Bool casa::MeasComet::initMeas ( const String which,
const Table tabin = 0 
) [private]

Initialise table from the name given.

Get number of entries.

Bool casa::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& casa::MeasComet::operator= ( const MeasComet other)

Copy assign.


Member Data Documentation

Increment in rows.

Definition at line 225 of file MeasComet.h.

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

Definition at line 240 of file MeasComet.h.

which isn't.

Definition at line 254 of file MeasComet.h.

Vector<Double> casa::MeasComet::ldat_p[2] [mutable, private]

Last read data (measlow - meashigh)

Definition at line 252 of file MeasComet.h.

Int casa::MeasComet::lnr_p[2] [mutable, private]

Lines in memory.

Definition at line 250 of file MeasComet.h.

Definition at line 256 of file MeasComet.h.

Measured data readable.

Definition at line 215 of file MeasComet.h.

Measured data present.

Definition at line 217 of file MeasComet.h.

Referenced by ok().

First MJD in list - 1.0 * dmjd_p.

Definition at line 221 of file MeasComet.h.

Last MJD in list.

Definition at line 223 of file MeasComet.h.

Message given.

Definition at line 235 of file MeasComet.h.

Type of coordinates.

Definition at line 233 of file MeasComet.h.

Name of comet.

Definition at line 229 of file MeasComet.h.

Definition at line 242 of file MeasComet.h.

Number of rows.

Definition at line 227 of file MeasComet.h.

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

Field pointers

Definition at line 248 of file MeasComet.h.

Row descriptions.

Definition at line 219 of file MeasComet.h.

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

Actual table

Definition at line 213 of file MeasComet.h.

Definition at line 255 of file MeasComet.h.

Position on Earth.

Definition at line 231 of file MeasComet.h.

File names.

Definition at line 237 of file MeasComet.h.


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