lsst.afw  13.0-73-gb2a4e38
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Namespaces | Classes | Enumerations | Functions
lsst::afw::coord Namespace Reference

Namespaces

 coord
 
 coordLib
 
 utils
 

Classes

class  Coord
 This is the base class for spherical coordinates. More...
 
class  IcrsCoord
 A class to handle Icrs coordinates (inherits from Coord) More...
 
class  Fk5Coord
 A class to handle Fk5 coordinates (inherits from Coord) More...
 
class  GalacticCoord
 A class to handle Galactic coordinates (inherits from Coord) More...
 
class  EclipticCoord
 A class to handle Ecliptic coordinates (inherits from Coord) More...
 
class  TopocentricCoord
 A class to handle topocentric (AltAz) coordinates (inherits from Coord) More...
 
class  Observatory
 Hold the location of an observatory. More...
 
class  Weather
 Basic weather information sufficient for a simple model for air mass or refraction. More...
 

Enumerations

enum  CoordSystem {
  UNKNOWN = -1, FK5, ICRS, GALACTIC,
  ECLIPTIC, TOPOCENTRIC
}
 

Functions

CoordSystem makeCoordEnum (std::string const system)
 A utility function to get the enum value of a coordinate system from a string name. More...
 
std::shared_ptr< Coord > makeCoord (CoordSystem const system, lsst::afw::geom::Angle const ra, lsst::afw::geom::Angle const dec, double const epoch)
 Factory function to create a Coord of arbitrary type with decimal RA,Dec. More...
 
std::shared_ptr< Coord > makeCoord (CoordSystem const system, std::string const ra, std::string const dec, double const epoch)
 Factory function to create a Coord of arbitrary type with string RA [in degrees, not hours!], Dec. More...
 
std::shared_ptr< Coord > makeCoord (CoordSystem const system, lsst::afw::geom::Point2D const &p2d, lsst::afw::geom::AngleUnit unit, double const epoch)
 Factory function to create a Coord of arbitrary type with Point2D. More...
 
std::shared_ptr< Coord > makeCoord (CoordSystem const system, lsst::afw::geom::Point3D const &p3d, double const epoch, bool normalize=true, lsst::afw::geom::Angle const defaultLongitude=lsst::afw::geom::Angle(0.))
 Factory function to create a Coord of arbitrary type with a Point3D. More...
 
std::shared_ptr< Coord > makeCoord (CoordSystem const system)
 Lightweight factory to make an empty coord. More...
 
std::shared_ptr< Coord > makeCoord (CoordSystem const system, lsst::afw::geom::Angle const ra, lsst::afw::geom::Angle const dec)
 Factory function to create a Coord of arbitrary type with decimal RA,Dec in degrees. More...
 
std::shared_ptr< Coord > makeCoord (CoordSystem const system, std::string const ra, std::string const dec)
 Factory function to create a Coord of arbitrary type with string RA [in degrees, not hours!], Dec. More...
 
std::shared_ptr< Coord > makeCoord (CoordSystem const system, lsst::afw::geom::Point2D const &p2d, lsst::afw::geom::AngleUnit unit)
 Factory function to create a Coord of arbitrary type with Point2D. More...
 
std::shared_ptr< Coord > makeCoord (CoordSystem const system, lsst::afw::geom::Point3D const &p3d, bool normalize=true, lsst::afw::geom::Angle const defaultLongitude=lsst::afw::geom::Angle(0.))
 Factory function to create a Coord of arbitrary type with a Point3D. More...
 
std::shared_ptr< Coord > averageCoord (std::vector< std::shared_ptr< Coord const >> const coords, CoordSystem system=UNKNOWN)
 Return average of a list of coordinates. More...
 
lsst::afw::geom::Angle eclipticPoleInclination (double const epoch)
 get the inclination of the ecliptic pole (obliquity) at epoch More...
 
lsst::afw::geom::Angle dmsStringToAngle (std::string const dms)
 Convert a dd:mm:ss string to Angle. More...
 
lsst::afw::geom::Angle hmsStringToAngle (std::string const hms)
 Convert a hh:mm:ss string to Angle. More...
 
std::string angleToDmsString (lsst::afw::geom::Angle const deg)
 a Function to convert a coordinate in decimal degrees to a string with form dd:mm:ss More...
 
