MirSource Class Reference

a container for source information More...

#include <FillMetadata.h>

Inheritance diagram for MirSource:
MirInfo MirTypeAssert

List of all members.

Public Types

enum  SolSysObject {
  MERCURY,
  VENUS,
  MARS,
  JUPITER,
  SATURN,
  URANUS,
  NEPTUNE,
  PLUTO,
  SUN,
  MOON,
  N_Objects
}

Public Member Functions

 MirSource (String source, Double sra, Double sdec, Float sepoch, Double stime=0, Int sid=-1)
 MirSource (int mirh, Double stime=0)
virtual ~MirSource ()
Bool operator== (const MirSource &that)
 return true if this source is the same as another.
Bool operator!= (const MirSource &that)
 return false if this source is the same as another.
MirSourcefindIn (List< MirSource * > &srclist)
 return a pointer to a source in a given list of source that is equal to this source.
MirSourcefindNameIn (List< MirSource * > &srclist)
 return a pointer to a source in a given list of source that has the same name as this source.
Bool isMoving ()
 return True if this source is a moving object (by virtue of having multiple positions added to this container).
Bool isSolSysObj ()
 return True if this source is identified as a major solar system object
Bool isPlanet ()
 return True if this source is identified as a planet
Bool offSource ()
 return True if any of the fields is pointed off the main source position (as given by ra and dec)
void addPosition (Double mtime, Double mra, Double mdec)
 add a new position for this source
void getMotion (Vector< Double > &time, Vector< Double > &ra, Vector< Double > &dec)
 load the motion data into the given arrays

Static Public Member Functions

static void clearIDs (List< MirSource * > &srclist)
 clear the ID values for all the source in a source list by setting them to -1.
static SolSysObject matchSolSysObj (const String &name)
static Int nextID ()

Public Attributes

String name
 the source name
Double ra
 the initial source position
Double dec
Float epoch
 the position epoch
Double time
 the time of first observation
Int id
 the source id
Int row
 the first row of this source record appears in the SOURCE table.
SolSysObject solsys
 a planet identifier
List< MirField * > flds
 a list of fields

Static Public Attributes

static const String solSysNames []
 Planet names.

Private Attributes

OrderedMap< Double,
OrderedPair< Double, Double > > * 
motion_p

Static Private Attributes

static Int nxtid_p

Detailed Description

a container for source information

Intended use:

Internal

Review Status

Date Reviewed:
yyyy/mm/dd

Etymology

a description of a source and its position as stored in a Miriad dataset

Synopsis

This class contains the data describing a source from a Miriad dataset.

Most of the interaction with this class is through public data members (for programming and runtime efficiency); thus, this class is not appropriate for use outside of this module. A few helper funtions are provided to aid in utilizing the information (mainly for comparison with other MirSource objects).

Motivation

a Miriad dataset may switch back and forth between different sources. The filler must keep track of them, and recognize them when the are reused.

Definition at line 648 of file FillMetadata.h.


Member Enumeration Documentation

Enumerator:
MERCURY 
VENUS 
MARS 
JUPITER 
SATURN 
URANUS 
NEPTUNE 
PLUTO 
SUN 
MOON 
N_Objects 

Definition at line 650 of file FillMetadata.h.


Constructor & Destructor Documentation

MirSource::MirSource ( String  source,
Double  sra,
Double  sdec,
Float  sepoch,
Double  stime = 0,
Int  sid = -1 
)
MirSource::MirSource ( int  mirh,
Double  stime = 0 
)
virtual MirSource::~MirSource (  )  [virtual]

Member Function Documentation

void MirSource::addPosition ( Double  mtime,
Double  mra,
Double  mdec 
) [inline]

add a new position for this source

Definition at line 754 of file FillMetadata.h.

References dec, motion_p, ra, and time.

static void MirSource::clearIDs ( List< MirSource * > &  srclist  )  [inline, static]

clear the ID values for all the source in a source list by setting them to -1.

Definition at line 726 of file FillMetadata.h.

MirSource* MirSource::findIn ( List< MirSource * > &  srclist  )  [inline]

return a pointer to a source in a given list of source that is equal to this source.

Definition at line 710 of file FillMetadata.h.

MirSource* MirSource::findNameIn ( List< MirSource * > &  srclist  )  [inline]

return a pointer to a source in a given list of source that has the same name as this source.

Definition at line 718 of file FillMetadata.h.

References name.

void MirSource::getMotion ( Vector< Double > &  time,
Vector< Double > &  ra,
Vector< Double > &  dec 
) [inline]

load the motion data into the given arrays

Definition at line 765 of file FillMetadata.h.

References dec, motion_p, ra, and time.

Bool MirSource::isMoving (  )  [inline]

return True if this source is a moving object (by virtue of having multiple positions added to this container).

Definition at line 737 of file FillMetadata.h.

References motion_p.

Bool MirSource::isPlanet (  )  [inline]

return True if this source is identified as a planet

Definition at line 743 of file FillMetadata.h.

References solsys, and SUN.

Bool MirSource::isSolSysObj (  )  [inline]

return True if this source is identified as a major solar system object

Definition at line 740 of file FillMetadata.h.

References N_Objects, and solsys.

static SolSysObject MirSource::matchSolSysObj ( const String &  name  )  [static]
static Int MirSource::nextID (  )  [inline, static]

Definition at line 784 of file FillMetadata.h.

References nxtid_p.

Bool MirSource::offSource (  )  [inline]

return True if any of the fields is pointed off the main source position (as given by ra and dec)

Definition at line 747 of file FillMetadata.h.

References flds, and casacore::True.

Bool MirSource::operator!= ( const MirSource that  )  [inline]

return false if this source is the same as another.

Definition at line 704 of file FillMetadata.h.

Bool MirSource::operator== ( const MirSource that  )  [inline]

return true if this source is the same as another.

Two sources are considered the same if they have the same name and position epoch.

Definition at line 699 of file FillMetadata.h.

References epoch, and name.


Member Data Documentation

Definition at line 668 of file FillMetadata.h.

Referenced by addPosition(), and getMotion().

the position epoch

Definition at line 671 of file FillMetadata.h.

Referenced by operator==().

a list of fields

Definition at line 689 of file FillMetadata.h.

Referenced by offSource().

the source id

Definition at line 677 of file FillMetadata.h.

OrderedMap<Double, OrderedPair<Double, Double> >* MirSource::motion_p [private]

Definition at line 791 of file FillMetadata.h.

Referenced by addPosition(), getMotion(), and isMoving().

the source name

Definition at line 665 of file FillMetadata.h.

Referenced by findNameIn(), and operator==().

Int MirSource::nxtid_p [static, private]

Definition at line 792 of file FillMetadata.h.

Referenced by nextID().

Double MirSource::ra

the initial source position

Definition at line 668 of file FillMetadata.h.

Referenced by addPosition(), and getMotion().

the first row of this source record appears in the SOURCE table.

Definition at line 680 of file FillMetadata.h.

a planet identifier

Definition at line 683 of file FillMetadata.h.

Referenced by isPlanet(), and isSolSysObj().

const String MirSource::solSysNames[] [static]

Planet names.

Definition at line 686 of file FillMetadata.h.

the time of first observation

Definition at line 674 of file FillMetadata.h.

Referenced by addPosition(), and getMotion().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1