RandomMotionImageHandler#
- class snake.core.handlers.motion.image.RandomMotionImageHandler(*, ts_std_mms=None, rs_std_degs=None, motion_file=None, motion_file_tr_ms=None)[source]#
Bases:
AbstractHandler
Add Random Motion in Image.
- Parameters:
ts_std_mm – Translation standard deviation, in mm/s.
rs_std_mm – Rotation standard deviation, in radians/s.
motion_file (str) – If provided, the motion file is loaded and resampled to match the number of frames in the simulation. The motion is then added to the data.
motion_file_tr (float) – Original TR of the motion file, in seconds.
motion_file_tr_ms (float | None)
Notes
The motion is generated by drawing from a normal distribution with standard deviation for the 6 motion parameters (3 translations and 3 rotations, in this order). Then the cumulative motion is computed by summing the motion at each frame.
The handlers is parametrized with speed in mm/s and rad/s, as these values provides an independent control of the motion amplitude regardless of the time resolution for the simulation.
Methods
__init__
Get dynamic information.
get_dynamic_kspace
Get the dynamic kspace information of the handler.
get_static
Get the static information of the handler.
to_yaml
Show the yaml config associated with the handler.
Attributes
Get a logger.
motion_file
motion_file_tr_ms
rs_std_degs
ts_std_mms