pub fn run_health(
path: &Path,
options: &RunHealthOptions,
) -> Result<RunHealth, IoError>Expand description
Compute a run-health summary from /entry/DASlogs of a NeXus file.
See the module docs for the last-value-held semantics, the duration fallback, and the SNS PV-name defaults.
§Errors
IoError::Hdf5Errorwhen the file or/entrycannot be opened.IoError::InvalidParameterwhen a PV is present but malformed (time/value length mismatch, non-finite entries, negative power values, decreasing timestamps),/entry/durationis present but non-positive or non-finite, the integration window is non-positive, orpower_dip_fractionis not a positive finite number.
Absent PVs (or an absent DASlogs group) are not errors — the
corresponding fields are None, as is a present PV with zero log
entries (“no entries logged” carries no integrable information).
Absence vs malformed is decided by link existence (member_names),
the read_dead_pixel_mask idiom: collapsing “not there” and “there
but unreadable” into one path would mask real file corruption as
absence.
beam_dip_fraction is additionally None (with median_power still
reported) when the sample median of the power entries is non-positive:
the dip threshold power_dip_fraction × median is then undefined —
see RunHealth::beam_dip_fraction.