std::string angleToHmsString (lsst::afw::geom::Angle const deg)
 a function to convert decimal degrees to a string with form hh:mm:ss.s More...
 
std::ostream & operator<< (std::ostream &os, Coord const &coord)
 
bool operator!= (Coord const &lhs, Coord const &rhs)
 Inequality; the complement of equality. More...
 
std::ostream & operator<< (std::ostream &os, Observatory const &obs)
 Print an Observatory to the stream. More...
 
std::ostream & operator<< (std::ostream &os, Weather const &weath)
 print a Weather to an output stream More...
 
 PYBIND11_PLUGIN (_observatory)
 
 PYBIND11_PLUGIN (_weather)
 

Enumeration Type Documentation

Enumerator
UNKNOWN 
FK5 
ICRS 
GALACTIC 
ECLIPTIC 
TOPOCENTRIC 

Definition at line 48 of file Coord.h.

Function Documentation

std::string lsst::afw::coord::angleToDmsString ( lsst::afw::geom::Angle const  deg)

a Function to convert a coordinate in decimal degrees to a string with form dd:mm:ss

Todo:
allow a user specified format

Definition at line 249 of file Coord.cc.

std::string lsst::afw::coord::angleToHmsString ( lsst::afw::geom::Angle const  deg)

a function to convert decimal degrees to a string with form hh:mm:ss.s

Definition at line 251 of file Coord.cc.

std::shared_ptr< Coord > lsst::afw::coord::averageCoord ( std::vector< std::shared_ptr< Coord const >> const  coords,
CoordSystem  system = UNKNOWN 
)

Return average of a list of coordinates.

Parameters
[in]coordslist of coords to average
[in]systemcoordinate system of returned result; if UNKNOWN then all input coordinates must have the same coordinate system, which is used for the result
Exceptions
lsst::pex::exceptions::InvalidParameterErrorif system is UNKNOWN and the coords do not all have the same coordinate system

Definition at line 995 of file Coord.cc.

geom::Angle lsst::afw::coord::dmsStringToAngle ( std::string const  dms)

Convert a dd:mm:ss string to Angle.

Parameters
dmsCoord as a string in dd:mm:ss format

Definition at line 284 of file Coord.cc.

geom::Angle lsst::afw::coord::eclipticPoleInclination ( double const  epoch)

get the inclination of the ecliptic pole (obliquity) at epoch

Parameters
epochdesired epoch for inclination

Definition at line 286 of file Coord.cc.

geom::Angle lsst::afw::coord::hmsStringToAngle ( std::string const  hms)

Convert a hh:mm:ss string to Angle.

Definition at line 282 of file Coord.cc.

std::shared_ptr< Coord > lsst::afw::coord::makeCoord ( CoordSystem const  system,
lsst::afw::geom::Angle const  ra,
lsst::afw::geom::Angle const  dec,
double const  epoch 
)

Factory function to create a Coord of arbitrary type with decimal RA,Dec.

Parameters
systemthe system (equ, fk5, galactic ..)
raright ascension
decdeclination
epochepoch of coordinate
Note
This factory allows the epoch to be specified but will throw if used with ICRS or Galactic
Most of the other factories (which accept epochs) just call this one indirectly.

Definition at line 840 of file Coord.cc.

std::shared_ptr< Coord > lsst::afw::coord::makeCoord ( CoordSystem const  system,
std::string const  ra,
std::string const  dec,
double const  epoch 
)

Factory function to create a Coord of arbitrary type with string RA [in degrees, not hours!], Dec.

Parameters
systemthe system (equ, fk5, galactic ..)
raright ascension
decdeclination
epochepoch of coordinate
Note
This factory accepts epoch. There is an overloaded version which uses a default.

Definition at line 927 of file Coord.cc.

std::shared_ptr< Coord > lsst::afw::coord::makeCoord ( CoordSystem const  system,
lsst::afw::geom::Point2D const &  p2d,
lsst::afw::geom::AngleUnit  unit,
double const  epoch 
)

Factory function to create a Coord of arbitrary type with Point2D.

Parameters
systemthe system (equ, fk5, galactic ..)
p2dthe (eg) ra,dec in a Point2D
unitthe units (eg. degrees, radians)
epochepoch of coordinate
Note
This factory accepts epoch. There is an overloaded version which uses a default.

Definition at line 908 of file Coord.cc.

