5.47. solve_field

Solves the field for the given FITS files.


FitsArray.solve_field(self, api_key: str, reference: Fits | int = 0, solve_timeout: int = 120, force_image_upload: bool = False, max_control_points: int = 50, min_area: int = 5, output: str | None = None) Self

Solves the field for the given FITS files.

Parameters

api_keystr

The API key for astrometry.net (https://nova.astrometry.net/api_help).

referenceUnion[Fits, int], default=0

The reference image or the index of the Fits object in the FitsArray to be solved.

solve_timeoutint, default=120

Timeout for solving the field, in seconds.

force_image_uploadbool, default=False

If True, uploads the image to astrometry.net even if it is possible to detect sources in the image locally. This option generally takes longer than finding sources locally. The image will still be uploaded unless photutils is installed. See Astroquery documentation.

max_control_pointsint, default=50

The maximum number of control point sources to find the transformation. See Astroalign documentation for details.

min_areaint, default=5

Minimum number of connected pixels to be considered a source. See Astroalign documentation.

outputOptional[str]

New path to save the file.

Returns

FitsArray

A Fits object of the plate-solved image.

Raises

Unsolvable

Raised when the reference data cannot be solved or the operation times out.


5.47.1. Example:

from myraflib import FitsArray
import math

fa = FitsArray.sample()
solved_fa = fa.solve_field("API-KEY")