LSSTApplications  17.0+50,17.0+84,17.0+9,18.0.0+14,18.0.0+2,18.0.0+30,18.0.0+4,18.0.0+9,18.0.0-2-ge43143a+4,18.1.0-1-g0001055,18.1.0-1-g0896a44+6,18.1.0-1-g1349e88+4,18.1.0-1-g2505f39+3,18.1.0-1-g380d4d4+4,18.1.0-1-g5e4b7ea,18.1.0-1-g85f8cd4+3,18.1.0-1-g9a6769a+2,18.1.0-1-ga1a4c1a+2,18.1.0-1-gc037db8,18.1.0-1-gd55f500+1,18.1.0-1-ge10677a+3,18.1.0-10-g73b8679e+7,18.1.0-11-g311e899+3,18.1.0-12-g0d73a3591,18.1.0-12-gc95f69a+3,18.1.0-2-g000ad9a+3,18.1.0-2-g31c43f9+3,18.1.0-2-g9c63283+4,18.1.0-2-gdf0b915+4,18.1.0-2-gf03bb23,18.1.0-3-g2e29e3d+6,18.1.0-3-g52aa583+2,18.1.0-3-g9cb968e+3,18.1.0-4-gd2e8982+6,18.1.0-5-g510c42a+3,18.1.0-5-gaeab27e+4,18.1.0-6-gdda7f3e+6,18.1.0-7-g89824ecc+4,w.2019.32
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::geom::Angle healpixDistance (int hp, int nside, lsst::geom::SpherePoint const &coord)
 Calculate the distance from coordinates to a healpix. More...
 
 PYBIND11_MODULE (astrometry_net, mod)
 

Function Documentation

◆ healpixDistance()

lsst::geom::Angle lsst::meas::extensions::astrometryNet::healpixDistance ( int  hp,
int  nside,
lsst::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::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::geom::Angle healpixDistance(int hp, int nside, lsst::geom::SpherePoint const &coord)
Calculate the distance from coordinates to a healpix.