Sequences#

Function definitions for full sequences

Functions:

balanced_ssfp(system_specs, matrix_size, ...)

Defines a balanced steady state free precession sequence with a/2-TR/2 preparation, with a cartesian readout.

flash(system_specs, matrix_size, ...[, ...])

Defines a 2D gradient echo sequence.

se_ssepi(system_specs, field_of_view, ...[, ...])

Defines a single shot EPI sequence.

single_line_cartesian2d(system_specs, ...[, ...])

Constructs a basis spin echo single line acquisition scheme for a cartesian trajectory.

balanced_ssfp(system_specs, matrix_size, inplane_resolution, slice_thickness, adc_duration, flip_angle, pulse_duration, repetition_time, slice_position_offset=<Quantity(0.0, 'meter')>, time_bandwidth_product=4.0, dummy_shots=None, fuse_slice_rewind_and_prephaser=True)#

Defines a balanced steady state free precession sequence with a/2-TR/2 preparation, with a cartesian readout.

Assumptions in temporal optimization for combinations of specified arguments:

  • Neither TR nor adc_duration:

    Timing is optimized to have minimal TR, hence also shortest possible ADC-duration

  • TR and adc_duration is provided:
    Padding around the readout gradient is applied to match TR if needed. If ADC is longer

    than possible, TR is set to minimal feasible value, marked by a warning.

  • TR specified, adc_duration is None:

    ADC-duration is maximized, according to given TR

  • TR is None, adc_duration is specified:

    TR is set to minimally possible value for given adc-duration

In all cases the gradient limits for combined k-space traverse during the prephaser is respected, both for fusing and not fusing the slice select rewinder with the phase and readout prephaser.

.                 |                  TR                  |                 .
.                     |       TE         |                                 .
.                                                                          .
.            RF:     /\                                                    .
.            ADC   \/  \/      |||||||||||||||||||||                       .
.                  ______                                                  .
.            SS:  /      \    _______________________                      .
.                         \__/                       \__/                  .
.                              _____________________                       .
.            RO:  ________    /                     \                      .
.                         \__/                       \__/                  .
.                                                    __                    .
.            PE:  ________    ______________________/  \                   .
.                         \__/                                             .
Parameters:
  • system_specs (SystemSpec) – SystemSpecification

  • matrix_size (ndarray) – array of shape (2, )

  • inplane_resolution (Quantity) – Quantity[Length] of shape (2, )

  • repetition_time (Quantity) – Quantity[Time] containing the required repetition_time If None or too short, the shortest possible time under system constraints is used.

  • slice_thickness (Quantity) – Quantity[Length] containing the required slice-thickness

  • adc_duration (Quantity) – Quantity[time] Total duration of adc-sampling for a single TR

  • flip_angle (Quantity) – Quantity[Angle] containing the required flip_angle

  • pulse_duration (Quantity) – Quantity[Time] Total pulse duration (corresponds to flat_duration of the slice selection gradient)

  • slice_position_offset (Quantity) – Quantity[Length] positional offset in slice normal direction defining the frequency offset of the RF pulse

  • time_bandwidth_product (float) – float - used to calculate the rf bandwidth from duration

  • dummy_shots (Optional[int]) – number of shots(TRs) without adc-events before starting the acquisition

  • fuse_slice_rewind_and_prephaser (bool) – If True, the slice selection rewinder is recalculated to match the duration of the prephaser, resulting in the fastest possible 3D k-space traverse.

Return type:

List[Sequence]

Returns:

List of length (n_dummy+matrix_size[1]) containting one Sequence object per TR

flash(system_specs, matrix_size, inplane_resolution, slice_thickness, adc_duration, flip_angle, pulse_duration, repetition_time, echo_time, slice_position_offset=<Quantity(0.0, 'meter')>, time_bandwidth_product=4.0, dummy_shots=0, fuse_slice_rewind_and_prephaser=True)#

Defines a 2D gradient echo sequence.

