Skip to main content

Module auto

Module auto 

Source
Expand description

Everything the arcsec command line decides for the user, as a library.

crate::pipeline::solve_image needs to be told everything: the field size in radians, the binning, the database directory and name, the minimum star size in (binned) pixels. A user — of the CLI, or of an application embedding arcsec — knows less than that and expects the rest to be worked out the way the CLI does it. This module is that working-out, shared by the arcsec binary and the C library so the two cannot drift:

use arcsec_core::auto::{Plan, SolveRequest};
let mut img = load();
img.normalize_for_detection();
let request = SolveRequest {
    hint: Some((83.82_f64.to_radians(), (-5.39_f64).to_radians())),
    pixel_scale: Some(1.1),
    search_radius: 10.0_f64.to_radians(),
    ..SolveRequest::default()
};
let plan = Plan::new(&request, img.width, img.height)?;
let solved = plan.solve(&img)?;
println!("RA {:.4}°", solved.wcs.ra0.to_degrees());

Structs§

Plan
A SolveRequest with every decision made, for an image of a given size.
SolveRequest
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).
Solved
A solution from Plan::solve.

Enums§

Event
Something Plan::solve_with reports while it runs.

Constants§

ASTAP_EXTS
File extensions of the star database formats, with the number of sky cells each layout has: .1476 and .290 tile the sky, .001 is one all-sky file.
DB_FOV_RANGES
Field-of-view range each ASTAP database is built for, and how much we prefer it when several are eligible (higher = denser, so a better fit).
MIN_SOLVE_DIM
Smallest image side, in (binned) pixels, that reaches the solver. Detection cannot run on a one-pixel-wide image, and would otherwise panic on it.
SOURCES
Databases an index can be built from, deepest first: an index built from an earlier one is preferred when a directory holds several.

Functions§

available_dbs
Every database prefix present in db_path, in any supported format, sorted.
choose_binning
The binning factor: requested if given and non-zero, else automatic.
collect_index_files
Collect and rank astrometry.net index files for blind solving.
default_catalog_dir
Where catalogues are kept, in priority order:
default_db_path
The star database directory to use when none is named.
depth_rank
Position of db in SOURCES (deeper is smaller); unknown names sort last.
find_arcsec_index
The arcsec blind index path names: the file itself, or the first *.arcsecix in a directory. None when there is none (the path may still hold Astrometry.net files).
has_star_database
Whether dir holds any of the star databases arcsec knows (D05 … W08), judged by the file each ships for its first cell (d50_0101.1476, w08_0101.001, …).
index_files
Every arcsec blind index (*.arcsecix) directly in dir, sorted by name. Empty when there are none or dir cannot be read.
preferred_index
The readable arcsec index in dir the solver uses: the one built from the deepest database (by SOURCES), then by file name. None if there is none.
select_db_for_fov
Pick the installed database best suited to a fov_deg field (the longer side, degrees): the densest whose published range contains it, else the nearest. None when db_path holds no star database at all.
wants_installed_index
Whether a search with template’s radius and field is wide enough that an installed index is consulted automatically: more than five fields, and at least 10°.