LSSTApplications  11.0-13-gbb96280,12.1+18,12.1+7,12.1-1-g14f38d3+72,12.1-1-g16c0db7+5,12.1-1-g5961e7a+84,12.1-1-ge22e12b+23,12.1-11-g06625e2+4,12.1-11-g0d7f63b+4,12.1-19-gd507bfc,12.1-2-g7dda0ab+38,12.1-2-gc0bc6ab+81,12.1-21-g6ffe579+2,12.1-21-gbdb6c2a+4,12.1-24-g941c398+5,12.1-3-g57f6835+7,12.1-3-gf0736f3,12.1-37-g3ddd237,12.1-4-gf46015e+5,12.1-5-g06c326c+20,12.1-5-g648ee80+3,12.1-5-gc2189d7+4,12.1-6-ga608fc0+1,12.1-7-g3349e2a+5,12.1-7-gfd75620+9,12.1-9-g577b946+5,12.1-9-gc4df26a+10
LSSTDataManagementBasePackage
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
lsst.afw.geom Namespace Reference

Namespaces

 detail
 
 details
 
 ellipses
 
 polygon
 
 testUtils
 
 transformConfig
 
 utils
 
 xyTransformFactory
 

Classes

class  AffineTransform
 An affine coordinate transformation consisting of a linear transformation and an offset. More...
 
class  AngleUnit
 A class used to convert scalar POD types such as double to Angle. More...
 
class  Angle
 A class representing an Angle. More...
 
class  Box2I
 An integer coordinate rectangle. More...
 
class  Box2D
 A floating-point coordinate rectangle geometry. More...
 
class  Point
 A coordinate class intended to represent absolute positions. More...
 
class  Extent
 A coordinate class intended to represent offsets and dimensions. More...
 
class  CoordinateBase
 A CRTP base class for coordinate objects. More...
 
class  CoordinateBase< Derived, T, 2 >
 Specialization of CoordinateBase for 2 dimensions. More...
 
class  CoordinateBase< Derived, T, 3 >
 Specialization of CoordinateBase for 3 dimensions. More...
 
class  CoordinateExpr
 A boolean coordinate. More...
 
class  ExtentBase
 
class  Extent< T, 2 >
 A coordinate class intended to represent offsets and dimensions (2-d specialization). More...
 
class  Extent< T, 3 >
 A coordinate class intended to represent offsets and dimensions (3-d specialization). More...
 
class  Functor
 Abstract base class for function objects. More...
 
class  LinearFunctor
 Concrete implementation of Functor subclass for testing. More...
 
class  LinearTransform
 A 2D linear coordinate transformation. More...
 
class  PointBase
 
class  Point< T, 2 >
 A coordinate class intended to represent absolute positions (2-d specialization). More...
 
class  Point< T, 3 >
 A coordinate class intended to represent absolute positions (3-d specialization). More...
 
class  SeparableXYTransform
 A 2D transform for which the pixel distortions in the in the x- and y-directions are separable. More...
 
class  Span
 A range of pixels within one row of an Image. More...
 
class  SpanPixelIterator
 An iterator that yields Point2I and increases in the x direction. More...
 
class  SpanSet
 A compact representation of a collection of pixels. More...
 
class  SpherePoint
 Point in an unspecified spherical coordinate system. More...
 
class  TransformMap
 A registry of 2-dimensional coordinate transforms, templated on a coordinate system type. More...
 
class  XYTransform
 Virtual base class for 2D transforms. More...
 
class  IdentityXYTransform
 A trivial XYTransform satisfying f(x)=x. More...
 
class  InvertedXYTransform
 Wrap an XYTransform, swapping forward and reverse transforms. More...
 
class  MultiXYTransform
 Wrap a sequence of multiple XYTransforms. More...
 
class  AffineXYTransform
 Wrap an AffineTransform. More...
 
class  RadialXYTransform
 A purely radial polynomial distortion, up to 6th order. More...
 

Typedefs

typedef Box2D BoxD = Box2D
 
typedef Box2I BoxI = Box2I
 
