lsst.afw  14.0-58-g91bfccb15
Public Member Functions | List of all members
lsst::afw::coord::EclipticCoord Class Reference

A class to handle Ecliptic coordinates (inherits from Coord) More...

#include <Coord.h>

Inheritance diagram for lsst::afw::coord::EclipticCoord:
lsst::afw::coord::Coord

Public Member Functions

 EclipticCoord (lsst::afw::geom::Point2D const &p2d, lsst::afw::geom::AngleUnit unit=lsst::afw::geom::degrees, double const epoch=2000.0)
 
 EclipticCoord (lsst::afw::geom::Point3D const &p3d, double const epoch=2000.0, bool normalize=true, lsst::afw::geom::Angle const defaultLongitude=lsst::afw::geom::Angle(0.))
 
 EclipticCoord (lsst::afw::geom::Angle const lamb, lsst::afw::geom::Angle const beta, double const epoch=2000.0)
 
 EclipticCoord (std::string const lamb, std::string const beta, double const epoch=2000.0)
 
 EclipticCoord ()=default
 
virtual ~EclipticCoord ()=default
 
 EclipticCoord (EclipticCoord const &)=default
 
 EclipticCoord (EclipticCoord &&)=default
 
EclipticCoord & operator= (EclipticCoord const &)=default
 
EclipticCoord & operator= (EclipticCoord &&)=default
 
virtual std::shared_ptr< Coord > clone () const
 
virtual std::string getClassName () const
 
virtual CoordSystem getCoordSystem () const
 
virtual std::pair< std::string, std::string > getCoordNames () const
 
lsst::afw::geom::Angle getLambda () const
 
lsst::afw::geom::Angle getBeta () const
 
std::string getLambdaStr (lsst::afw::geom::AngleUnit unit) const
 
std::string getBetaStr () const
 
virtual Fk5Coord toFk5 (double const epoch) const
 Convert ourself from Ecliptic to Fk5 (precess to new epoch) More...
 
virtual Fk5Coord toFk5 () const
 Convert ourself from Ecliptic to Fk5 (use current epoch) More...
 
virtual EclipticCoord toEcliptic (double const epoch) const
 Convert ourself from Ecliptic to Ecliptic ... More...
 
virtual EclipticCoord toEcliptic () const
 Convert ourself from Ecliptic to Ecliptic ... More...
 
EclipticCoord precess (double const epochTo) const
 precess to new epoch More...
 
virtual void reset (lsst::afw::geom::Angle const longitude, lsst::afw::geom::Angle const latitude)
 
virtual void reset (lsst::afw::geom::Angle const longitude, lsst::afw::geom::Angle const latitude, double const epoch)
 Reset our coordinates wholesale. More...
 
double getEpoch () const
 
lsst::afw::geom::Point2D getPosition (lsst::afw::geom::AngleUnit unit=lsst::afw::geom::degrees) const
 Return our contents in a Point2D object. More...
 
lsst::afw::geom::Point3D getVector () const
 Return our contents in a position vector. More...
 
virtual std::string toString () const
 Get string representation. More...
 
lsst::afw::geom::Angle operator[] (int const index) const
 Provide access to our contents via an index. More...
 
bool operator== (Coord const &rhs) const
 Equality operator, compares each element directly. More...
 
lsst::afw::geom::Angle getLongitude () const
 The main access method for the longitudinal coordinate. More...
 
lsst::afw::geom::Angle getLatitude () const
 The main access method for the latitudinal coordinate. More...
 
std::string getLongitudeStr (lsst::afw::geom::AngleUnit unit) const
 Allow quick access to the longitudinal coordinate as a string. More...
 
std::string getLatitudeStr () const
 Allow quick access to the longitude coordinate as a string. More...
 
Coord transform (Coord const &poleTo, Coord const &poleFrom) const
 Transform our current coords to another spherical polar system. More...
 
lsst::afw::geom::Angle angularSeparation (Coord const &c) const
 compute the angular separation between two Coords More...
 
std::pair< lsst::afw::geom::Angle, lsst::afw::geom::Angle > getOffsetFrom (Coord const &c) const
 Compute the offset from a coordinate. More...
 
std::pair< lsst::afw::geom::Angle, lsst::afw::geom::Angle > getTangentPlaneOffset (Coord const &c) const
 Get the offset on the tangent plane. More...
 
void rotate (Coord const &axis, lsst::afw::geom::Angle const theta)
 Rotate our current coords about a pole. More...
 
lsst::afw::geom::Angle offset (lsst::afw::geom::Angle const phi, lsst::afw::geom::Angle const arcLen)
 offset our current coords along a great circle defined by an angle wrt a declination parallel More...
 
