LSSTApplications  1.1.2+25,10.0+13,10.0+132,10.0+133,10.0+224,10.0+41,10.0+8,10.0-1-g0f53050+14,10.0-1-g4b7b172+19,10.0-1-g61a5bae+98,10.0-1-g7408a83+3,10.0-1-gc1e0f5a+19,10.0-1-gdb4482e+14,10.0-11-g3947115+2,10.0-12-g8719d8b+2,10.0-15-ga3f480f+1,10.0-2-g4f67435,10.0-2-gcb4bc6c+26,10.0-28-gf7f57a9+1,10.0-3-g1bbe32c+14,10.0-3-g5b46d21,10.0-4-g027f45f+5,10.0-4-g86f66b5+2,10.0-4-gc4fccf3+24,10.0-40-g4349866+2,10.0-5-g766159b,10.0-5-gca2295e+25,10.0-6-g462a451+1
LSSTDataManagementBasePackage
ReferencePosition.h
Go to the documentation of this file.
1 // -*- lsst-c++ -*-
2 
3 /*
4  * LSST Data Management System
5  * Copyright 2008, 2009, 2010 LSST Corporation.
6  *
7  * This product includes software developed by the
8  * LSST Project (http://www.lsst.org/).
9  *
10  * This program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation, either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the LSST License Statement and
21  * the GNU General Public License along with this program. If not,
22  * see <http://www.lsstcorp.org/LegalNotices/>.
23  */
24 
28 #ifndef LSST_AP_MATCH_REFERENCEPOSITION_H
29 #define LSST_AP_MATCH_REFERENCEPOSITION_H
30 
31 #include <cstddef>
32 #include "Eigen/Core"
33 
34 #include "lsst/afw/geom/Angle.h"
35 #include "lsst/afw/coord/Coord.h"
36 
37 #include "../constants.h"
38 #include "../utils/SpatialUtils.h"
39 #include "../utils/EarthPosition.h"
40 #include "BBox.h"
41 
42 
43 namespace lsst { namespace ap { namespace match {
44 
48 class ReferencePosition : public BBox {
49 public:
50  enum Flags {
51  MOVING = 0x1,
52  PARALLAX = 0x2,
53  PARALLAX_COR = 0x4
55  };
57 
58  static double const MIN_PARALLAX; // rad
59 
60  inline ReferencePosition(int64_t id,
61  lsst::afw::geom::Angle const ra,
62  lsst::afw::geom::Angle const dec,
63  double epoch=J2000_MJD);
64 
65  virtual ~ReferencePosition() { }
66 
67  void clearMotion();
68  void setMotion(double muRa,
69  double muDecl,
70  lsst::afw::geom::Angle parallax,
71  double vRadial,
72  bool trueAngle,
73  bool parallaxCor);
74 
75  void setTimeRange(double epoch1, double epoch2);
76 
77  inline int64_t getId() const;
78  inline double getEpoch() const;
79  inline int getFlags() const;
80  inline lsst::afw::coord::IcrsCoord const & getSphericalCoords() const;
81  inline Eigen::Vector3d const & getPosition() const;
82  inline Eigen::Vector3d const & getVelocity() const;
83 
84  inline Eigen::Vector3d const getPosition(double epoch) const;
85  inline Eigen::Vector3d const getPosition(
86  double epoch, Eigen::Vector3d const &origin) const;
87 
88  // BBox API
89  virtual double getMinCoord0() const;
90  virtual double getMaxCoord0() const;
91  virtual double getMinCoord1() const;
92  virtual double getMaxCoord1() const;
93 
94  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
95 
96 private:
98  int64_t _id;
99  double _epoch;
100  Eigen::Vector3d _p;
101  Eigen::Vector3d _v;
103  // BBox coordinates
108  int _flags;
109 };
110 
111 }}} // namespace lsst::ap::match
112 
113 #include "ReferencePosition.cc"
114 
115 #endif // LSST_AP_MATCH_REFERENCEPOSITION_H
116 
virtual double getMaxCoord1() const
lsst::afw::coord::IcrsCoord _sc
(ra, decl) at _epoch, ICRS rad
ReferencePosition(int64_t id, lsst::afw::geom::Angle const ra, lsst::afw::geom::Angle const dec, double epoch=J2000_MJD)
ReferencePosition inline function implementations.
void setMotion(double muRa, double muDecl, lsst::afw::geom::Angle parallax, double vRadial, bool trueAngle, bool parallaxCor)
Eigen::Vector3d const & getVelocity() const
Eigen::Vector3d const & getPosition() const
lsst::afw::geom::Angle _parallax
parallax, rad
double _epoch
epoch of reference position, MJD
void setTimeRange(double epoch1, double epoch2)
int _flags
Bit-wise OR of Flags.
Eigen::Vector3d _v
(dx/dt, dy/dt, dz/dt)
Eigen::Vector3d _p
(x, y, z) at _epoch
virtual double getMaxCoord0() const
virtual double getMinCoord1() const
2D bounding box interface.
Set if the reference position has proper motion.
A class to handle Icrs coordinates (inherits from Coord)
Definition: Coord.h:155
virtual double getMinCoord0() const
lsst::afw::coord::IcrsCoord const & getSphericalCoords() const
Functions to handle coordinates.