typedef CoordinateExpr< 2 > CoordinateExpr2
 
typedef CoordinateExpr< 3 > CoordinateExpr3
 
typedef Extent< int, 2 > ExtentI = Extent2I
 
typedef Extent< int, 2 > Extent2I
 
typedef Extent< int, 3 > Extent3I
 
typedef Extent< double, 2 > ExtentD = Extent2D
 
typedef Extent< double, 2 > Extent2D
 
typedef Extent< double, 3 > Extent3D
 
typedef Point< int, 2 > PointI = Point2I
 
typedef Point< int, 2 > Point2I
 
typedef Point< int, 3 > Point3I
 
typedef Point< double, 2 > PointD = Point2D
 
typedef Point< double, 2 > Point2D
 
typedef Point< double, 3 > Point3D
 

Enumerations

enum  Stencil { Stencil::CIRCLE, Stencil::BOX, Stencil::MANHATTAN }
 An enumeration class which describes the shapes. More...
 

Functions

std::ostream & operator<< (std::ostream &os, lsst::afw::geom::AffineTransform const &transform)
 
AffineTransform makeAffineTransformFromTriple (Point2D const &p1, Point2D const &p2, Point2D const &p3, Point2D const &q1, Point2D const &q2, Point2D const &q3)
 
double degToRad (double x)
 
double radToDeg (double x)
 
double radToArcsec (double x)
 
double radToMas (double x)
 
double arcsecToRad (double x)
 
double masToRad (double x)
 
const Angle operator+ (Angle const a, Angle const d)
 
const Angle operator- (Angle const a, Angle const d)
 
const Angle operator* (Angle const a, Angle const d)
 
const Angle operator* (Angle const a, double d)
 
const Angle operator* (double d, Angle const a)
 
const Angle operator* (Angle const a, int d)
 
const Angle operator* (int d, Angle const a)
 
const Angle operator/ (Angle const a, int d)
 
const Angle operator/ (Angle const a, double d)
 
template<typename T >
double operator/ (T const lhs, Angle const rhs)
 
template<typename T >
bool isAngle (T)
 Allow a user to check if they have an angle (yes; they could do this themselves via trivial TMP) More...
 
bool isAngle (Angle const &)
 