Parameters:
  • system_specs (SystemSpec) – SystemSpecifications

  • matrix_size (ndarray) – array of shape (2, ) containing the resulting matrix dimensions

  • inplane_resolution (Quantity) – Quantity[Length] of shape (2, ) containing the in-plane voxel dimensions

  • slice_thickness (Quantity) – Quantity[Length] containing the required slice-thickness

  • adc_duration (Quantity) – Quantity[time] Total duration of adc-sampling for a single TR

  • repetition_time (Quantity) – Quantity[Time] containing the required repetition_time

  • echo_time (Quantity) – Quantity[Time] containing the required echo-time. If too short for given system specifications, it is increased to minimum and a warning is raised.

  • flip_angle (Quantity) – Quantity[Angle] containing the required flip_angle

  • pulse_duration (Quantity) – Quantity[Time] Total pulse duration (corresponds to flat_duration of the slice selection gradient)

  • slice_position_offset (Quantity) – Quantity[Length] positional offset in slice normal direction defining the frequency offset of the RF pulse

  • time_bandwidth_product (float) – float - used to calculate the rf bandwidth from duration

  • dummy_shots (int) – number of dummy shots (TRs) without adc-events, with k-space center phase encoding

  • fuse_slice_rewind_and_prephaser (bool) – If True, the slice selection rewinder is recalculated to match the duration of the prephaser, resulting in the fastest possible 3D k-space traverse.

Return type:

List[Sequence]

Returns:

List of sequence objects, that each represent a single TR

se_ssepi(system_specs, field_of_view, matrix_size, echo_time, slice_thickness, slice_orientation, pulse_duration, epi_slope_sampling=False, tbw_product=4, max_epi_duration=None, epi_water_fat_shift='minimum', partial_fourier_lines=0, blip_direction='up')#

Defines a single shot EPI sequence. If the specified echo time is too short, the shortest possible echo-time is used.

Note

The sequence object returned by this function contains the SimpleNamespace “additional_info” as attribute, which contains the k-space center index, actually used echo-time and the absolute value of the echo-formation time

Parameters:
  • system_specs (SystemSpec) – SystemSpecification

  • field_of_view (Quantity) – spatial extend in readout and phase encoding direction; shape = (2, )

  • matrix_size (ndarray) – number of pixels in readout and phase encoding direction; shape = (2, )

  • echo_time (Quantity) – Time at which the central k-space line is placed

  • slice_thickness (Quantity) – Thickness of slice-selective excitation definitions

  • slice_orientation (ndarray) – Slice normal of excitation slice

  • pulse_duration (Quantity) – Duration of the excitation & refocusing pulses

  • epi_slope_sampling (bool) – If yes the epi readout uses slope sampling

  • tbw_product (float) – Time-bandwidth product of the inc-Pulses used for excitation and refocus

  • max_epi_duration (Optional[Quantity]) – See documentation (cmrseq.seqdefs.readout.single_shot_epi)

  • epi_water_fat_shift (Union[str, float, int]) – See documentation (cmrseq.seqdefs.readout.single_shot_epi)

  • partial_fourier_lines (int) – number of lines to skip before k-space center, allowing shorter echo times

  • blip_direction (str) – from [“up”, “down”] defining the direction of phase-encoding kspace travers

Returns:

sequence object

single_line_cartesian2d(system_specs, echo_time, repetition_time, matrix_size, inplane_resolution, slice_thickness, adc_duration, pulse_duration, time_bandwidth_product=4.0)#

Constructs a basis spin echo single line acquisition scheme for a cartesian trajectory.

Raises:

ValueError - if repetition time is smaller than the composite of elements within one TR

Parameters:
  • system_specs (SystemSpec) – SystemSpecification

  • echo_time (Quantity) –

  • repetition_time (Quantity) – Quantity[Time] containing the required repetition_time

  • matrix_size (ndarray) – array of shape (2, )

  • inplane_resolution (Quantity) – Quantity[Length] of shape (2, )

  • slice_thickness (Quantity) – Quantity[Length] containing the required slice-thickness

  • adc_duration (Quantity) – Quantity[time] Total duration of adc-sampling for a single TR

  • pulse_duration (Quantity) – Quantity[Time] Total pulse duration (corresponds to flat_duration of the slice selection gradient)

  • time_bandwidth_product (float) – float - used to calculate the rf bandwidth from duration

Return type:

List[Sequence]

Returns:

List of length (matrix_size[1]) containting one Sequence object per TR