Astronomy Utilities¶
These classes define astronomical utility methods.
Defined in src/utils/AstroUtils.h
-
class Caesar::AstroUtils : public TObject¶
Public Functions
-
AstroUtils()¶
Class constructor: initialize structures.
-
virtual ~AstroUtils()¶
Class destructor: free allocated memory.
Public Static Functions
-
static int GetIAUCoords(std::string &iau, const std::string &s)¶
Get IAU naming from WCS string coordinates.
-
static int WCSToPixelCoords(double &ix, double &iy, WCS *wcs, double xpos, double ypos)¶
Get image coordinates corresponding to WCS coordinates.
-
static int PixelToWCSCoords(double &xpos, double &ypos, WCS *wcs, double ix, double iy)¶
Get WCS coordinates corresponding to image coordinates.
-
static int PixelToWCSStrCoords(std::string &wcs_str, WCS *wcs, double ix, double iy, int max_str_length = 4096)¶
Get WCS coordinates in string format corresponding to image coordinates.
-
static int PixelToWCSCoords(Caesar::Image *image, WCS *wcs, double ix, double iy, double &xpos, double &ypos, bool useImageCoords = true)¶
Get WCS coordinates corresponding to image coordinates.
-
static int PixelToWCSStrCoords(Caesar::Image *image, WCS *wcs, double ix, double iy, std::string &wcs_str, bool useImageCoords = true, int max_str_length = 4096)¶
Get WCS coordinates in string format corresponding to image coordinates.
-
static int PixelToWCSCoords(Caesar::Image *image, double ix, double iy, double &xpos, double &ypos, int coordSystem = -1, bool useImageCoords = true)¶
Get WCS coordinates corresponding to image coordinates.
-
static int PixelToWCSStrCoords(Caesar::Image *image, double ix, double iy, std::string &wcs_pos, int coordSystem = -1, bool useImageCoords = true, int max_str_length = 4096)¶
Get WCS coordinates in string format corresponding to image coordinates.
-
static inline double GetBeamArea(double Bmaj, double Bmin)¶
Get beam area from BMAJ, BMIN.
-
static inline double GetBeamAreaInPixels(double Bmaj, double Bmin, double dX, double dY)¶
Get beam area in pixels given Bmaj, Bmin and pixel sizes (dx, dy) in deg.
-
static inline int GetBeamWidthInPixels(double Bmaj, double Bmin, double dX, double dY)¶
Get beam width in pixels given Bmaj, Bmin and pixel sizes (dx, dy) in deg.
-
static Contour *PixelToWCSContour(Contour *contour, WCS *wcs, double pixOffset = 0, bool castCoordsToInt = false)¶
Convert contour from pixel coordinates to sky coordinates.
-
static int PixelToWCSContours(std::vector<Contour*> &contours_wcs, std::vector<Contour*> const &contours, WCS *wcs, double pixOffset = 0, bool castCoordsToInt = false)¶
Convert contour list from pixel coordinates to sky coordinates.
-
static TEllipse *PixelToWCSEllipse(TEllipse *ellipse, WCS *wcs, double pixOffset = 0)¶
Convert ellipse from pixel coordinates to sky coordinates.
-
static TEllipse *PixelToWCSEllipseSimple(TEllipse *ellipse, WCS *wcs, double pixOffset = 0)¶
Convert ellipse from pixel coordinates to sky coordinates neglecting sky projection and assuming Euclidean distances.
-
static TEllipse *GetBeamDeconvolvedEllipse(TEllipse *ellipse, TEllipse *beam)¶
Compute ellipse deconvolved from ellipse beam.
-
static int GetBeamDeconvolvedEllipsePars(double &bmaj_deconv, double &bmin_deconv, double &bpa_deconv, double bmaj, double bmin, double bpa, double bmaj_beam, double bmin_beam, double bpa_beam)¶
Compute ellipse pars deconvolved from ellipse beam.
-
static double GetWCSPointDist_Haversine(double ra1, double dec1, double ra2, double dec2)¶
Compute WCS beam ellipse pars from pixel ellipse pars.
Get distance (in degrees) between two points on the sky using Haversine formula
-
static double GetWCSPointDist_Vincenty(double ra1, double dec1, double ra2, double dec2)¶
Get distance (in degrees) between two points on the sky using Vincenty formula.
-
static double GetWCSPointBearing(double ra1, double dec1, double ra2, double dec2)¶
Get point bearing (in degrees) between two points on the sky.
-
static std::string EllipseToDS9Region(TEllipse *ellipse, std::string text = "", std::string color = "white", std::vector<std::string> tags = {}, double pixOffset = 0)¶
Convert ellipse to DS9 format.
-
static std::string ContourToDS9Region(Contour *contour, std::string text = "", std::string color = "white", std::vector<std::string> tags = {}, bool useImageCoords = true, double pixOffset = 0)¶
Convert contour to DS9 format.
-
static std::string GetDS9WCSTypeHeader(int coordSys)¶
Returns DS9 WCS type header from flag.
-
AstroUtils()¶