SimulatedShell¶
from mcot.dippi.scan import SimulatedShell
-
class
mcot.dippi.scan.SimulatedShell(scanner: mcot.dippi.scan.Scanner = <factory>, encoding: mcot.dippi.scan.Encoding = <Encoding.linear: 1>, bval: float = 3.0, gradients: Optional[numpy.ndarray] = None, ngradients_in: dataclasses.InitVar = 30, ndim_in: dataclasses.InitVar = 3, dual_echo: bool = True, t_phase: float = 30, theta_b0: float = 0.0)[source]¶ Represents the scan settings and physical constants
Used in both the simulator and in fitting
This represents a single shell of diffusion-weighted susceptibility data
The main scanner parameters to be set are B0, max_gradient, slew_rate, and the duration of the readout (t_ro) and pulse (t_pulse)
The main acquisition parameters to be set are bval, t_phase, and gradients. The gradients can be initialised uniformly by settings ngradients_in.
The second refocus pulse can be removed by setting dual_echo to false (will raise an error if t_ro > t_phase)
Based on this input the following times are computed - TE1 = readout1: time of first spin echo/readout - TE2: time of second spin echo (only if dual_echo=True) - readout2: time of second readout (=echo time + t_phase) - time_done: time the second readout is finished (readout2 + t_ro/2)
-
__init__(scanner: mcot.dippi.scan.Scanner = <factory>, encoding: mcot.dippi.scan.Encoding = <Encoding.linear: 1>, bval: float = 3.0, gradients: Optional[numpy.ndarray] = None, ngradients_in: dataclasses.InitVar = 30, ndim_in: dataclasses.InitVar = 3, dual_echo: bool = True, t_phase: float = 30, theta_b0: float = 0.0) → None¶ Initialize self. See help(type(self)) for accurate signature.
Inheritance diagram

Methods
from_dict(kvs, *[, infer_missing])from_json(s, *[, parse_float, parse_int, …])schema(*[, infer_missing, only, exclude, …])spherical_harmonics(lmax[, odd])to_dict([encode_json])to_json(*[, skipkeys, ensure_ascii, …])Attributes
TE1Time till first readout in ms
TE2Time till second readout
b0_dirb0_groupbvalGradients orientations (1D array for angles in 2D-plane or (N, 3) array for full gradient orientations)
dataclass_json_configdual_echotime of phase accumulation
encodingb-value in ms/micrometer^2
gradientsHelper parameters to define a default set of bvecs (if user does not provide one)
ndimWhether gradients are on a circle (2) or sphere (3)
ndim_inWhether to add a second refocus pulse
ngradientsNumber of gradient orientations in this shell
ngradients_inreadout1Time till the centre of the first readout in ms
readout2Time till the second readout in ms
refocus1Time of the centre of the first refocus pulse
refocus2Time of the centre of the second refocus pulse
t_diff1Time between end of excitation and start of refocus pulse in ms
t_diff2Total duration of pulse (with ramp-up and ramp-down) in ms
t_phaseangle of B0 with the z-direction (assumed in x-z plane)
theta_b0time_doneTime from the excitation pulse till the end of the second readout in ms
-
from_dict¶
-
classmethod
SimulatedShell.from_dict(kvs: Optional[Union[dict, list, str, int, float, bool]], *, infer_missing=False) → A¶
from_json¶
-
classmethod
SimulatedShell.from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) → A¶
schema¶
-
classmethod
SimulatedShell.schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) → dataclasses_json.mm.SchemaF[A]¶
to_dict¶
-
SimulatedShell.to_dict(encode_json=False) → Dict[str, Optional[Union[dict, list, str, int, float, bool]]]¶
to_json¶
-
SimulatedShell.to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[str, int]] = None, separators: Optional[Tuple[str, str]] = None, default: Optional[Callable] = None, sort_keys: bool = False, **kw) → str¶