CARMA C++
|
Auxiliary Services is intended to provide routines commonly needed for array control and observational planning. More...
Namespaces | |
constants | |
Standard physical and astronomical constants. | |
Classes | |
class | Angle |
The Angle class can represent any angle in any units. More... | |
class | AngularRate |
The AngularRate class can represent an angular rate in any units. More... | |
class | AntennaCoordinates |
This class performs conversions between several different antenna coordinate systems. More... | |
class | AstroTime |
This class implements various astronomical time computation routines. More... | |
class | Atmosphere |
This class is used to calculate a variety of quantities related to the earth's atmosphere, such as refractivity, saturated pressure, and pathlength (refractivity integrated through the atmosphere). More... | |
class | AzElPair |
Simple class to represent azimuth and elevation pair. More... | |
class | CatalogEntryNotFoundException |
An exception indicating that an entry could not be found in the given catalog. More... | |
class | Column |
Column - an unimplemented class we could create a special class 'Column' in which it is defined how a column it to be recognized, as there are different models. More... | |
class | ConformabilityException |
An exception indicating that a unit conversion failed because the units were not conformable. More... | |
class | ConformableQuantity |
The ConformableQuantity class can represent any quantity that can be expressed in many units. More... | |
class | Delay |
Trivial class for handling delays. More... | |
class | Distance |
The Distance class can represent an distance in any units. More... | |
class | Ephemeris |
Ephemeris wraps the NOVAS library and any other ephemeris related functions into a simple to use class. More... | |
class | EphemerisException |
An exception indicating that a unit conversion failed because the units were not conformable. More... | |
class | FluxDensity |
The FluxDensity class is used to represent a flux density in any units. More... | |
class | FluxSource |
FluxSource holds a measurement of a flux calibrator source. More... | |
class | FreqDependent225GHz |
Simple frequency dependent opacity model for 1mm observations. More... | |
class | Frequency |
The Frequency class can represent any frequency in any units. More... | |
class | Global |
The Global class contains methods that return "fixed" CARMA values, such as the numbers of each type of antenna. More... | |
class | HourAngle |
The HourAngle class extends carma::services::Angle to specifically support hour angles. More... | |
class | IERSTable |
class to access (processed) IERS tables The IERSTable class reads a (processed by mk-iers.awk) IERS table and allows rapid searching in MJD to return the dut1, xpolar and ypolar wobbles. More... | |
class | Length |
The Length class can represent a length in any units. More... | |
class | Location |
Location specifies a location (observatory if you wish) on planet earth, as longitude, latitude, and altitude above sea-level. More... | |
class | Matrix |
This class handles standard mathematical matrix operations. More... | |
class | Neighbor |
Data on nearest neighbor to a source. More... | |
class | Observatory |
Observatory specifies the parameters of a given observatory: name, reference location (longitude, latitude, altitude), optional pad names and locations, and optional array configurations. More... | |
class | OpacityModel |
An atmospheric model is used to estimate atmospheric opacity given local environment variables ( temperature, pressure, etc ) and observing variables ( frequency ). More... | |
class | Pad |
This class specifies an antenna pad or station with coordinates, name, and array configuration membership. More... | |
class | Planet |
Proposed planet class. More... | |
class | Pressure |
The Pressure class can represent any pressure in any units. More... | |
class | Selfcal |
Computes an amplitude or phase selfcal solution on a set of visibilities. More... | |
class | SimpleOpacityModel |
Simple first cut placeholder for the CARMA opacity model. More... | |
class | Source |
Source is derived from CatalogEntry and is used to hold information for a particular entry from a source catalog. More... | |
class | SourceCatalog |
The SourceCatalog class is used to hold information regarding a particular source catalog file as retrieved from a Catalog. More... | |
class | SourceChecker |
Source checker returns info on the location in the sky of a source at a given time, e.g. More... | |
class | SourceNotFoundException |
An exception indicating that a source could not be found in the catalog nor as solar system body. More... | |
class | SpectralLine |
SpectralLine is derived from CatalogEntry and is used to hold information for a particular entry from a line catalog. More... | |
class | SpectralLineCatalog |
This class extracts information from a spectral line catalog file and puts it into a multimap for later searches. More... | |
class | SpectralLineNotFoundException |
An exception indicating that a spectral line could not be found in the catalog. More... | |
class | Star |
Star holds the name and magnitude of a star. More... | |
class | Table |
Simple ASCII Table format, fully memory based. More... | |
class | TelescopeStatus |
Holds information about the telescope status with respect to azimuth wrap and upper elevation limits. More... | |
class | Temperature |
The Temperature class represents a temperature in any unit. More... | |
class | Units |
This class is based on the GNU units library. More... | |
class | UnsupportedCoordSysException |
An exception indicating that a unit conversion failed because the units were not conformable. More... | |
class | Vector |
This class handles standard mathematical vector operations. More... | |
class | Velocity |
The Velocity class can represent an velocity in any units. More... | |
class | Waters90GHz |
Simple coeficient based opacity model at 90 GHz from Waters as described in TMS table 13.1. More... | |
class | Woody119GHzO2Line |
Opacity model based on a simple model entitled "119 GHz Atmpospheric
Oxygen Line" by Dave Woody dated 4 Jan 1989. More... | |
Typedefs | |
typedef enum carma::services::AntennaCoordinateTypeEnum | AntennaCoordinateType |
typedef enum carma::services::AzWrapTypeEnum | AzWrapType |
mirror drive mode wrap types More... | |
typedef std::complex< double > | Complex |
convenient definition of a complex number. More... | |
typedef enum carma::services::coordSysEnum | coordSysType |
The coordinate systems. More... | |
typedef std::string | DmsType |
A string of form "degrees:minutes:seconds", i.e., DD:MM:SS(.sss) More... | |
typedef enum carma::services::ephemTableEnum | ephemTableType |
Ephemeris table type. More... | |
typedef std::string | HmsType |
A string of form "hours:minutes:seconds", i.e., HH:MM:SS(.sss) More... | |
typedef enum carma::services::interpolationTypeEnum | interpolationType |
typedef ::std::set < carma::services::Neighbor > | NeighborSet |
typedef ::std::map < ::std::string, carma::services::Pad > ::const_iterator | PadIterator |
A const iterator over a map of Pads. More... | |
typedef ::std::map < ::std::string, carma::services::Source > ::const_iterator | SourceIterator |
A const iterator over a map of Sources. More... | |
typedef enum carma::services::sourcePntEnum | sourcePntType |
Can this source be used for RADIO and/or OPTICAL pointing? More... | |
typedef ::std::multimap < ::std::string, carma::services::SpectralLine > ::const_iterator | SpectralLineIterator |
A const iterator over a map of Spectral Lines. More... | |
typedef enum carma::services::TelescopeLimitsTypeEnum | TelescopeLimitsType |
typedef enum carma::services::velocityDefEnum | velocityDefType |
The Velocity Definition. More... | |
typedef enum carma::services::velocityFrameEnum | velocityFrameType |
The Velocity Frame. More... | |
Enumerations | |
enum | AntennaCoordinateTypeEnum { ANTCOORD_LLA, ANTCOORD_UEN, ANTCOORD_TOPO_XYZ, ANTCOORD_GEO_XYZ } |
enum | AntennaType { ANT_TYPE_BIMA, ANT_TYPE_OVRO, ANT_TYPE_SZA } |
Enumeration of possible types for antennas. More... | |
enum | AzWrapTypeEnum { AZWRAP_ADD, AZWRAP_SUB, AZWRAP_ZERO } |
enum | coordSysEnum { COORDSYS_RADEC, COORDSYS_GALACTIC, COORDSYS_AZEL } |
enum | ephemTableEnum { EPHEM_SZA, EPHEM_VECTORS, EPHEM_RADEC, EPHEM_UNKNOWN } |
enum | interpolationTypeEnum { LINEAR, POLYNOMIAL, CSPLINE, CSPLINE_PERIODIC, AKIMA, AKIMA_PERIODIC } |
enum | sourcePntEnum { PNT_RADIO, PNT_OPTICAL, PNT_BOTH } |
enum | TelescopeLimitsTypeEnum { LIMIT_NEVER_RISES, LIMIT_HORIZON_STOP, LIMIT_AZ_HORIZON_STOP, LIMIT_AZ_STOP, NO_LIMIT } |
enum | velocityDefEnum { VEL_RADIO, VEL_OPTICAL, VEL_Z, VEL_RELATIVISTIC } |
enum | velocityFrameEnum { FRAME_LSR, FRAME_TOPOGRAPHIC, FRAME_BARYCENTRIC, FRAME_HELIOCENTRIC, FRAME_PLANETARY } |
Functions | |
Angle | acos (double x) |
Location | adjustedLocation (Pad pad, Length east, Length north, Length up) |
Compute the new location of a Pad plus offsets. More... | |
Location | adjustedLocation (Location loc, Length east, Length north, Length up) |
Compute the new location of a Location plus offsets. More... | |
Angle | asin (double x) |
Angle | atan (double x) |
Angle | atan2 (double x, double y) |
double | bracewellJinc (double x) |
Bracewell's jinc function = J1(pi*x)/(2*x) More... | |
double | chat (double x) |
Calculate Bracewell's "Chinese hat" function: chat(x) = 0.5*(acos(x)-abs(x)*sqrt(1-x*x)) This is the autocorrelation of uniform disks. More... | |
std::vector< Length * > | convertBaseline (Pad pad, Length X, Length Y, Length Z) |
Take an X, Y, Z topographic position and convert it to ENU offsets, given a Pad location. More... | |
double | cos (const Angle &angle) |
std::string | defaultPadName (const unsigned short padNo) |
@ return the default pad name for this CARMA pad. More... | |
std::string | EphemFile (const std::string &sourceName) |
find out if a source is in an ephemeris table derived from JPL's HORIZON's system. More... | |
bool | isEphem (const std::string &sourceName) |
return if a sourcename is an ephemeris source. More... | |
bool | isFixed (const std::string &sourceName) |
return if source is a supported fixed source (e.g. More... | |
bool | isPlanet (const std::string &sourceName) |
return if source is a proper solar system body. More... | |
double | jinc (double x) |
Calculates the "jinc" function which is J1(x)/x, where J1(x) is the Bessel function of the first kind. More... | |
template<class type > | |
Vector< type > | operator* (Vector< type > &vec, Matrix< type > &mat) |
Define a vector left-multiplication operator. More... | |
template<class type > | |
Matrix< type > | operator* (unsigned fac, Matrix< type > &mat) |
Define a generic left-multiplication operator. More... | |
template<class type > | |
Matrix< type > | operator* (int fac, Matrix< type > &mat) |
template<class type > | |
Matrix< type > | operator* (float fac, Matrix< type > &mat) |
template<class type > | |
Matrix< type > | operator* (double fac, Matrix< type > &mat) |
const Angle | operator* (double left, const Angle &right) |
const Angle | operator* (const Angle &left, double right) |
template<class type > | |
std::ostream & | operator<< (std::ostream &os, const Vector< type > &vec) |
...................................................................... More... | |
template<class type > | |
std::ostream & | operator<< (std::ostream &os, Matrix< type > &mat) |
Print out a matrix to a stream. More... | |
template<class type > | |
std::ostringstream & | operator<< (std::ostringstream &os, const Vector< type > &vec) |
Print out a vector. More... | |
template<class type > | |
std::ostringstream & | operator<< (std::ostringstream &os, Matrix< type > &mat) |
Print out a matrix to an ostringstream. More... | |
std::ostream & | operator<< (std::ostream &os, const carma::services::AngularRate &ar) |
Define the << operator to allow, e.g. More... | |
std::ostream & | operator<< (std::ostream &os, const carma::services::DecAngle &angle) |
Define the << operator to allow, e.g. More... | |
std::ostream & | operator<< (std::ostream &os, const carma::services::FluxDensity &flux) |
Define << operator for easy output. More... | |
std::ostream & | operator<< (std::ostream &os, const carma::services::Length &length) |
Define the << operator to allow, e.g. More... | |
std::ostream & | operator<< (std::ostream &os, const carma::services::Pressure &pressure) |
Define the << operator to allow, e.g. More... | |
::std::ostream & | operator<< (::std::ostream &os, const carma::services::Neighbor &neighbor) |
Output stream operator. More... | |
std::ostream & | operator<< (std::ostream &os, const carma::services::Distance &distance) |
Define the << operator to allow, e.g. More... | |
std::ostream & | operator<< (std::ostream &os, const carma::services::Temperature &t) |
Define the << operator to allow, e.g. More... | |
std::ostream & | operator<< (std::ostream &os, Delay delay) |
std::ostream & | operator<< (std::ostream &os, const carma::services::Frequency &frequency) |
Define the << operator to allow, e.g. More... | |
std::ostream & | operator<< (std::ostream &os, ConformableQuantity &quantity) |
Define the << operator to allow, e.g. More... | |
std::ostream & | operator<< (std::ostream &os, const carma::services::Location &location) |
Define the << operator to allow, e.g. More... | |
std::ostream & | operator<< (std::ostream &os, const carma::services::HourAngle &hourangle) |
Define the << operator to allow, e.g. More... | |
std::ostream & | operator<< (std::ostream &os, const carma::services::Velocity &velocity) |
Define the << operator to allow, e.g. More... | |
std::ostream & | operator<< (std::ostream &os, const carma::services::Angle &angle) |
Define the << operator to allow, e.g. More... | |
std::ostream & | operator<< (std::ostream &os, carma::services::Source &source) |
Define the << operator to allow, e.g. More... | |
double | pchat (double x) |
Polynomial approximation to Bracewell's Chinese hat function, from MIRIAD. More... | |
double | sin (const Angle &angle) |
Convenient trigonometric functions utilizing the Angle class. More... | |
double | tan (const Angle &angle) |
Auxiliary Services is intended to provide routines commonly needed for array control and observational planning.
These routines are mostly, but not exclusively, astronomical in nature. Auxiliary Services contains a mixture of new code, reused code, and wrappers for external libraries. Briefly, these services are
mirror drive mode wrap types
The coordinate systems.
Ephemeris table type.
typedef ::std::map< ::std::string, carma::services::Pad >::const_iterator carma::services::PadIterator |
typedef ::std::map< ::std::string, carma::services::Source >::const_iterator carma::services::SourceIterator |
Can this source be used for RADIO and/or OPTICAL pointing?
typedef ::std::multimap< ::std::string, carma::services::SpectralLine >::const_iterator carma::services::SpectralLineIterator |
The Velocity Definition.
Location carma::services::adjustedLocation | ( | Pad | pad, |
Length | east, | ||
Length | north, | ||
Length | up | ||
) |
Compute the new location of a Pad plus offsets.
pad | The Pad from which to compute the new location. |
east | The east coordinate, relative to the Pad location. |
up | The up coordinate, relative to the Pad location. |
north | The north coordinate, relative to the Pad location. |
Location carma::services::adjustedLocation | ( | Location | loc, |
Length | east, | ||
Length | north, | ||
Length | up | ||
) |
Compute the new location of a Location plus offsets.
loc The Location from which to compute the new location.
east | The east coordinate, relative to the Pad location. |
up | The up coordinate, relative to the Pad location. |
north | The north coordinate, relative to the Pad location. |
double carma::services::bracewellJinc | ( | double | x | ) |
Bracewell's jinc function = J1(pi*x)/(2*x)
x | The argument for the function. |
double carma::services::chat | ( | double | x | ) |
Calculate Bracewell's "Chinese hat" function:
chat(x) = 0.5*(acos(x)-abs(x)*sqrt(1-x*x))
This is the autocorrelation of uniform disks.
x | The argument for the function. |
std::vector<Length*> carma::services::convertBaseline | ( | Pad | pad, |
Length | X, | ||
Length | Y, | ||
Length | Z | ||
) |
Take an X, Y, Z topographic position and convert it to ENU offsets, given a Pad location.
The reference position for the array (i.e. for X, Y and Z) is assumed to be that returned by pad.getReference(). pad The Pad from which to compute the new location.
X | The X coordinate, relative to the Pad reference position. |
Y | The Y coordinate, relative to the Pad reference position. |
Z | The Z coordinate, relative to the Pad reference position. |
std::string carma::services::defaultPadName | ( | const unsigned short | padNo | ) |
@ return the default pad name for this CARMA pad.
e.g. "pad#22" for padNo = 22.
std::string carma::services::EphemFile | ( | const std::string & | sourceName | ) |
find out if a source is in an ephemeris table derived from JPL's HORIZON's system.
These tables are typically valid in a short (few months/years) time interval, e.g. comets, a sunspot etc. and are stored as <sourceName>.ephem files in /array/rt/catalogs, [$CARMA/conf/catalogs/observer] $CARMA/conf/catalogs and the current directory (useful for testing). Normally the sourceName is tried in upper case , but the given case is tried as well. Ephem files need to be in VECTORS format, though some support for RADEC style tables is present but not in use.
bool carma::services::isEphem | ( | const std::string & | sourceName | ) |
return if a sourcename is an ephemeris source.
these are assumed generated from an ephemeris service and are solar system bodies (or things like sunspots)
bool carma::services::isFixed | ( | const std::string & | sourceName | ) |
return if source is a supported fixed source (e.g.
transmitter) Fixed source need a Long,Lat,Elev from the source catalog from which a nominal Az,El can be computed, and would need a Ephemeris object to achieve this.
bool carma::services::isPlanet | ( | const std::string & | sourceName | ) |
return if source is a proper solar system body.
Apart from doppler tracking differences, Planets also have size properties which Ephem sources do not have, hence two different functions for solar system objects.
double carma::services::jinc | ( | double | x | ) |
Calculates the "jinc" function which is J1(x)/x, where J1(x) is the Bessel function of the first kind.
This is the Fourier Transform of a uniform disk. This method uses the polynomial approximation from Abramowitz and Stegun, Handbook of Mathematical Functions, sections 9.4.4 and 9.4.6, page 370. The maximum error approximation in the approximation is: 1.0E-7 for abs(x) >= 3.0
1.3E-8 for abs(x) < 3.0
x | The argument for the function. |
Time per call on 1 GHz/512MB = 0.7 to 2.5 nanoseconds depending on the value of x. This takes about half the time of using the C library function j1().
IllegalArgumentException | if x is zero. |
Vector< type > carma::services::operator* | ( | Vector< type > & | vec, |
Matrix< type > & | mat | ||
) |
Matrix< type > carma::services::operator* | ( | unsigned | fac, |
Matrix< type > & | mat | ||
) |
std::ostream & carma::services::operator<< | ( | std::ostream & | os, |
const Vector< type > & | vec | ||
) |
std::ostream & carma::services::operator<< | ( | std::ostream & | os, |
Matrix< type > & | mat | ||
) |
std::ostringstream & carma::services::operator<< | ( | std::ostringstream & | os, |
const Vector< type > & | vec | ||
) |
std::ostringstream & carma::services::operator<< | ( | std::ostringstream & | os, |
Matrix< type > & | mat | ||
) |
std::ostream& carma::services::operator<< | ( | std::ostream & | os, |
const carma::services::AngularRate & | ar | ||
) |
Define the << operator to allow, e.g.
cout << AngularRate
std::ostream& carma::services::operator<< | ( | std::ostream & | os, |
const carma::services::DecAngle & | angle | ||
) |
Define the << operator to allow, e.g.
cout << DecAngle
std::ostream& carma::services::operator<< | ( | std::ostream & | os, |
const carma::services::FluxDensity & | flux | ||
) |
Define << operator for easy output.
std::ostream& carma::services::operator<< | ( | std::ostream & | os, |
const carma::services::Length & | length | ||
) |
Define the << operator to allow, e.g.
cout << Length
std::ostream& carma::services::operator<< | ( | std::ostream & | os, |
const carma::services::Pressure & | pressure | ||
) |
Define the << operator to allow, e.g.
cout << Pressure
::std::ostream& carma::services::operator<< | ( | ::std::ostream & | os, |
const carma::services::Neighbor & | neighbor | ||
) |
Output stream operator.
std::ostream& carma::services::operator<< | ( | std::ostream & | os, |
const carma::services::Distance & | distance | ||
) |
Define the << operator to allow, e.g.
cout << Distance
std::ostream& carma::services::operator<< | ( | std::ostream & | os, |
const carma::services::Temperature & | t | ||
) |
Define the << operator to allow, e.g.
cout << Temperature
std::ostream& carma::services::operator<< | ( | std::ostream & | os, |
const carma::services::Frequency & | frequency | ||
) |
Define the << operator to allow, e.g.
cout << Frequency
std::ostream& carma::services::operator<< | ( | std::ostream & | os, |
ConformableQuantity & | quantity | ||
) |
Define the << operator to allow, e.g.
cout << ConformableQuantity.
std::ostream& carma::services::operator<< | ( | std::ostream & | os, |
const carma::services::Location & | location | ||
) |
Define the << operator to allow, e.g.
cout << Location
std::ostream& carma::services::operator<< | ( | std::ostream & | os, |
const carma::services::HourAngle & | hourangle | ||
) |
Define the << operator to allow, e.g.
cout << HourAngle
std::ostream& carma::services::operator<< | ( | std::ostream & | os, |
const carma::services::Velocity & | velocity | ||
) |
Define the << operator to allow, e.g.
cout << Velocity
std::ostream& carma::services::operator<< | ( | std::ostream & | os, |
const carma::services::Angle & | angle | ||
) |
Define the << operator to allow, e.g.
cout << Angle
std::ostream& carma::services::operator<< | ( | std::ostream & | os, |
carma::services::Source & | source | ||
) |
Define the << operator to allow, e.g.
cout << Source
double carma::services::pchat | ( | double | x | ) |
Polynomial approximation to Bracewell's Chinese hat function, from MIRIAD.
This is actually a poor approximation, not better than 1E-3.
x | The argument for the function. |
double carma::services::sin | ( | const Angle & | angle | ) |
Convenient trigonometric functions utilizing the Angle class.
All throw ErrorException or IllegalArgumentException on failure.