LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Types | Public Member Functions | List of all members
lsst::afw::coord::GalacticCoord Class Reference

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

#include <Coord.h>

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

Public Types

typedef boost::shared_ptr
< GalacticCoord
Ptr
 
- Public Types inherited from lsst::afw::coord::Coord
typedef boost::shared_ptr< CoordPtr
 
typedef boost::shared_ptr
< Coord const > 
ConstPtr
 

Public Member Functions

 GalacticCoord (lsst::afw::geom::Point2D const &p2d, lsst::afw::geom::AngleUnit unit=lsst::afw::geom::degrees)
 
 GalacticCoord (lsst::afw::geom::Point3D const &p3d, bool normalize=true, lsst::afw::geom::Angle const defaultLongitude=lsst::afw::geom::Angle(0.))
 
 GalacticCoord (lsst::afw::geom::Angle const l, lsst::afw::geom::Angle const b)
 
 GalacticCoord (std::string const l, std::string const b)
 
 GalacticCoord ()
 
virtual Coord::Ptr clone () const
 
virtual std::string getClassName () const
 
virtual void reset (lsst::afw::geom::Angle const longitude, lsst::afw::geom::Angle const latitude)
 special reset() overload to make sure no epoch can be set More...
 
virtual std::pair< std::string,
std::string > 
getCoordNames () const
 
lsst::afw::geom::Angle getL () const
 
lsst::afw::geom::Angle getB () const
 
std::string getLStr (lsst::afw::geom::AngleUnit unit) const
 
std::string getBStr () const
 
virtual Fk5Coord toFk5 (double const epoch) const
 Convert ourself from galactic to Fk5 (specify epoch) More...
 
virtual Fk5Coord toFk5 () const
 Convert ourself from galactic to Fk5 (no epoch specified) More...
 
virtual GalacticCoord toGalactic () const
 Convert ourself from Galactic to Galactic ... a no-op. More...
 
- Public Member Functions inherited from lsst::afw::coord::Coord
 Coord (lsst::afw::geom::Point2D const &p2d, lsst::afw::geom::AngleUnit unit=lsst::afw::geom::degrees, double const epoch=2000.0)
 Constructor for the Coord base class. More...
 
 Coord (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.))
 Constructor for the Coord base class. More...
 
 Coord (lsst::afw::geom::Angle const ra, lsst::afw::geom::Angle const dec, double const epoch=2000.0)
 Constructor for the Coord base class. More...
 
 Coord (std::string const ra, std::string const dec, double const epoch=2000.0)
 Constructor for the Coord base class. More...
 
 Coord ()
 Default constructor for the Coord base class. More...
 
virtual ~Coord ()
 
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...
 
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 &poleFrom, Coord const &poleTo) const
 Tranform 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...
 
Coord::Ptr convert (CoordSystem system) const
 Convert to a specified Coord type. More...
 
virtual IcrsCoord toIcrs () const
 Convert ourself to ICRS: RA, Dec (basically J2000) More...
 
virtual EclipticCoord toEcliptic (double const epoch) const
 Convert ourself to Ecliptic: lambda, beta (precess to new epoch) More...
 
virtual EclipticCoord toEcliptic () const
 Convert ourself to Ecliptic: lambda, beta (use existing epoch) 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 Galactic coordinates (inherits from Coord)

Definition at line 237 of file Coord.h.

Member Typedef Documentation

Definition at line 240 of file Coord.h.

Constructor & Destructor Documentation

lsst::afw::coord::GalacticCoord::GalacticCoord ( lsst::afw::geom::Point2D const &  p2d,
lsst::afw::geom::AngleUnit  unit = lsst::afw::geom::degrees 
)
inline

Definition at line 242 of file Coord.h.

242 : Coord(p2d, unit) {}
Coord()
Default constructor for the Coord base class.
Definition: Coord.cc:441
lsst::afw::coord::GalacticCoord::GalacticCoord ( lsst::afw::geom::Point3D const &  p3d,
bool  normalize = true,
lsst::afw::geom::Angle const  defaultLongitude = lsst::afw::geom::Angle(0.) 
)
inline

Definition at line 243 of file Coord.h.

244  :
245  Coord(p3d, normalize, defaultLongitude) {}
Coord()
Default constructor for the Coord base class.
Definition: Coord.cc:441
lsst::afw::coord::GalacticCoord::GalacticCoord ( lsst::afw::geom::Angle const  l,
lsst::afw::geom::Angle const  b 
)
inline

Definition at line 246 of file Coord.h.

246 : Coord(l, b) {}
Coord()
Default constructor for the Coord base class.
Definition: Coord.cc:441
afw::table::Key< double > b
lsst::afw::coord::GalacticCoord::GalacticCoord ( std::string const  l,
std::string const  b 
)
inline

Definition at line 247 of file Coord.h.

