Skip to main content

SolveRequest

Struct SolveRequest 

Source
pub struct SolveRequest {
Show 18 fields pub hint: Option<(f64, f64)>, pub fov_height: Option<f64>, pub pixel_scale: Option<f64>, pub search_radius: f64, pub downsample: Option<usize>, pub db_path: Option<PathBuf>, pub db_name: Option<String>, pub index: Option<PathBuf>, pub index_first: bool, pub auto_index: bool, pub hfd_min_arcsec: f64, pub quad_tolerance: f64, pub max_stars: usize, pub method: SolveMethod, pub speed: SearchSpeed, pub threads: usize, pub sip: bool, pub cancel: Option<CancelToken>,
}
Expand description

What the caller knows about an image and how it wants it solved, in the caller’s terms. Every field has the CLI’s default (SolveRequest::default).

Fields§

§hint: Option<(f64, f64)>

Approximate centre (RA, Dec), radians. None for no hint: the search starts at (0, 0), and an installed blind index is used as for any wide search.

§fov_height: Option<f64>

Field of view along the image height, radians (ASTAP’s -fov). Takes precedence over Self::pixel_scale.

§pixel_scale: Option<f64>

Pixel scale of the unbinned image, arcseconds per pixel (for instance from the FOCALLEN and XPIXSZ header keywords). Without it or a field of view, 1″/px is assumed.

§search_radius: f64

Search radius around the hint, radians. Negative or NaN means 0.

§downsample: Option<usize>

Binning factor; None or Some(0) chooses one (choose_binning).

§db_path: Option<PathBuf>

Star database directory; None for default_db_path.

§db_name: Option<String>

Star database name ("d50"); None to choose by field size (select_db_for_fov).

§index: Option<PathBuf>

Blind index to use (the CLI’s --index): an arcsec .arcsecix file, a directory holding one, or Astrometry.net index-*.fits files. None still uses an arcsec index installed in the catalogue directory for a wide search, unless Self::auto_index is off.

§index_first: bool

With a hint, whether the index named in Self::index is tried before the search round the hint (the CLI’s --index: true, the default), or only after the spiral has searched a few fields round it (false), as an installed index is. Without a hint the index always comes first.

§auto_index: bool

Consult an arcsec index installed in the catalogue directory (or beside the star database) when the search is wider than a few fields and at least 10°. On by default, as in the CLI.

§hfd_min_arcsec: f64

Minimum star size (HFD), arcseconds.

§quad_tolerance: f64

Pattern-matching tolerance.

§max_stars: usize

Maximum number of image stars to use.

§method: SolveMethod

Pattern-matching algorithm.

§speed: SearchSpeed

Catalogue window per spiral position.

§threads: usize

Worker threads for this solve; 0 for the process-wide limit (crate::max_threads).

§sip: bool

Fit SIP distortion polynomials to the solution (crate::wcs::fit_sip).

§cancel: Option<CancelToken>

Stop early when this token is cancelled (ArcsecError::Cancelled).

Trait Implementations§

Source§

impl Clone for SolveRequest

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SolveRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SolveRequest

Source§

fn default() -> Self

The CLI’s defaults: no hint, a 180° radius (the whole sky), 500 stars, tolerance 0.007, minimum HFD 1.5″, automatic binning and database.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.