read_frame_dty#

anri.io.read_frame_dty(ds, sparsefile=None)[source]#

Each frame’s dty: the DataSet’s (corrected) dty of its row, plus the motion of dty within the row.

ImageD11 gives every frame of a row one dty (e.g. the mean over a rotation of a fly or helical scan, where dty moves while omega turns). The raw readings in the sparse file move within the row; a straight line fitted to them over the row’s frames (time) gives that motion, smooth below the encoder’s resolution. Whatever the DataSet corrects per row (an offset, or the mean) is kept. Where the sparse file has no reading per frame, the motion is 0.

Parameters:
  • ds (dict) – From read_dataset(): “dty”, “scans”, “dtymotor” and “sparsefile”

  • sparsefile (str | None, default: None) – The sparse pixels file (default: the DataSet’s)

Returns:

np.ndarray – [scans, frames] dty, as the DataSet’s dty