read_monitor#

anri.io.read_monitor(sparsefile, groups, name, masterfile=None)[source]#

Read a counter (e.g. “fpico6”) for each scan group, frame by frame, as ImageD11’s DataSet.get_monitor.

It is read from the sparse file’s <group>/measurement, or, if absent there, from the raw master file’s scan of the same name: a sparse group holds the frames of that scan, in order. Values are cut to the group’s number of frames.

Parameters:
  • sparsefile (str) – ImageD11 sparse pixels file

  • groups (list) – Scan groups, e.g. “1.1”

  • name (str) – Counter name

  • masterfile (str | None, default: None) – The raw data’s master file (read_dataset(...)["masterfile"]), for counters the sparse file lacks

Returns:

dict – {group: [n_frames] array}