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

a container for source information More...

#include <FillMetadata.h>

Inheritance diagram for MirSource:
MirInfo MirTypeAssert

Public Types

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

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

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

Static Public Attributes

static const casacore::String solSysNames []
 Planet names. More...
 

Private Attributes

std::map< casacore::Double,
casacore::OrderedPair
< casacore::Double,
casacore::Double > > * 
motion_p
 

Static Private Attributes

static casacore::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 649 of file FillMetadata.h.

Member Enumeration Documentation

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

Definition at line 651 of file FillMetadata.h.

Constructor & Destructor Documentation

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

Member Function Documentation

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

add a new position for this source

Definition at line 755 of file FillMetadata.h.

References dec, motion_p, ra, and time.

static void MirSource::clearIDs ( casacore::List< MirSource * > &  srclist)
inlinestatic

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

Definition at line 727 of file FillMetadata.h.

References casacore::ConstListIter< t >::atEnd(), and MirField::clearIDs().

MirSource* MirSource::findIn ( casacore::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 711 of file FillMetadata.h.

References casacore::ConstListIter< t >::atEnd(), and casacore::ListIter< t >::getRight().

MirSource* MirSource::findNameIn ( casacore::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 719 of file FillMetadata.h.

References casacore::ConstListIter< t >::atEnd(), casacore::ListIter< t >::getRight(), and name.

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

load the motion data into the given arrays

Definition at line 766 of file FillMetadata.h.

References dec, motion_p, ra, casacore::Vector< T >::resize(), and time.

casacore::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 738 of file FillMetadata.h.

References motion_p.

casacore::Bool MirSource::isPlanet ( )
inline

return true if this source is identified as a planet

Definition at line 744 of file FillMetadata.h.

References solsys, and SUN.

casacore::Bool MirSource::isSolSysObj ( )
inline

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

Definition at line 741 of file FillMetadata.h.

References N_Objects, and solsys.

static SolSysObject MirSource::matchSolSysObj ( const casacore::String name)
static
static casacore::Int MirSource::nextID ( )
inlinestatic

Definition at line 785 of file FillMetadata.h.

References nxtid_p.

casacore::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 748 of file FillMetadata.h.

References MirField::ddec, MirField::dra, flds, casacore::ListIter< t >::getRight(), and casacore::List< t >::len().

casacore::Bool MirSource::operator!= ( const MirSource that)
inline

return false if this source is the same as another.

Definition at line 705 of file FillMetadata.h.

casacore::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 700 of file FillMetadata.h.

References epoch, and name.

Member Data Documentation

casacore::Double MirSource::dec

Definition at line 669 of file FillMetadata.h.

Referenced by addPosition(), and getMotion().

casacore::Float MirSource::epoch

the position epoch

Definition at line 672 of file FillMetadata.h.

Referenced by operator==().

casacore::List<MirField*> MirSource::flds

a list of fields

Definition at line 690 of file FillMetadata.h.

Referenced by offSource().

casacore::Int MirSource::id

the source id

Definition at line 678 of file FillMetadata.h.

std::map<casacore::Double, casacore::OrderedPair<casacore::Double, casacore::Double> >* MirSource::motion_p
private

Definition at line 792 of file FillMetadata.h.

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

casacore::String MirSource::name

the source name

Definition at line 666 of file FillMetadata.h.

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

casacore::Int MirSource::nxtid_p
staticprivate

Definition at line 793 of file FillMetadata.h.

Referenced by nextID().

casacore::Double MirSource::ra

the initial source position

Definition at line 669 of file FillMetadata.h.

Referenced by addPosition(), and getMotion().

casacore::Int MirSource::row

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

Definition at line 681 of file FillMetadata.h.

SolSysObject MirSource::solsys

a planet identifier

Definition at line 684 of file FillMetadata.h.

Referenced by isPlanet(), and isSolSysObj().

const casacore::String MirSource::solSysNames[]
static

Planet names.

Definition at line 687 of file FillMetadata.h.

casacore::Double MirSource::time

the time of first observation

Definition at line 675 of file FillMetadata.h.

Referenced by addPosition(), and getMotion().


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