Repository navigation
rustafits 1.8.0
The Analysis-mode entry of Athenaeum's star measurement moves here (port plan
phase 4): the raw-frame input, the measurement with the frame figures its
Analysis tab shows, and the two helpers under them, copied from Athenaeum's
analysis/ at e6344ddd, the float code unchanged. Athenaeum's Analysis tab,
Blink and plate-solve gate call them. Plus the XISF XBAYROFF / YBAYROFF
fix (see Fixed): the raw input leaves the offsets to the readers. Additive for
existing callers, bar that fix.
Port plan phase 5: rustafits analyze and convert --annotate measure with
star_measure::analysis_mode, so the CLI prints the numbers Athenaeum's
Analysis tab shows. The annotation API draws any star list, not only a legacy
AnalysisResult. ImageAnalyzer::analyze* is deprecated and goes in 2.0. A
FITS XBAYROFF / YBAYROFF is read by Athenaeum's rule. The library stays
additive, hence a minor bump; the CLI's numbers change by design (see Changed).
Added
star_measure::raw:read_raw_framereads a FITS / XISF file as a
RawFrame(mono, a Bayer mosaic or RGB planes, in the file's ADU) with the
facts the measurement needs: full scale, the clip fromDATAMAX, the gain
fromEGAIN. The header facts are read by Athenaeum's own header-value
rules, copied into the crate (not byImageConverter::read_header's
parsing), so that the Analysis numbers do not move on any input, malformed
header values included; the Bayer pattern is the readers' own (both fold
XBAYROFF/YBAYROFF).star_measure::analysis_mode:FrameOptions(6.0 σ, Moffat 4, 500
stars: Athenaeum's Analysis defaults),measure_raw_frameand
FrameSummary(the frame figures the Analysis tab shows: medians, frame
SNR, SNR weight, PSF signal, background and noise, trail R², refusals,
verdict). Together withraw, the stable entry ofstar_measure;
FrameOptionsandFrameSummaryare#[non_exhaustive], so fields can be
added in 1.x.star_measure::green(a Bayer mosaic measured on its green sites) and
star_measure::trail(trail R²: the Rayleigh statistic of the measured
stars' angles): the two helpersanalysis_modecalls, public like the rest
ofstar_measure's submodules, outside the stable entry.StarOverlayandOverlayStar: the star list the annotation functions
draw: each star's position and ellipse shape in the pixels the frame was
measured on, and the frame's median FWHM.StarOverlay::from_measurement
builds one from ananalysis_modemeasurement, andStarOverlay::from(&result)
from a legacyAnalysisResult. Both are plain structs with public fields, so
a caller can fill one from its own measurements. Their fields are fixed for
1.x.compute_overlay,create_overlay_layer,annotate_image_with: the
three annotation tiers (raw geometry, a transparent RGBA layer, burn-in) over
aStarOverlay.compute_annotations,create_annotation_layerand
annotate_imagestay and give the same results: they call the new functions.
StarAnnotationnow derivesDebug,Clone,CopyandPartialEq.rustafits analyze --detection-threshold <SIGMA>(2 to 20, default 6.0),
--psf-model moffat4|auto(defaultmoffat4) and--max-stars <N>
(10 to 2000, default 500): the three settings of Athenaeum's Analysis tab.
Changed
rustafits analyzeandconvert --annotatemeasure with
star_measure::analysis_mode, so their numbers change: they are Athenaeum's
Analysis numbers (a 6.0 σ matched-filter threshold, a Moffat profile with
beta fixed at 4, the brightest 500 good stars), no longerImageAnalyzer's.
convert -adraws the stars that measurement kept. Onanalyze:- the table's VERDICT column replaces TRAIL. A frame the measurement judges
trailed, defocused or without stars shows that word,-for its medians,
and--sortby a metric ranks it after every other frame; - the CSV and JSON keep their first 19 columns in their order and append six:
channels,stars_refused,frame_verdict,measure_version,
detection_threshold,psf_model; median_betais empty (nullin JSON) unless--psf-model auto, because
Moffat 4 fixes beta;--max-starsis the star budget the measurement works with. On
convert --max-starsit is now 10 to 2000: a value below 10 is refused.
- the table's VERDICT column replaces TRAIL. A frame the measurement judges
analyzeandconvert -arun about as fast as before on 26 MP frames (the
timing ran on a loaded machine, so there are no percentages), with 0.1 to
0.25 GB more peak memory at one and at two jobs. The-jdefault for both
stays 2.convert -anow fails a file that the measurement's reader refuses (it reads
the file's ADU facts,star_measure::raw::read_raw_frame), even when a plain
render could read it. The error names the file.analyzerefuses the same
files.examples/analyze_batch.rsshowsanalysis_mode(rayon over files, one
shared pool) and takes the files on the command line.
Deprecated
ImageAnalyzer::analyze,analyze_data,analyze_rawand
analyze_batch: usestar_measure::analysis_mode(raw::read_raw_frame,
measure_raw_frame,FrameSummary). They are removed in 2.0.detect_fast*
and the builder are not deprecated.- The CLI flags of the old analyzer, still accepted so scripts keep running and
hidden from--help; each prints a warning on stderr and goes in 2.0:
analyze --sigma(now--detection-threshold, for another detector: default
6.0, it was 5.0),--measure-caponanalyzeandconvert(no effect: the
budget is--max-stars) andanalyze --no-debayer(no effect: a mosaic is
measured on its green sites).
Fixed
- XISF:
XBAYROFF/YBAYROFF(<FITSKeyword>) are folded into the Bayer
pattern, as they are for FITS since 1.7.0: an oddXBAYROFFswaps the 2×2
cell's columns (RGGB → GRBG), an oddYBAYROFFits rows (RGGB → GBRG). A
mosaic with an odd offset was debayered with the wrong phase by the
super-pixel and the VNG render (red and blue exchanged, or green and
magenta), and with one odd offsetImageAnalyzer's green interpolation
(analyze*,detect_fast*) took red / blue sites for green.read_header
andrustafits inforeport the folded pattern. An XISF offset is read by
Athenaeum's rule for header values, copied into the crate: a number, rounded
(0.6counts as 1), the first non-empty value of the keyword, so that the
XISF figures of Athenaeum's Analysis tab, which always read it this way, do
not move on any input. Since 1.8.0 the FITS reader reads its offsets by
Athenaeum's FITS rule too (see the FITS entry below); the two rules still
differ on a fraction, on an empty first card and on blanks around the name.
The keyword list ofread_headerandrustafits infostill shows
XBAYROFFbyImageHeader's own rule, so on an unusual value it can differ
from the folded pattern. The offsets are folded onto whatever pattern
the file declares (BAYERPATor<ColorFilterArray>), as that tab always
did: a file whose<ColorFilterArray>already includes its odd offset has it
counted twice. Files without the keywords, or with even offsets, read and
render exactly as before. - FITS:
XBAYROFF/YBAYROFFare read by Athenaeum's catalog rule: a quoted
value ('1'counts as 1), the keyword in any case, and the first card of a
repeated keyword. The reader used to take the integer prefix of an unquoted
card only ('1'read 0), to match upper case only and to keep the last card
of a repeat, so on such a file its Bayer pattern disagreed with the one
Athenaeum's catalog records, and the render and the measurement used the
wrong phase. A fractional value still truncates in FITS (0.6is 0) and
rounds in XISF (0.6is 1): that is each format's rule in Athenaeum, kept by
design. A file with plain integer offsets reads exactly as before.