opihiexarata.astrometry.solution module
The astrometric solution class.
- class opihiexarata.astrometry.solution.AstrometricSolution(fits_filename: str, solver_engine: AstrometryEngine, vehicle_args: dict = {})[source]
Bases:
ExarataSolution
The primary class describing an astrometric solution, based on an image provided.
This class is the middleware class between the engines which solve the astrometry, and the rest of the OpihiExarata code.
- _original_filename
The original filename where the fits file is stored at, or copied to.
- Type:
string
- _original_header
The original header of the fits file that was pulled to solve for this astrometric solution.
- Type:
Header
- _original_data
The original data of the fits file that was pulled to solve for this astrometric solution.
- Type:
array-like
- skycoord
The sky coordinate which describes the current astrometric solution.
- Type:
SkyCoord
- ra
The right ascension of the center of the image, in decimal degrees.
- Type:
float
- dec
The declination of the center of the image, in decimal degrees.
- Type:
float
- orientation
The angle of orientation that the image is at, in degrees.
- Type:
float
- radius
The radius of the image, or more specifically, the approximate radius that the image covers in the sky, in degrees.
- Type:
float
- pixel_scale
The pixel scale of the image, in arcseconds per pixel.
- Type:
float
- wcs
The world coordinate solution unified interface provided by Astropy for interface to the world coordinate which allows conversion between sky and pixel spaces.
- Type:
Astropy WCS
- star_table
A table detailing the correlation of star locations in both pixel and celestial space.
- Type:
Table
- __init__(fits_filename: str, solver_engine: AstrometryEngine, vehicle_args: dict = {}) None [source]
Solving the astrometry via the image provided. The engine class must also be provided.
- Parameters:
fits_filename (string) – The path of the fits file that contains the data for the astrometric solution.
solver_engine (AstrometryEngine) – The astrometric solver engine class. This is what will act as the “behind the scenes” and solve the field, using this middleware to translate it into something that is easier.
vehicle_args (dictionary) – If the vehicle function for the provided solver engine needs extra parameters not otherwise provided by the standard input, they are given here.
- Return type:
None
- pixel_to_sky_coordinates(x: float | ndarray, y: float | ndarray) tuple[float | ndarray, float | ndarray] [source]
Compute the RA and DEC sky coordinates of this image provided the pixel coordinates. Floating point pixel values are supported.
This is a wrapper around the WCS-based method.
- Parameters:
x (float or array-like) – The x pixel coordinate in the x-axis direction.
y (float or array-like) – The y pixel coordinate in the y-axis direction.
- Returns:
ra (float or array-like) – The right ascension of the pixel coordinate, in degrees.
dec (float or array-like) – The declination of the pixel coordinate, in degrees.
- sky_to_pixel_coordinates(ra: float | ndarray, dec: float | ndarray) tuple[float | ndarray, float | ndarray] [source]
Compute the x and y pixel coordinates of this image provided the RA DEC sky coordinates.
This is a wrapper around the WCS-based method.
- Parameters:
ra (float or array-like) – The right ascension of the pixel coordinate, in degrees.
dec (float or array-like) – The declination of the pixel coordinate, in degrees.
- Returns:
x (float or array-like) – The x pixel coordinate in the x-axis direction.
y (float or array-like) – The y pixel coordinate in the y-axis direction.
- opihiexarata.astrometry.solution._vehicle_astrometrynet_host_api(fits_filename: str) dict [source]
A vehicle function for astrometric solutions. Solve the fits file astrometry using the astrometry.net nova web API.
This is more or less an exact copy of the web version, except for the apikey.
- Parameters:
fits_filename (string) – The path of the fits file that contains the data for the astrometric solution.
- Returns:
astrometry_results – A dictionary containing the results of the astrometric solution.
- Return type:
dict
- opihiexarata.astrometry.solution._vehicle_astrometrynet_web_api(fits_filename: str) dict [source]
A vehicle function for astrometric solutions. Solve the fits file astrometry using the astrometry.net nova web API.
- Parameters:
fits_filename (string) – The path of the fits file that contains the data for the astrometric solution.
- Returns:
astrometry_results – A dictionary containing the results of the astrometric solution.
- Return type:
dict