std::shared_ptr< Coord > convert (CoordSystem system, double epoch=2000) const
 Convert to a specified Coord type at a specified epoch. More...
 
virtual IcrsCoord toIcrs () const
 Convert ourself to ICRS: RA, Dec (basically J2000) More...
 
virtual GalacticCoord toGalactic () const
 Convert ourself to Galactic: l, b. More...
 
virtual TopocentricCoord toTopocentric (Observatory const &obs, lsst::daf::base::DateTime const &obsDate) const
 Convert ourself to Altitude/Azimuth: alt, az. More...
 

Detailed Description

A class to handle Ecliptic coordinates (inherits from Coord)

Definition at line 490 of file Coord.h.

Constructor & Destructor Documentation

◆ EclipticCoord() [1/7]

lsst::afw::coord::EclipticCoord::EclipticCoord ( lsst::afw::geom::Point2D const &  p2d,
lsst::afw::geom::AngleUnit  unit = lsst::afw::geom::degrees,
double const  epoch = 2000.0 
)
inline

Definition at line 492 of file Coord.h.

◆ EclipticCoord() [2/7]

lsst::afw::coord::EclipticCoord::EclipticCoord ( lsst::afw::geom::Point3D const &  p3d,
double const  epoch = 2000.0,
bool  normalize = true,
lsst::afw::geom::Angle const  defaultLongitude = lsst::afw::geom::Angle(0.) 
)
inline

Definition at line 495 of file Coord.h.

◆ EclipticCoord() [3/7]

lsst::afw::coord::EclipticCoord::EclipticCoord ( lsst::afw::geom::Angle const  lamb,
lsst::afw::geom::Angle const  beta,
double const  epoch = 2000.0 
)
inline

Definition at line 500 of file Coord.h.

◆ EclipticCoord() [4/7]

lsst::afw::coord::EclipticCoord::EclipticCoord ( std::string const  lamb,
std::string const  beta,
double const  epoch = 2000.0 
)
inline

Definition at line 503 of file Coord.h.

◆ EclipticCoord() [5/7]

lsst::afw::coord::EclipticCoord::EclipticCoord ( )
default

◆ ~EclipticCoord()

virtual lsst::afw::coord::EclipticCoord::~EclipticCoord ( )
virtualdefault

◆ EclipticCoord() [6/7]

lsst::afw::coord::EclipticCoord::EclipticCoord ( EclipticCoord const &  )
default

◆ EclipticCoord() [7/7]

lsst::afw::coord::EclipticCoord::EclipticCoord ( EclipticCoord &&  )
default

Member Function Documentation

◆ angularSeparation()

geom::Angle lsst::afw::coord::Coord::angularSeparation ( Coord const &  c) const
inherited

compute the angular separation between two Coords

Parameters
ccoordinate to compute our separation from

Definition at line 506 of file Coord.cc.

◆ clone()

virtual std::shared_ptr<Coord> lsst::afw::coord::EclipticCoord::clone ( void  ) const
inlinevirtual

Reimplemented from lsst::afw::coord::Coord.

Definition at line 514 of file Coord.h.

◆ convert()

std::shared_ptr< Coord > lsst::afw::coord::Coord::convert ( CoordSystem  system,
double  epoch = 2000 
) const
inherited

Convert to a specified Coord type at a specified epoch.

Parameters
[in]systemcoordinate system to which to convert
[in]epochepoch of coordinate system; only relevant for FK5 and Ecliptic coordinates
Exceptions
lsst::pex::exceptions::InvalidParameterErrorif system = TOPOCENTRIC (because observatory data is required) or if system not recognized

Definition at line 471 of file Coord.cc.

◆ getBeta()

lsst::afw::geom::Angle lsst::afw::coord::EclipticCoord::getBeta ( ) const
inline

Definition at line 526 of file Coord.h.

◆ getBetaStr()

std::string lsst::afw::coord::EclipticCoord::getBetaStr ( ) const
inline

Definition at line 528 of file Coord.h.

◆ getClassName()

virtual std::string lsst::afw::coord::EclipticCoord::getClassName ( ) const
inlinevirtual

Reimplemented from lsst::afw::coord::Coord.

Definition at line 518 of file Coord.h.

◆ getCoordNames()

virtual std::pair<std::string, std::string> lsst::afw::coord::EclipticCoord::getCoordNames ( ) const
inlinevirtual

Reimplemented from lsst::afw::coord::Coord.

Definition at line 522 of file Coord.h.

◆ getCoordSystem()

virtual CoordSystem lsst::afw::coord::EclipticCoord::getCoordSystem ( ) const
inlinevirtual

Reimplemented from lsst::afw::coord::Coord.

