Skip to content

unrolled_sequence

unrolled_sequence

Interface class for an unrolled sequence.

UnrolledSequence dataclass

UnrolledSequence(seq: ndarray, sample_count: int, rx_data: list[RxData], gpa_gain: tuple[float, float, float], gradient_efficiency: tuple[float, float, float], gradient_output_limits: tuple[int, int, int], rf_to_mvolt: float, rf_output_limit: int, dwell_time: float, duration: float, adc_count: int, parameter: AcquisitionParameter)

Unrolled sequence interface.

This interface is used to share the unrolled sequence between the different components like TxEngine, SequenceProvider and AcquisitionControl. An unrolled sequence is generated by a SequenceProvider() instance using the unroll_sequence function.

seq instance-attribute

seq: ndarray

Replay data as flat int16 array of length 4 * sample_count with interleaved channels [ch0_0, ch1_0, ch2_0, ch3_0, ch0_1, ...]. Channel 0 is the RF waveform (16 bit), channels 1 to 3 are the gradient waveforms (15 bit) whose bit 15 carries the ADC gate (ch1), the phase reference (ch2) and the RF unblanking (ch3).

sample_count instance-attribute

sample_count: int

Total number of samples per channel.

rx_data instance-attribute

rx_data: list[RxData]

List containing the metadata of all receive (ADC) events, one RxData per event.

gpa_gain instance-attribute

gpa_gain: tuple[float, float, float]

Transconductance of the gradient power amplifier in A/V per gradient channel.

Together with gradient_efficiency, it translates PyPulseq gradient amplitudes in Hz/m to output voltages: U[mV] = G[Hz/m] / (gamma[Hz/T] * 1e-3 * gpa_gain[A/V] * gradient_efficiency[T/m/A]).

gradient_efficiency instance-attribute

gradient_efficiency: tuple[float, float, float]

Efficiency of the gradient coils in T/m/A per gradient channel (see gpa_gain).

gradient_output_limits instance-attribute

gradient_output_limits: tuple[int, int, int]

Integer limits for each gradient output channel in mV. Gradient output limits already contain scaling from channel termination into high impedance or 50 ohms respectively.

rf_to_mvolt instance-attribute

rf_to_mvolt: float

If sequence values are given as float values, they can be interpreted as output voltage [mV] directly. This conversion factor represents the scaling from original pulseq RF values [Hz] to card output voltage.

rf_output_limit instance-attribute

rf_output_limit: int

Integer limit of rf output channel in mV. RF output limits already contains scaling from channel termination into high impedance or 50 ohms respectively.

dwell_time instance-attribute

dwell_time: float

Dwell time of the spectrum card replay data (unrolled sequence). Defines the distance in time between to sample points. Note that this dwell time does not correlate to the larmor frequency. Due to the sampling theorem dwell_time < 1/(2*larmor_frequency) must be satisfied. Usually a higher factor is chosen.

duration instance-attribute

duration: float

Total duration of the unrolled sequence in s.

adc_count instance-attribute

adc_count: int

Number of adc events in the sequence.

parameter instance-attribute

Acquisition parameters used to calculate the sequence.