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.

  • ts_std_mms (tuple[float, float, float] | None)

  • rs_std_degs (tuple[float, float, float] | None)

  • 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

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

log

Get a logger.

motion_file

motion_file_tr_ms

rs_std_degs

ts_std_mms

get_dynamic(phantom, sim_conf)[source]#

Get dynamic information.

Parameters:
Return type:

DynamicData

property log: Logger#

Get a logger.