247 : Coord(l, b) {}
Coord()
Default constructor for the Coord base class.
Definition: Coord.cc:441
afw::table::Key< double > b
lsst::afw::coord::GalacticCoord::GalacticCoord ( )
inline

Definition at line 248 of file Coord.h.

248 : Coord() {}
Coord()
Default constructor for the Coord base class.
Definition: Coord.cc:441

Member Function Documentation

virtual Coord::Ptr lsst::afw::coord::GalacticCoord::clone ( ) const
inlinevirtual

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

Definition at line 250 of file Coord.h.

250 { return GalacticCoord::Ptr(new GalacticCoord(*this)); }
boost::shared_ptr< GalacticCoord > Ptr
Definition: Coord.h:240
lsst::afw::geom::Angle lsst::afw::coord::GalacticCoord::getB ( ) const
inline

Definition at line 261 of file Coord.h.

261 { return getLatitude(); }
lsst::afw::geom::Angle getLatitude() const
The main access method for the latitudinal coordinate.
Definition: Coord.h:120
std::string lsst::afw::coord::GalacticCoord::getBStr ( ) const
inline

Definition at line 263 of file Coord.h.

263 { return getLatitudeStr(); }
std::string getLatitudeStr() const
Allow quick access to the longitude coordinate as a string.
Definition: Coord.h:460
virtual std::string lsst::afw::coord::GalacticCoord::getClassName ( ) const
inlinevirtual

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

Definition at line 252 of file Coord.h.

252 { return "GalacticCoord"; }
virtual std::pair<std::string, std::string> lsst::afw::coord::GalacticCoord::getCoordNames ( ) const
inlinevirtual

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

Definition at line 256 of file Coord.h.

256  {
257  return std::pair<std::string, std::string>("L", "B");
258  }
lsst::afw::geom::Angle lsst::afw::coord::GalacticCoord::getL ( ) const
inline

Definition at line 260 of file Coord.h.

260 { return getLongitude(); }
lsst::afw::geom::Angle getLongitude() const
The main access method for the longitudinal coordinate.
Definition: Coord.h:113
std::string lsst::afw::coord::GalacticCoord::getLStr ( lsst::afw::geom::AngleUnit  unit) const
inline

Definition at line 262 of file Coord.h.

262 { return getLongitudeStr(unit); }
std::string getLongitudeStr(lsst::afw::geom::AngleUnit unit) const
Allow quick access to the longitudinal coordinate as a string.
Definition: Coord.h:443
void lsst::afw::coord::GalacticCoord::reset ( lsst::afw::geom::Angle const  longitude,
lsst::afw::geom::Angle const  latitude 
)
virtual

special reset() overload to make sure no epoch can be set

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

Definition at line 1033 of file Coord.cc.

1033  {
1034  Coord::reset(longitudeDeg, latitudeDeg, 2000.0);
1035 }
virtual void reset(lsst::afw::geom::Angle const longitude, lsst::afw::geom::Angle const latitude)
Definition: Coord.h:86
afwCoord::Fk5Coord lsst::afw::coord::GalacticCoord::toFk5 ( double const  epoch) const
virtual

Convert ourself from galactic to Fk5 (specify epoch)

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

Definition at line 1040 of file Coord.cc.

1040  {
1041  // transform to fk5
1042  // galactic coords are ~constant, and the poles used are for epoch=2000, so we get J2000
1043  Coord c = transform(GalacticPoleInFk5(), Fk5PoleInGalactic());
1044  return Fk5Coord(c.getLongitude(), c.getLatitude(), 2000.0).precess(epoch);
1045 }
Coord()
Default constructor for the Coord base class.
Definition: Coord.cc:441
Coord transform(Coord const &poleFrom, Coord const &poleTo) const
Tranform our current coords to another spherical polar system.
Definition: Coord.cc:507
afwCoord::Fk5Coord lsst::afw::coord::GalacticCoord::toFk5 ( ) const
virtual

Convert ourself from galactic to Fk5 (no epoch specified)

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

Definition at line 1049 of file Coord.cc.

1049  {
1050  return this->toFk5(2000.0);
1051 }
virtual Fk5Coord toFk5() const
Convert ourself from galactic to Fk5 (no epoch specified)
Definition: Coord.cc:1049
afwCoord::GalacticCoord lsst::afw::coord::GalacticCoord::toGalactic ( ) const
virtual

Convert ourself from Galactic to Galactic ... a no-op.

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

Definition at line 1056 of file Coord.cc.

1056  {
1057  return GalacticCoord(getLongitude(), getLatitude());
1058 }
lsst::afw::geom::Angle getLongitude() const
The main access method for the longitudinal coordinate.
Definition: Coord.h:113
lsst::afw::geom::Angle getLatitude() const
The main access method for the latitudinal coordinate.
Definition: Coord.h:120

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