Skip to content

se_projection

se_projection

Constructor for spin-echo spectrum sequence with projection gradient.

constructor

constructor(fov: float = 0.24, readout_bandwidth: float = 20000.0, echo_time: float = 0.012, gradient_correction: float = 0.0, num_samples: int = 120, rf_duration: float = 0.0004, channel: str = 'x', use_sinc: bool = False, system: Opts = system) -> Sequence

Construct spin echo spectrum sequence with projection gradient (1D).

Parameters:

  • fov (float, default: 0.24 ) –

    Field of view in m

  • readout_bandwidth (float, default: 20000.0 ) –

    Readout bandwidth in Hz

  • echo_time (float, default: 0.012 ) –

    Time between center of 90 degree pulse and center of ADC in s

  • gradient_correction (float, default: 0.0 ) –

    Additional delay to account for gradient system delays in s

  • num_samples (int, default: 120 ) –

    Number of data points to acquire

  • rf_duration (float, default: 0.0004 ) –

    Duration of the RF pulses in s

  • channel (str, default: 'x' ) –

    Gradient channel to use for projection

  • use_sinc (bool, default: False ) –

    RF pulse type, if true: sinc pulse is used, rect otherwise

  • system (Opts, default: system ) –

    Sequence system to be used for sequence construction

Returns:

  • Pypulseq ``Sequence`` instance –

Raises:

Source code in src/console/utilities/sequences/spectrometry/se_projection.py
def constructor(
    fov: float = 0.24,
    readout_bandwidth: float = 20e3,
    echo_time: float = 12e-3,
    gradient_correction: float = 0.0,
    num_samples: int = 120,
    rf_duration: float = 400e-6,
    channel: str = "x",
    use_sinc: bool = False,
    system: pp.Opts = default_system,
) -> pp.Sequence:
    """Construct spin echo spectrum sequence with projection gradient (1D).

    Parameters
    ----------
    fov : float, optional
        Field of view in m
    readout_bandwidth : float, optional
        Readout bandwidth in Hz
    echo_time : float, optional
        Time between center of 90 degree pulse and center of ADC in s
    gradient_correction : float, optional
        Additional delay to account for gradient system delays in s
    num_samples : int, optional
        Number of data points to acquire
    rf_duration : float, optional
        Duration of the RF pulses in s
    channel : str, optional
        Gradient channel to use for projection
    use_sinc : bool, optional
        RF pulse type, if true: sinc pulse is used, rect otherwise
    system : pp.Opts, optional
        Sequence system to be used for sequence construction

    Returns
    -------
        Pypulseq ``Sequence`` instance

    Raises
    ------
    ValueError
        Sequence time check failed
    """
    seq = pp.Sequence(system=system)
    seq.set_definition("Name", "se_projection")
    seq.set_definition("readout_bandwidth_in_Hz", readout_bandwidth)
    seq.set_definition("fov_in_m", fov)
    seq.set_definition("te_in_s", echo_time)
    seq.set_definition("gradient_correction_in_s", gradient_correction)
    seq.set_definition("projection_channel", channel)

    # Define RF pulses for excitation and refocusing
    if use_sinc:
        rf_90 = pp.make_sinc_pulse(system=system, flip_angle=pi / 2, duration=rf_duration, apodization=0.5,
                                   delay=system.rf_dead_time)
        rf_180 = pp.make_sinc_pulse(system=system, flip_angle=pi, duration=rf_duration, apodization=0.5,
                                    delay=system.rf_dead_time)
    else:
        rf_90 = pp.make_block_pulse(system=system, flip_angle=pi / 2, duration=rf_duration,
                                    delay=system.rf_dead_time)
        rf_180 = pp.make_block_pulse(system=system, flip_angle=pi, duration=rf_duration,
                                     delay=system.rf_dead_time)

    # Define ADC duration
    adc_duration = num_samples / readout_bandwidth

    # Define readout gradient duration and amplitude
    g_ro_duration = adc_duration + gradient_correction
    g_ro_amplitude = num_samples / fov / adc_duration

    # Define readout gradient
    g_ro = pp.make_trapezoid(system=system, channel=channel, amplitude=g_ro_amplitude, flat_time=g_ro_duration)

    # Define readout prewinder
    g_ro_prew = pp.make_trapezoid(
        system=system,
        channel=channel,
        area=g_ro.area / 2,
        duration=pp.calc_duration(g_ro) / 2,
    )

    # Define ADC event
    adc = pp.make_adc(
        num_samples=num_samples,
        duration=adc_duration,
        system=system,
        delay=gradient_correction + g_ro.rise_time,
    )

    # Calculate delays to achieve desired echo time
    te_delay_1 = raster(echo_time / 2 - rf_duration - rf_90.ringdown_time - rf_180.delay
                        - pp.calc_duration(g_ro_prew),
                        precision=system.grad_raster_time)
    te_delay_2 = raster(echo_time / 2 - rf_duration / 2 - adc_duration / 2 - rf_180.ringdown_time
                        - adc.dead_time - gradient_correction - g_ro.rise_time,
                        precision=system.grad_raster_time)


    # Construct sequence
    seq.add_block(rf_90)
    seq.add_block(g_ro_prew)
    seq.add_block(pp.make_delay(te_delay_1))
    seq.add_block(rf_180)
    seq.add_block(pp.make_delay(te_delay_2))
    seq.add_block(g_ro, adc)

    return seq