write_scan#
- anri.io.write_scan(hout, scan, frame, pixel, value, omega, dty, det_shape, cut=1, omega_motor='rot_center', dty_motor='dty')[source]#
Write one dty row of sparse pixels as an ImageD11 scan group.
Values are rounded to integer counts and only counts
> cutare kept, as ImageD11’s segmenter does. Pixels must be sorted by (frame, pixel), asanri.fwd.render_row()returns them.- Parameters:
hout (
File) – Open, writable HDF5 filescan (
str) – Group name, e.g. “1.1”frame (
ndarray) – Sparse pixels: frame index within the row, pixel = slow * n_fast + fast, and intensitypixel (
ndarray) – Sparse pixels: frame index within the row, pixel = slow * n_fast + fast, and intensityvalue (
ndarray) – Sparse pixels: frame index within the row, pixel = slow * n_fast + fast, and intensityomega (
ndarray) – [n_frames] motor positions of the rowdty (
ndarray) – [n_frames] motor positions of the rowcut (
float, default:1) – Keep counts strictly above thisomega_motor (
str, default:'rot_center') – Motor names, which must match the DataSet’somegamotoranddtymotordty_motor (
str, default:'dty') – Motor names, which must match the DataSet’somegamotoranddtymotor
- Returns:
n_pixels (
int) – Number of pixels written