std::shared_ptr< Coord > lsst::afw::coord::makeCoord ( CoordSystem const  system,
lsst::afw::geom::Point3D const &  p3d,
double const  epoch,
bool  normalize = true,
lsst::afw::geom::Angle const  defaultLongitude = lsst::afw::geom::Angle(0.) 
)

Factory function to create a Coord of arbitrary type with a Point3D.

Parameters
systemthe system (equ, fk5, galactic ..)
p3dthe coord in Point3D format
epochepoch of coordinate
normalizenormalize the p3d provided
defaultLongitudelongitude to use if x=y=0
Note
This factory accepts epoch. There is an overloaded version which uses a default.

Definition at line 897 of file Coord.cc.

std::shared_ptr< Coord > lsst::afw::coord::makeCoord ( CoordSystem const  system)

Lightweight factory to make an empty coord.

Parameters
systemthe system (FK5, ICRS, etc)

Definition at line 935 of file Coord.cc.

std::shared_ptr< Coord > lsst::afw::coord::makeCoord ( CoordSystem const  system,
lsst::afw::geom::Angle const  ra,
lsst::afw::geom::Angle const  dec 
)

Factory function to create a Coord of arbitrary type with decimal RA,Dec in degrees.

Parameters
systemthe system (equ, fk5, galactic ..)
raright ascension
decdeclination
Note
This factory assumes a default epoch
Most of the other factories (which don't accept epoch) call this one.

Definition at line 870 of file Coord.cc.

std::shared_ptr< Coord > lsst::afw::coord::makeCoord ( CoordSystem const  system,
std::string const  ra,
std::string const  dec 
)

Factory function to create a Coord of arbitrary type with string RA [in degrees, not hours!], Dec.

Parameters
systemthe system (equ, fk5, galactic ..)
raright ascension
decdeclination
Note
This factory uses a default epoch. There is an overloaded version which accepts an epoch.

Definition at line 931 of file Coord.cc.

std::shared_ptr< Coord > lsst::afw::coord::makeCoord ( CoordSystem const  system,
lsst::afw::geom::Point2D const &  p2d,
lsst::afw::geom::AngleUnit  unit 
)

Factory function to create a Coord of arbitrary type with Point2D.

Parameters
systemthe system (equ, fk5, galactic ..)
p2dthe (eg) ra,dec in a Point2D
unitthe units (eg. degrees, radians)
Note
This factory uses a default epoch. There is an overloaded version which accepts an epoch.

Definition at line 918 of file Coord.cc.

std::shared_ptr< Coord > lsst::afw::coord::makeCoord ( CoordSystem const  system,
lsst::afw::geom::Point3D const &  p3d,
bool  normalize = true,
lsst::afw::geom::Angle const  defaultLongitude = lsst::afw::geom::Angle(0.) 
)

Factory function to create a Coord of arbitrary type with a Point3D.

Parameters
systemthe system (equ, fk5, galactic ..)
p3dthe coord in Point3D format
normalizenormalize the p3d provided
defaultLongitudelongitude to use if x=y=0
Note
This factory uses a default epoch. There is an overloaded version which accepts an epoch.

Definition at line 902 of file Coord.cc.

CoordSystem lsst::afw::coord::makeCoordEnum ( std::string const  system)

A utility function to get the enum value of a coordinate system from a string name.

Definition at line 112 of file Coord.cc.

bool lsst::afw::coord::operator!= ( Coord const &  lhs,
Coord const &  rhs 
)
inline

Inequality; the complement of equality.

Definition at line 818 of file Coord.h.

std::ostream & lsst::afw::coord::operator<< ( std::ostream &  os,
Weather const &  weath 
)

print a Weather to an output stream

Definition at line 52 of file Weather.cc.

std::ostream & lsst::afw::coord::operator<< ( std::ostream &  os,
Observatory const &  obs 
)

Print an Observatory to the stream.

Parameters
[in,out]osStream to print to
[in]obsthe Observatory to print

Definition at line 67 of file Observatory.cc.

std::ostream & lsst::afw::coord::operator<< ( std::ostream &  os,
Coord const &  coord 
)

Definition at line 967 of file Coord.cc.

lsst::afw::coord::PYBIND11_PLUGIN ( _observatory  )

Definition at line 34 of file observatory.cc.

lsst::afw::coord::PYBIND11_PLUGIN ( _weather  )

Definition at line 36 of file weather.cc.