Definition at line 520 of file Coord.h.

◆ getEpoch()

double lsst::afw::coord::Coord::getEpoch ( ) const
inlineinherited

Definition at line 131 of file Coord.h.

◆ getLambda()

lsst::afw::geom::Angle lsst::afw::coord::EclipticCoord::getLambda ( ) const
inline

Definition at line 525 of file Coord.h.

◆ getLambdaStr()

std::string lsst::afw::coord::EclipticCoord::getLambdaStr ( lsst::afw::geom::AngleUnit  unit) const
inline

Definition at line 527 of file Coord.h.

◆ getLatitude()

lsst::afw::geom::Angle lsst::afw::coord::Coord::getLatitude ( ) const
inlineinherited

The main access method for the latitudinal coordinate.

All systems store their latitudinal coordinate in _latitude, be it Dec, b, beta, or altitude. This is how they're accessed.

Definition at line 173 of file Coord.h.

◆ getLatitudeStr()

std::string lsst::afw::coord::Coord::getLatitudeStr ( ) const
inlineinherited

Allow quick access to the longitude coordinate as a string.

Note
There's no reason to want a latitude in radians or hours, so the units can not be explicitly requested.

Definition at line 840 of file Coord.h.

◆ getLongitude()

lsst::afw::geom::Angle lsst::afw::coord::Coord::getLongitude ( ) const
inlineinherited

The main access method for the longitudinal coordinate.

All systems store their longitudinal coordinate in _longitude, be it RA, l, lambda, or azimuth. This is how they're accessed.

Definition at line 166 of file Coord.h.

◆ getLongitudeStr()

std::string lsst::afw::coord::Coord::getLongitudeStr ( lsst::afw::geom::AngleUnit  unit) const
inlineinherited

Allow quick access to the longitudinal coordinate as a string.

Note
There's no reason to want a longitude in radians, so that unit will cause an exception to be thrown
There's no clear winner for a default, so the unit must always be explicitly provided.

Definition at line 824 of file Coord.h.

◆ getOffsetFrom()

std::pair< geom::Angle, geom::Angle > lsst::afw::coord::Coord::getOffsetFrom ( Coord const &  c) const
inherited

Compute the offset from a coordinate.

The resulting angles are suitable for input to Coord::offset

Parameters
cCoordinate from which to compute offset
Returns
pair of Angles: bearing (angle wrt a declination parallel) and distance

Definition at line 518 of file Coord.cc.

◆ getPosition()

geom::Point2D lsst::afw::coord::Coord::getPosition ( lsst::afw::geom::AngleUnit  unit = lsst::afw::geom::degrees) const
inherited

Return our contents in a Point2D object.

Definition at line 346 of file Coord.cc.

◆ getTangentPlaneOffset()

std::pair< geom::Angle, geom::Angle > lsst::afw::coord::Coord::getTangentPlaneOffset ( Coord const &  c) const
inherited

Get the offset on the tangent plane.

This is suitable only for small angles.

Parameters
cCoordinate from which to compute offset
Returns
pair of Angles: Longitude and Latitude offsets

Definition at line 543 of file Coord.cc.

◆ getVector()

geom::Point3D lsst::afw::coord::Coord::getVector ( ) const
inherited

Return our contents in a position vector.

Definition at line 355 of file Coord.cc.

◆ offset()

geom::Angle lsst::afw::coord::Coord::offset ( lsst::afw::geom::Angle const  phi,
lsst::afw::geom::Angle const  arcLen 
)
inherited

offset our current coords along a great circle defined by an angle wrt a declination parallel

Parameters
phiangle wrt parallel to offset
arcLenangle to offset
Returns
the angle wrt a declination parallel at new position
Note
At/near the pole, longitude becomes degenerate with angle-wrt-declination. So at the pole the offset will trace a meridian with longitude = 90 + longitude0 + phi

Definition at line 409 of file Coord.cc.

◆ operator=() [1/2]

EclipticCoord& lsst::afw::coord::EclipticCoord::operator= ( EclipticCoord const &  )
default

◆ operator=() [2/2]

EclipticCoord& lsst::afw::coord::EclipticCoord::operator= ( EclipticCoord &&  )
default

◆ operator==()

bool lsst::afw::coord::Coord::operator== ( Coord const &  rhs) const
inlineinherited

Equality operator, compares each element directly.

Definition at line 845 of file Coord.h.

◆ operator[]()

geom::Angle lsst::afw::coord::Coord::operator[] ( int const  index) const
inlineinherited

Provide access to our contents via an index.

Definition at line 801 of file Coord.h.

◆ precess()

