CARMA C++
carma::services::Observatory Class Reference

Observatory specifies the parameters of a given observatory: name, reference location (longitude, latitude, altitude), optional pad names and locations, and optional array configurations. More...

#include <carma/services/Observatory.h>

Public Member Functions

std::string getName () const
 
const carma::services::Pad getPad (const std::string &name)
 Request a specific Pad by name. More...
 
std::map< std::string,
carma::services::Pad
getPadMap () const
 
const std::vector
< carma::services::Pad
getPadsInConfig (const std::string &arrayConfig)
 Get all the pads in a specific array configuration. More...
 
carma::services::Location getReference () const
 
carma::services::AntennaCoordinates getReferenceCoordinates () const
 
carma::services::Pad getReferencePad () const
 
carma::services::PadIterator mapBegin () const
 
carma::services::PadIterator mapEnd () const
 
int numBaselinesInConfig (const std::string &arrayConfig)
 
int numConfigs () const
 
int numPads () const
 
int numPadsInConfig (const std::string &arrayConfig)
 
 Observatory (const std::string &observatory=CARMA_OBSERVATORY)
 Constructor using a name from the Observatory.cat catalog that should live in CARMA/conf/catalogs/Observatory.cat Examples are "carma", "ovro", "wsrt" etc.etc. More...
 
std::string toString () const
 
virtual ~Observatory ()
 Destructor. More...
 

Detailed Description

Observatory specifies the parameters of a given observatory: name, reference location (longitude, latitude, altitude), optional pad names and locations, and optional array configurations.

The class is instantiated from the file conf/catalogs/observatory/Observatory.cat. Once instantiated, the object can be queried for any of its properties, and pads can be accessed individually or in groups. All properties, including Pads, are read-only.

Definition at line 34 of file Observatory.h.

Constructor & Destructor Documentation

carma::services::Observatory::Observatory ( const std::string &  observatory = CARMA_OBSERVATORY)

Constructor using a name from the Observatory.cat catalog that should live in CARMA/conf/catalogs/Observatory.cat Examples are "carma", "ovro", "wsrt" etc.etc.

The match is case-insensitive.

Parameters
observatoryName of the observatory; default is "carma".
Exceptions
carma::util::NotFoundExceptionif the an observatory matching the requested name is not found.
carma::util::NotFoundExceptionif the a position called "reference" for the named observatory is not found.
virtual carma::services::Observatory::~Observatory ( )
virtual

Destructor.

Member Function Documentation

std::string carma::services::Observatory::getName ( ) const
Returns
the name of this observatory

Definition at line 58 of file Observatory.h.

const carma::services::Pad carma::services::Observatory::getPad ( const std::string &  name)

Request a specific Pad by name.

Parameters
Thename of the requested pad
Returns
The Pad object representing the request pad, if the name is matched.
Exceptions
carma::util::NotFoundExceptionif the pad is not found.
std::map<std::string, carma::services::Pad> carma::services::Observatory::getPadMap ( ) const
Returns
a map of all Pads in this Observatory, where the key is the pad name.

Definition at line 100 of file Observatory.h.

const std::vector<carma::services::Pad> carma::services::Observatory::getPadsInConfig ( const std::string &  arrayConfig)

Get all the pads in a specific array configuration.

Parameters
arrayConfigThe name of the array configuration to retrieve.
Returns
a vector containing the pads that are in requested array configuration.
Exceptions
carma::util::NotFoundExceptionif no matching Pads are found (the requested array configuration is not in this Observatory).
carma::services::Location carma::services::Observatory::getReference ( ) const
Returns
The reference location (longitude, latitude, altitude) of this observatory, i.e. the "array center".

Definition at line 67 of file Observatory.h.

carma::services::AntennaCoordinates carma::services::Observatory::getReferenceCoordinates ( ) const
Returns
The reference location of this observatory in an AntennaCoordinates container, which supports various types of calculations, e.g. coordinate offsets between station locations.
carma::services::Pad carma::services::Observatory::getReferencePad ( ) const
Returns
The reference location of this observatory in an Pad container.
carma::services::PadIterator carma::services::Observatory::mapBegin ( ) const
Returns
an iterator over all Pads in this observatory, initially pointing to the first pad in the list.
carma::services::PadIterator carma::services::Observatory::mapEnd ( ) const
Returns
an iterator over all Pads in this observatory, pointing to the end of the map. For use in loops.
int carma::services::Observatory::numBaselinesInConfig ( const std::string &  arrayConfig)
Parameters
arrayConfigThe name of the array configuration to retrieve.
Returns
The total number of baselines in a given array configuration. This method will return zero if the requested array configuration is not in this Observatory.
int carma::services::Observatory::numConfigs ( ) const
Returns
The total number of array configurations in this observatory.

Definition at line 132 of file Observatory.h.

int carma::services::Observatory::numPads ( ) const
Returns
The total number of pads in this Observatory.

Definition at line 140 of file Observatory.h.

int carma::services::Observatory::numPadsInConfig ( const std::string &  arrayConfig)
Parameters
arrayConfigThe name of the array configuration to retrieve.
Returns
The total number of pads in a given array configuration. This method will return zero if the requested array configuration is not in this Observatory.
std::string carma::services::Observatory::toString ( ) const
Returns
a string description of this observatory.

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