LSSTApplications  18.1.0
LSSTDataManagementBasePackage
Namespaces | Classes | Functions
lsst::meas::extensions::astrometryNet Namespace Reference

Namespaces

 anetAstrometry
 
 anetBasicAstrometry
 
 astrometry_net
 
 astrometryNetDataConfig
 
 cleanBadPoints
 
 detail
 
 loadAstrometryNetObjects
 
 multiindex
 
 version
 

Classes

class  MultiIndex
 
class  Solver
 A thin C++ wrapper around astrometry.net's solver_t struct. More...
 

Functions

lsst::afw::geom::Angle healpixDistance (int hp, int nside, lsst::afw::geom::SpherePoint const &coord)
 Calculate the distance from coordinates to a healpix. More...
 
 PYBIND11_MODULE (astrometry_net, mod)
 

Function Documentation

◆ healpixDistance()

lsst::afw::geom::Angle lsst::meas::extensions::astrometryNet::healpixDistance ( int  hp,
int  nside,
lsst::afw::geom::SpherePoint const &  coord 
)

Calculate the distance from coordinates to a healpix.

Note that this assumes that the astrometry.net catalog reference system is ICRS.

Definition at line 243 of file astrometry_net.cc.

243  {
244  return lsst::afw::geom::Angle(healpix_distance_to_radec(hp, nside, coord.getLongitude().asDegrees(),
245  coord.getLatitude().asDegrees(), NULL),
247 }
AngleUnit constexpr degrees
constant with units of degrees
Definition: Angle.h:109
lsst::geom::Angle Angle
Definition: misc.h:33

◆ PYBIND11_MODULE()

lsst::meas::extensions::astrometryNet::PYBIND11_MODULE ( astrometry_net  ,
mod   
)

Definition at line 197 of file astrometry_net.cc.

197  {
198  // code that is run at import time
199  fits_use_error_system();
200  start_an_logging();
201 
202  mod.def("healpixDistance", &healpixDistance, "hp"_a, "nside"_a, "coord"_a);
203 
204  mod.def("an_log_init", [](int level) { log_init(static_cast<log_level>(level)); }, "level"_a);
205 
206  mod.def("an_log_get_level", []() { return static_cast<int>(log_get_level()); });
207  mod.def("an_log_set_level", [](int level) { log_set_level(static_cast<log_level>(level)); }, "level"_a);
208  mod.def("finalize", &finalize);
209 
210  declareMultiIndex(mod);
211  declareIndex(mod);
212  declareSolver(mod);
213 }
lsst::afw::geom::Angle healpixDistance(int hp, int nside, lsst::afw::geom::SpherePoint const &coord)
Calculate the distance from coordinates to a healpix.