EclipticCoord lsst::afw::coord::EclipticCoord::precess ( double const  epochTo) const

precess to new epoch

Parameters
epochToepoch to precess to.
Note
Do this by going through fk5

Definition at line 774 of file Coord.cc.

◆ reset() [1/2]

virtual void lsst::afw::coord::Coord::reset ( lsst::afw::geom::Angle const  longitude,
lsst::afw::geom::Angle const  latitude 
)
inlinevirtualinherited

Reimplemented in lsst::afw::coord::GalacticCoord, and lsst::afw::coord::IcrsCoord.

Definition at line 115 of file Coord.h.

◆ reset() [2/2]

void lsst::afw::coord::Coord::reset ( lsst::afw::geom::Angle const  longitude,
lsst::afw::geom::Angle const  latitude,
double const  epoch 
)
virtualinherited

Reset our coordinates wholesale.

This allows the user to instantiate Coords without values, and fill them later.

Parameters
longitudeLongitude coord (eg. R.A. for Fk5)
latitudeLatitude coord (eg. Declination for Fk5)
epochepoch of coordinate

Definition at line 339 of file Coord.cc.

◆ rotate()

void lsst::afw::coord::Coord::rotate ( Coord const &  axis,
lsst::afw::geom::Angle const  theta 
)
inherited

Rotate our current coords about a pole.

Parameters
axisaxis of rotation (right handed)
thetaangle to offset in radians

Definition at line 382 of file Coord.cc.

◆ toEcliptic() [1/2]

EclipticCoord lsst::afw::coord::EclipticCoord::toEcliptic ( double const  epoch) const
virtual

Convert ourself from Ecliptic to Ecliptic ...

a no-op (but precess to new epoch)

Reimplemented from lsst::afw::coord::Coord.

Definition at line 757 of file Coord.cc.

◆ toEcliptic() [2/2]

EclipticCoord lsst::afw::coord::EclipticCoord::toEcliptic ( ) const
virtual

Convert ourself from Ecliptic to Ecliptic ...

a no-op (use the current epoch)

Reimplemented from lsst::afw::coord::Coord.

Definition at line 760 of file Coord.cc.

◆ toFk5() [1/2]

Fk5Coord lsst::afw::coord::EclipticCoord::toFk5 ( double const  epoch) const
virtual

Convert ourself from Ecliptic to Fk5 (precess to new epoch)

Reimplemented from lsst::afw::coord::Coord.

Definition at line 764 of file Coord.cc.

◆ toFk5() [2/2]

Fk5Coord lsst::afw::coord::EclipticCoord::toFk5 ( ) const
virtual

Convert ourself from Ecliptic to Fk5 (use current epoch)

Reimplemented from lsst::afw::coord::Coord.

Definition at line 772 of file Coord.cc.

◆ toGalactic()

GalacticCoord lsst::afw::coord::Coord::toGalactic ( ) const
virtualinherited

Convert ourself to Galactic: l, b.

Reimplemented in lsst::afw::coord::GalacticCoord, and lsst::afw::coord::Fk5Coord.

Definition at line 574 of file Coord.cc.

◆ toIcrs()

IcrsCoord lsst::afw::coord::Coord::toIcrs ( ) const
virtualinherited

Convert ourself to ICRS: RA, Dec (basically J2000)

Reimplemented in lsst::afw::coord::Fk5Coord, and lsst::afw::coord::IcrsCoord.

Definition at line 572 of file Coord.cc.

◆ toString()

std::string lsst::afw::coord::Coord::toString ( void  ) const
virtualinherited

Get string representation.

Reimplemented in lsst::afw::coord::TopocentricCoord, lsst::afw::coord::GalacticCoord, and lsst::afw::coord::IcrsCoord.

Definition at line 967 of file Coord.cc.

◆ toTopocentric()

TopocentricCoord lsst::afw::coord::Coord::toTopocentric ( Observatory const &  obs,
lsst::daf::base::DateTime const &  obsDate 
) const
virtualinherited

Convert ourself to Altitude/Azimuth: alt, az.

Parameters
obsobservatory of observation
obsDatedate of observation

Reimplemented in lsst::afw::coord::TopocentricCoord, and lsst::afw::coord::Fk5Coord.

Definition at line 579 of file Coord.cc.

◆ transform()

Coord lsst::afw::coord::Coord::transform ( Coord const &  poleTo,
Coord const &  poleFrom 
) const
inherited

Transform our current coords to another spherical polar system.

Variable names assume an equatorial/galactic transform, but it works for any spherical polar system when the appropriate poles are supplied.

Parameters
poleToPole of the destination system in the current coords
poleFromPole of the current system in the destination coords

Definition at line 364 of file Coord.cc.


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