Skip to main content

read_run_log

Function read_run_log 

Source
pub fn read_run_log(path: &Path, pv: &str) -> Result<RunLog, IoError>
Expand description

Read a DASlogs PV as a transition log (issue #637).

Reads /entry/DASlogs/<pv>/time and /value (numeric) and /entry/duration. Times are seconds since run start (the same epoch the NXevent_data event_time_zero values are relative to, so derived intervals feed crate::nexus::load_nexus_bank_spectrum directly). Corrupt reconnect records — backward/NaN time or subnormal value payload — are dropped and counted in RunLog::n_dropped_corrupt (real SNS files contain both shapes; module docs).

§Errors

IoError::FileNotFound when the file cannot be opened; IoError::InvalidParameter when the PV group or datasets are missing or non-numeric; IoError::ShapeMismatch when time and value lengths differ.