template<typename T >
const Angle operator* (T lhs, AngleUnit const rhs)
 Use AngleUnit to convert a POD (e.g. More...
 
std::ostream & operator<< (std::ostream &s, Angle const a)
 Output operator for an Angle. More...
 
std::ostream & operator<< (std::ostream &os, Box2I const &box)
 
std::ostream & operator<< (std::ostream &os, Box2D const &box)
 
template<typename Derived , typename T , int N>
bool allclose (CoordinateBase< Derived, T, N > const &a, CoordinateBase< Derived, T, N > const &b, T rtol=static_cast< T >(1E-5), T atol=static_cast< T >(1E-8))
 
template<typename Derived , typename T , int N>
std::ostream & operator<< (std::ostream &os, CoordinateBase< Derived, T, N > const &coordinate)
 
template<int N>
bool all (CoordinateExpr< N > const &expr)
 Return true if all elements are true. More...
 
template<int N>
bool any (CoordinateExpr< N > const &expr)
 Return true if any elements are true. More...
 
template<int N>
Extent< int, N > truncate (Extent< double, N > const &input)
 Return the component-wise truncation (round towards zero). More...
 
template<int N>
Extent< int, N > floor (Extent< double, N > const &input)
 Return the component-wise floor (round towards more negative). More...
 
template<int N>
Extent< int, N > ceil (Extent< double, N > const &input)
 Return the component-wise ceil (round towards more positive). More...
 
template<typename T , int N>
Extent< T, N > operator* (T scalar, ExtentBase< T, N > const &rhs)
 
template<int N>
Extent< double, N > operator* (ExtentBase< int, N > const &lhs, double rhs)
 
template<int N>
void operator*= (ExtentBase< int, N > &lhs, double rhs)
 
template<int N>
Extent< double, N > operator/ (ExtentBase< int, N > const &lhs, double rhs)
 
template<int N>
void operator/= (ExtentBase< int, N > &lhs, double rhs)
 
template<int N>
Extent< double, N > operator* (double lhs, ExtentBase< int, N > const &rhs)
 
template<int N>
Extent< double, N > operator+ (Extent< double, N > const &lhs, Extent< int, N > const &rhs)
 
template<int N>
Extent< double, N > & operator+= (Extent< double, N > &lhs, Extent< int, N > const &rhs)
 
template<int N>
Extent< double, N > operator- (Extent< double, N > const &lhs, Extent< int, N > const &rhs)
 
template<int N>
Extent< double, N > & operator-= (Extent< double, N > &lhs, Extent< int, N > const &rhs)
 
template<int N>
Extent< double, N > operator+ (Extent< int, N > const &lhs, Extent< double, N > const &rhs)
 
template<int N>
Extent< double, N > operator- (Extent< int, N > const &lhs, Extent< double, N > const &rhs)
 
std::ostream & operator<< (std::ostream &os, lsst::afw::geom::LinearTransform const &t)
 
template<int N>
Point< double, N > operator+ (Point< double, N > const &lhs, Extent< int, N > const &rhs)
 
template<int N>
Point< double, N > operator+ (Extent< int, N > const &rhs, Point< double, N > const &lhs)
 
template<int N>
Point< double, N > & operator+= (Point< double, N > &lhs, Extent< int, N > const &rhs)
 
template<int N>
Point< double, N > operator+ (Point< int, N > const &lhs, Extent< double, N > const &rhs)
 
template<int N>
Point< double, N > operator- (Point< double, N > const &lhs, Extent< int, N > const &rhs)
 
template<int N>
Point< double, N > & operator-= (Point< double, N > &lhs, Extent< int, N > const &rhs)
 
template<int N>
Point< double, N > operator- (Point< int, N > const &lhs, Extent< double, N > const &rhs)
 
template<int N>
Extent< double, N > operator- (Point< double, N > const &lhs, Point< int, N > const &rhs)
 
template<int N>
Extent< double, N > operator- (Point< int, N > const &lhs, Point< double, N > const &rhs)
 
template<typename T , typename UnaryPredicate = details::AnyBitSetFunctor<T>>
std::shared_ptr< geom::SpanSetmaskToSpanSet (image::Mask< T > const &mask, UnaryPredicate p=details::AnyBitSetFunctor< T >())
 Create a SpanSet from a mask. More...
 
std::ostream & operator<< (std::ostream &os, SpherePoint const &point)
 Print the value of a point to a stream. More...
 

Variables

dictionary Point = {(int, 2):Point2I, (float, 2):Point2D, (int, 3):Point3I, (float, 3):Point3D}
 
dictionary Extent = {(int, 2):Extent2I, (float, 2):Extent2D, (int, 3):Extent3I, (float, 3):Extent3D}
 
dictionary CoordinateExpr = {2:CoordinateExpr2, 3:CoordinateExpr3}
 
double const PI = boost::math::constants::pi<double>()
 The ratio of a circle's circumference to diameter. More...
 
double const TWOPI = boost::math::constants::pi<double>() * 2.0
 
double const HALFPI = boost::math::constants::pi<double>() * 0.5
 
double const ONE_OVER_PI = 1.0 / boost::math::constants::pi<double>()
 
double const SQRTPI = sqrt(boost::math::constants::pi<double>())
 
double const INVSQRTPI = 1.0/sqrt(boost::math::constants::pi<double>())
 
double const ROOT2 = boost::math::constants::root_two<double>()
 
AngleUnit const radians = AngleUnit(1.0)
 constant with units of radians More...
 
AngleUnit const degrees = AngleUnit(PI/180.0)
 
AngleUnit const hours = AngleUnit(PI*15.0/180.0)
 
AngleUnit const arcminutes = AngleUnit(PI/60/180.0)
 
AngleUnit const arcseconds = AngleUnit(PI/180.0/3600.0)
 
Angle const NullAngle = Angle(-1000000., degrees)
 

Typedef Documentation

Definition at line 478 of file Box.h.

Definition at line 479 of file Box.h.

Definition at line 92 of file CoordinateExpr.h.

Definition at line 93 of file CoordinateExpr.h.

typedef Extent<double,2> lsst::afw::geom.Extent2D

Definition at line 361 of file Extent.h.

Examples:
image2.cc, and maskedImage2.cc.

Definition at line 358 of file Extent.h.

typedef Extent<double,3> lsst::afw::geom.Extent3D

Definition at line 362 of file Extent.h.

Definition at line 359 of file Extent.h.

Definition at line 360 of file Extent.h.

Definition at line 355 of file Extent.h.

typedef Point<double,2> lsst::afw::geom.Point2D

Definition at line 288 of file Point.h.

typedef Point< int, 2 > lsst::afw::geom::Point2I

Definition at line 285 of file Point.h.

typedef Point<double,3> lsst::afw::geom.Point3D

Definition at line 289 of file Point.h.

Definition at line 286 of file Point.h.

Definition at line 287 of file Point.h.

Definition at line 284 of file Point.h.

Enumeration Type Documentation

An enumeration class which describes the shapes.

A stencil is a shape used in creating SpanSets, erosion kernels, or dilation kernels. CIRCLE creates a circle shape, BOX creates a box shape, and MANHATTAN creates a diamond shape.

Enumerator
CIRCLE 
BOX 
MANHATTAN 

Definition at line 66 of file SpanSet.h.

Function Documentation

template<int N>
bool lsst::afw::geom::all ( CoordinateExpr< N > const &  expr)
inline

Return true if all elements are true.

Definition at line 80 of file CoordinateExpr.h.

80  {
81  for (int n=0; n<N; ++n) if (!expr[n]) return false;
82  return true;
83 }
metadata import lsst afw display as afwDisplay n
template<typename Derived , typename T , int N>
bool lsst::afw::geom::allclose ( CoordinateBase< Derived, T, N > const &  a,
CoordinateBase< Derived, T, N > const &  b,
rtol = static_cast< T >(1E-5),
atol = static_cast< T >(1E-8) 
)
template<int N>
bool lsst::afw::geom::any ( CoordinateExpr< N > const &  expr)
inline

Return true if any elements are true.

Definition at line 87 of file CoordinateExpr.h.

87  {
88  for (int n=0; n<N; ++n) if (expr[n]) return true;
89  return false;
90 }
metadata import lsst afw display as afwDisplay n
double lsst::afw::geom::arcsecToRad ( double  x)
inline

Definition at line 40 of file Angle.h.

40  {
41  return (x / 3600.) * PI / 180.;
42 }
double x
double const PI
The ratio of a circle&#39;s circumference to diameter.
Definition: Angle.h:17
template<int N>
Extent<int,N> lsst::afw::geom::ceil ( Extent< double, N > const &  input)

Return the component-wise ceil (round towards more positive).

In Python, this is available as both a free function and a method on ExtentD.

double lsst::afw::geom::degToRad ( double  x)
inline

Definition at line 28 of file Angle.h.

28  {
29  return x * PI / 180.;
30 }
double x
double const PI
The ratio of a circle&#39;s circumference to diameter.
Definition: Angle.h:17
template<int N>
Extent<int,N> lsst::afw::geom::floor ( Extent< double, N > const &  input)

Return the component-wise floor (round towards more negative).

In Python, this is available as both a free function and a method on ExtentD.

template<typename T >
bool lsst::afw::geom::isAngle ( )
inline

Allow a user to check if they have an angle (yes; they could do this themselves via trivial TMP)

Definition at line 289 of file Angle.h.

289  {
290  return false;
291 };
bool lsst::afw::geom::isAngle ( Angle const &  )
inline

Definition at line 293 of file Angle.h.

293  {
294  return true;
295 };
AffineTransform lsst::afw::geom::makeAffineTransformFromTriple ( Point2D const &  p1,
Point2D const &  p2,
Point2D const &  p3,
Point2D const &  q1,
Point2D const &  q2,
Point2D const &  q3 
)
template<typename T , typename UnaryPredicate = details::AnyBitSetFunctor<T>>
std::shared_ptr<geom::SpanSet> lsst::afw::geom::maskToSpanSet ( image::Mask< T > const &  mask,
UnaryPredicate  p = details::AnyBitSetFunctor<T>() 
)

Create a SpanSet from a mask.

Create a SpanSet from a class. The default behaivor is to include any pixels which have any bits set. More complex selection/filtering of bit patterns can be done by supplying a comparator function.

Parameters
mask- mask to convert to a SpanSet
comparator- Functor object to use in the decision to include pixel in SpanSet. Should return true when a given pixel in the mask should be part of the SpanSet, and false otherwise. The functor takes a single value taken from the mask at the pixel under consideration. Defaults to evaluating true if the mask has bits set, and false otherwise.
Template Parameters
T- Pixel type of the Mask
F- Type of the functor

Definition at line 88 of file SpanSet.h.

89  {
90  std::vector<Span> tempVec;
91  std::size_t startValue{0};
92  bool started{false};
93  auto const & maskArray = mask.getArray();
94  auto dimensions = maskArray.getShape();
95  for (size_t y = 0; y < dimensions[0]; ++y) {
96  startValue = 0;
97  started = false;
98  for (size_t x = 0; x < dimensions[1]; ++x) {
99  // If a new span has not been started, and a given x matches the functor condition
100  // start a new span
101  if (p(maskArray[y][x]) && !started) {
102  started = true;
103  startValue = x;
104  }
105  // If a span has been started, and the functor condition is false, that means the
106  // Span being created should be stopped, and appended to the Span vector
107  else if (started && !p(maskArray[y][x])) {
108  tempVec.push_back(Span(y, startValue, x-1));
109  started = false;
110  }
111  // If this is the last value in the Span's x range, and started is still true
112  // that means the last value does not evaluate false in the functor and should be
113  // included in the Span under construction. The Span should be completed and added
114  // to the Span Vector before the next span is concidered.
115  if (started && x == dimensions[1]) {
116  tempVec.push_back(Span(y, startValue, x));
117  }
118  }
119  }
120 
121  // construct a SpanSet from the spans determined above
122  return std::make_shared<SpanSet>(std::move(tempVec));
123 }
int y
afw::table::PointKey< int > dimensions
Definition: GaussianPsf.cc:42
double x
double lsst::afw::geom::masToRad ( double  x)
inline

Definition at line 43 of file Angle.h.

43  {
44  return (x / (1000. * 3600.)) * PI / 180.;
45 }
double x
double const PI
The ratio of a circle&#39;s circumference to diameter.
Definition: Angle.h:17
const Angle lsst::afw::geom::operator* ( Angle const  a,
Angle const  d 
)
inline

Definition at line 265 of file Angle.h.

273 {
const Angle lsst::afw::geom::operator* ( Angle const  a,
double  d 
)
inline

Definition at line 266 of file Angle.h.

273 {
const Angle lsst::afw::geom::operator* ( double  d,
Angle const  a 
)
inline

Definition at line 266 of file Angle.h.

273 {
const Angle lsst::afw::geom::operator* ( Angle const  a,
int  d 
)
inline

Definition at line 267 of file Angle.h.

273 {
const Angle lsst::afw::geom::operator* ( int  d,
Angle const  a 
)
inline

Definition at line 267 of file Angle.h.

273 {
template<typename T >
const Angle lsst::afw::geom::operator* ( lhs,
AngleUnit const  rhs 
)
inline

Use AngleUnit to convert a POD (e.g.

int, double) to an Angle; e.g. 180*afwGeomdegrees

Parameters
lhsthe value to convert
rhsthe conversion coefficient

Definition at line 303 of file Angle.h.

305  {
306  static_assert(std::numeric_limits<T>::is_specialized,
307  "Only numeric types may be converted to Angles using degrees/radians!");
308  return Angle(lhs*rhs._val);
309 }
lsst::afw::geom::Angle Angle
Definition: misc.h:38
template<typename T , int N>
Extent<T,N> lsst::afw::geom::operator* ( scalar,
ExtentBase< T, N > const &  rhs 
)

Definition at line 395 of file Extent.h.

395  {
396  return rhs * scalar;
397 }
template<int N>
Extent<double,N> lsst::afw::geom::operator* ( ExtentBase< int, N > const &  lhs,
double  rhs 
)

Definition at line 400 of file Extent.h.

400  {
401  return Extent<double,N>(static_cast<Extent<int,N> const &>(lhs)) * rhs;
402 }
template<int N>
Extent<double,N> lsst::afw::geom::operator* ( double  lhs,
ExtentBase< int, N > const &  rhs 
)

Definition at line 422 of file Extent.h.

422  {
423  return lhs * Extent<double,N>(static_cast<Extent<int,N> const &>(rhs));
424 }
template<int N>
void lsst::afw::geom::operator*= ( ExtentBase< int, N > &  lhs,
double  rhs 
)

Definition at line 405 of file Extent.h.

405  {
406  // use "N < 0" so assertion is dependent on template instantiation, instead of triggering all the time
407  static_assert(N < 0, "In-place multiplication of Extent<int,N> by double would truncate.");
408 }
const Angle lsst::afw::geom::operator+ ( Angle const  a,
Angle const  d 
)
inline

Definition at line 263 of file Angle.h.

273 {
template<int N>
Point<double,N> lsst::afw::geom::operator+ ( Point< double, N > const &  lhs,
Extent< int, N > const &  rhs 
)

Definition at line 292 of file Point.h.

292  {
293  return lhs + Extent<double,N>(rhs);
294 }
template<int N>
Point<double,N> lsst::afw::geom::operator+ ( Extent< int, N > const &  rhs,
Point< double, N > const &  lhs 
)

Definition at line 297 of file Point.h.

297  {
298  return Point<double,N>(lhs) + rhs;
299 }
template<int N>
Point<double,N> lsst::afw::geom::operator+ ( Point< int, N > const &  lhs,
Extent< double, N > const &  rhs 
)

Definition at line 307 of file Point.h.

307  {
308  return Point<double,N>(lhs) + rhs;
309 }
template<int N>
Extent<double,N> lsst::afw::geom::operator+ ( Extent< double, N > const &  lhs,
Extent< int, N > const &  rhs 
)

Definition at line 427 of file Extent.h.

427  {
428  return lhs + Extent<double,N>(rhs);
429 }
template<int N>
Extent<double,N> lsst::afw::geom::operator+ ( Extent< int, N > const &  lhs,
Extent< double, N > const &  rhs 
)

Definition at line 447 of file Extent.h.

447  {
448  return Extent<double,N>(lhs) + rhs;
449 }
template<int N>
Point<double,N>& lsst::afw::geom::operator+= ( Point< double, N > &  lhs,
Extent< int, N > const &  rhs 
)

Definition at line 302 of file Point.h.

302  {
303  return lhs += Extent<double,N>(rhs);
304 }
template<int N>
Extent<double,N>& lsst::afw::geom::operator+= ( Extent< double, N > &  lhs,
Extent< int, N > const &  rhs 
)

Definition at line 432 of file Extent.h.

432  {
433  return lhs += Extent<double,N>(rhs);
434 }
const Angle lsst::afw::geom::operator- ( Angle const  a,
Angle const  d 
)
inline

Definition at line 264 of file Angle.h.

273 {
template<int N>
Point<double,N> lsst::afw::geom::operator- ( Point< double, N > const &  lhs,
Extent< int, N > const &  rhs 
)

Definition at line 312 of file Point.h.

312  {
313  return lhs - Extent<double,N>(rhs);
314 }
template<int N>
Point<double,N> lsst::afw::geom::operator- ( Point< int, N > const &  lhs,
Extent< double, N > const &  rhs 
)

Definition at line 322 of file Point.h.

322  {
323  return Point<double,N>(lhs) - rhs;
324 }
template<int N>
Extent<double,N> lsst::afw::geom::operator- ( Point< double, N > const &  lhs,
Point< int, N > const &  rhs 
)

Definition at line 327 of file Point.h.

327  {
328  return lhs - Point<double,N>(rhs);
329 }
template<int N>
Extent<double,N> lsst::afw::geom::operator- ( Point< int, N > const &  lhs,
Point< double, N > const &  rhs 
)

Definition at line 332 of file Point.h.

332  {
333  return Point<double,N>(lhs) - rhs;
334 }
template<int N>
Extent<double,N> lsst::afw::geom::operator- ( Extent< double, N > const &  lhs,
Extent< int, N > const &  rhs 
)

Definition at line 437 of file Extent.h.

437  {
438  return lhs - Extent<double,N>(rhs);
439 }
template<int N>
Extent<double,N> lsst::afw::geom::operator- ( Extent< int, N > const &  lhs,
Extent< double, N > const &  rhs 
)

Definition at line 452 of file Extent.h.

452  {
453  return Extent<double,N>(lhs) - rhs;
454 }
template<int N>
Point<double,N>& lsst::afw::geom::operator-= ( Point< double, N > &  lhs,
Extent< int, N > const &  rhs 
)

Definition at line 317 of file Point.h.

317  {
318  return lhs -= Extent<double,N>(rhs);
319 }
template<int N>
Extent<double,N>& lsst::afw::geom::operator-= ( Extent< double, N > &  lhs,
Extent< int, N > const &  rhs 
)

Definition at line 442 of file Extent.h.

442  {
443  return lhs -= Extent<double,N>(rhs);
444 }
const Angle lsst::afw::geom::operator/ ( Angle const  a,
int  d 
)
inline

Definition at line 273 of file Angle.h.

273  {
274  return Angle(static_cast<double>(a)/d);
275 }
lsst::afw::geom::Angle Angle
Definition: misc.h:38
const Angle lsst::afw::geom::operator/ ( Angle const  a,
double  d 
)
inline

Definition at line 277 of file Angle.h.

277  {
278  return Angle(static_cast<double>(a)/d);
279 }
lsst::afw::geom::Angle Angle
Definition: misc.h:38
template<typename T >
double lsst::afw::geom::operator/ ( T const  lhs,
Angle const  rhs 
)
template<int N>
Extent<double,N> lsst::afw::geom::operator/ ( ExtentBase< int, N > const &  lhs,
double  rhs 
)

Definition at line 411 of file Extent.h.

411  {
412  return Extent<double,N>(static_cast<Extent<int,N> const &>(lhs)) / rhs;
413 }
template<int N>
void lsst::afw::geom::operator/= ( ExtentBase< int, N > &  lhs,
double  rhs 
)

Definition at line 416 of file Extent.h.

416  {
417  // use "N < 0" so assertion is dependent on template instantiation, instead of triggering all the time
418  static_assert(N < 0, "In-place division of Extent<int,N> by double would truncate.");
419 }
std::ostream& lsst::afw::geom::operator<< ( std::ostream &  os,
lsst::afw::geom::LinearTransform const &  t 
)
template<typename Derived , typename T , int N>
std::ostream& lsst::afw::geom::operator<< ( std::ostream &  os,
CoordinateBase< Derived, T, N > const &  coordinate 
)

Definition at line 199 of file CoordinateBase.h.

199  {
200  os << "(" << coordinate[0];
201  for (int n=1; n<N; ++n) os << ", " << coordinate[n];
202  return os << ")";
203 }
metadata import lsst afw display as afwDisplay n
std::ostream& lsst::afw::geom::operator<< ( std::ostream &  os,
lsst::afw::geom::AffineTransform const &  transform 
)
std::ostream& lsst::afw::geom::operator<< ( std::ostream &  s,
Angle const  a 
)

Output operator for an Angle.

Parameters
sThe output stream
aThe angle
std::ostream & operator<< ( std::ostream &  os,
SpherePoint const &  point 
)

Print the value of a point to a stream.

The exact details of the string representation are unspecified and subject to change, but the following may be regarded as typical: "(10.543250, +32.830583)".

Parameters
osthe stream to which to print point
pointthe point to print to the stream
Returns
a reference to os
Exceptions
std::ostream::failureThrown if an I/O state flag was set that was registered with os.exceptions(). See the documentation of std::ostream for more details.
Exception Safety
Provides basic exception guarantee.
std::ostream& lsst::afw::geom::operator<< ( std::ostream &  os,
Box2I const &  box 
)
std::ostream& lsst::afw::geom::operator<< ( std::ostream &  os,
Box2D const &  box 
)
double lsst::afw::geom::radToArcsec ( double  x)
inline

Definition at line 34 of file Angle.h.

34  {
35  return x * 3600. * 180. / PI;
36 }
double x
double const PI
The ratio of a circle&#39;s circumference to diameter.
Definition: Angle.h:17
double lsst::afw::geom::radToDeg ( double  x)
inline

Definition at line 31 of file Angle.h.

31  {
32  return x * 180. / PI;
33 }
double x
double const PI
The ratio of a circle&#39;s circumference to diameter.
Definition: Angle.h:17
double lsst::afw::geom::radToMas ( double  x)
inline

Definition at line 37 of file Angle.h.

37  {
38  return x * 1000. * 3600. * 180. / PI;
39 }
double x
double const PI
The ratio of a circle&#39;s circumference to diameter.
Definition: Angle.h:17
template<int N>
Extent<int,N> lsst::afw::geom::truncate ( Extent< double, N > const &  input)

Return the component-wise truncation (round towards zero).

In Python, this is available as both a free function and a method on ExtentD.

Variable Documentation

AngleUnit const lsst::afw::geom.arcminutes = AngleUnit(PI/60/180.0)

Definition at line 93 of file Angle.h.

AngleUnit const lsst::afw::geom.arcseconds = AngleUnit(PI/180.0/3600.0)

Definition at line 94 of file Angle.h.

Definition at line 41 of file __init__.py.

AngleUnit const lsst::afw::geom.degrees = AngleUnit(PI/180.0)

Definition at line 91 of file Angle.h.

dictionary lsst.afw.geom.Extent = {(int, 2):Extent2I, (float, 2):Extent2D, (int, 3):Extent3I, (float, 3):Extent3D}

Definition at line 40 of file __init__.py.

double const lsst::afw::geom.HALFPI = boost::math::constants::pi<double>() * 0.5

Definition at line 19 of file Angle.h.

AngleUnit const lsst::afw::geom.hours = AngleUnit(PI*15.0/180.0)

Definition at line 92 of file Angle.h.

double const lsst::afw::geom.INVSQRTPI = 1.0/sqrt(boost::math::constants::pi<double>())

Definition at line 22 of file Angle.h.

Angle const lsst::afw::geom.NullAngle = Angle(-1000000., degrees)

Definition at line 239 of file Angle.h.

double const lsst::afw::geom.ONE_OVER_PI = 1.0 / boost::math::constants::pi<double>()

Definition at line 20 of file Angle.h.

double const lsst::afw::geom.PI = boost::math::constants::pi<double>()

The ratio of a circle's circumference to diameter.

Definition at line 17 of file Angle.h.

dictionary lsst.afw.geom.Point = {(int, 2):Point2I, (float, 2):Point2D, (int, 3):Point3I, (float, 3):Point3D}

Definition at line 39 of file __init__.py.

AngleUnit const lsst::afw::geom.radians = AngleUnit(1.0)

constant with units of radians

Definition at line 90 of file Angle.h.

double const lsst::afw::geom.ROOT2 = boost::math::constants::root_two<double>()

Definition at line 23 of file Angle.h.

double const lsst::afw::geom.SQRTPI = sqrt(boost::math::constants::pi<double>())

Definition at line 21 of file Angle.h.

double const lsst::afw::geom.TWOPI = boost::math::constants::pi<double>() * 2.0

Definition at line 18 of file Angle.h.