simulate_sparse#
- anri.io.simulate_sparse(path, entries, hkls, F2, geom, omega, dty, det_shape, cut=1, transmission=None, omega_motor='rot_center', dty_motor='dty', window=(3, 7, 7), batch=65536, max_frames=None)[source]#
Render every dty row of a scan and write the sparse pixels file, one row at a time.
- Parameters:
path (
str) – Output HDF5 file; must not existentries (
dict) – Seeanri.fwd.render_row(), for a single phasehkls (
ndarray) – Seeanri.fwd.render_row(), for a single phaseF2 (
ndarray) – Seeanri.fwd.render_row(), for a single phasegeom (
dict) – Seeanri.fwd.render_row(), for a single phaseomega (
ndarray) – [n_rows, n_frames] motor positions, e.g. frommotor_grid()or an ImageD11 DataSetdty (
ndarray) – [n_rows, n_frames] motor positions, e.g. frommotor_grid()or an ImageD11 DataSetcut (
float, default:1) – Keep counts strictly above thistransmission (
ndarray|None, default:None) – Optional [n_rows, n_frames] transmission factor per frameomega_motor (
str, default:'rot_center') – Motor names written to the filedty_motor (
str, default:'dty') – Motor names written to the filewindow (
tuple[int,int,int], default:(3, 7, 7)) – Passed on toanri.fwd.render_row()batch (
int, default:65536) – Passed on toanri.fwd.render_row()max_frames (
int|None, default:None) – Passed on toanri.fwd.render_row()
- Returns:
stats (
dict) – Per row: “n_peaks” rendered, “n_pixels” written, and the minimum window “captured” fraction