Sampling (ADC)#
Module containing the implementation of sampling blocks
Classes:
|
ADC-specific extension to the SequenceBaseBlock, serves as base class for all ADC implementations. |
|
ADC with instantaneous encoding events at k-space positions. |
|
Defines an oversampling adc-block on system adc_raster_time. |
- class ADC(system_specs, name, adc_timing, adc_center, frequency_offset, phase_offset)[source]#
Bases:
SequenceBaseBlock
ADC-specific extension to the SequenceBaseBlock, serves as base class for all ADC implementations.
- Parameters:
system_specs (
SystemSpec
) – System Limits specification objectname (
str
)adc_timing (
Quantity
) – Quantity array of dimension time, containing all sampling event timings.adc_center (
Quantity
) – Time point defining the center of the ADC objectphase_offset (
Quantity
) – Phase-offset for all adc-samples, added when computing the adc-phase.frequency_offset (
Quantity
) – Frequency offset for all adc-samples, converted to an additional phase offset per sample
Attributes:
Timing of ADC-sampling events.
Time defining the center of the adc-events.
Frequency offset for all adc-samples, converted to an additional phase offset per sample and added when computing the adc-phase property.
Phase-offset for all adc-samples, added when computing the adc-phase property.
Returns the phase \(\phi_s\) at each adc sample \(s\) in radians given the phase offset \(\phi_0\) and frequency offset \(\delta f\) according to the formular:
Returns the time of the first sampling event.
Returns the time of the last sampling event.
Methods:
validate
(system_specs)Validates the dwell time against the system_specs, ensuring it sits on the ADC raster time.
shift
(time_shift)Adds the time-shift to all adc definition points and the adc-center
flip
([time_flip])Flips the adc-timing and adc-center around the given time point.
snap_to_raster
(system_specs)-
adc_timing:
Quantity
# Timing of ADC-sampling events. Exact definition of the meaning of that sampling time is delegated to subclass implementation. Quantity[ms]
-
adc_center:
Quantity
# Time defining the center of the adc-events. Meant to synchronize the ADC block with echo times. Quantity[ms]
-
frequency_offset:
Quantity
# Frequency offset for all adc-samples, converted to an additional phase offset per sample and added when computing the adc-phase property. Quantity[Hz]
-
phase_offset:
Quantity
# Phase-offset for all adc-samples, added when computing the adc-phase property. Quantity[rad]
- property adc_phase: Quantity#
Returns the phase \(\phi_s\) at each adc sample \(s\) in radians given the phase offset \(\phi_0\) and frequency offset \(\delta f\) according to the formular:
\[\phi_s = \phi_0 + 2 * \pi * \delta f\]
- property tmin: Quantity#
Returns the time of the first sampling event.
- property tmax: Quantity#
Returns the time of the last sampling event.
- validate(system_specs)[source]#
Validates the dwell time against the system_specs, ensuring it sits on the ADC raster time.
- Parameters:
system_specs (SystemSpec)
- shift(time_shift)[source]#
Adds the time-shift to all adc definition points and the adc-center
- Return type:
None
- Parameters:
time_shift (Quantity)
- flip(time_flip=None)[source]#
Flips the adc-timing and adc-center around the given time point.
- Parameters:
time_flip (Quantity)
- snap_to_raster(system_specs)[source]#
- Return type:
None
- Parameters:
system_specs (SystemSpec)
-
name:
str
#
- class SymmetricADC(system_specs, num_samples, dwell=None, duration=None, delay=None, frequency_offset=<Quantity(0.0, 'hertz')>, phase_offset=<Quantity(0.0, 'radian')>, name='adc')[source]#
Bases:
ADC
ADC with instantaneous encoding events at k-space positions.
Defines an ADC with sampling events uniformly distributed over the given duration. The central time point is always contained as sampling event.
Sample time always corresponds to the center of the sampling event.
- Parameters:
num_samples (
int
) – number of sampling events over durationsystem_specs (
SystemSpec
) – cmrseq.SystemSpec objectdwell (
Quantity
) – Quantity[time] Interval length associated with 1 sampling event. Corresponds to kspace extend in readout-direction \((1/FOV_{kx})\).duration (
Quantity
) – Quantity[time] Total sampling duration corresponding to \((1 / \Delta k_x)\). Usually is the same as flat_duration of accompanying trapezoidal gradient.delay (
Quantity
) – Quantity[time] Leading time without sampling eventsfrequency_offset (
Quantity
) – Adds a linearly increasing phase over the ADC duration, used for e.g. RF-spoiling or in-plane FOV shift.phase_offset (
Quantity
) – Adds a constant phase offset to the adc, e.g. in RF spoilingname (str)
Attributes:
Returns the time of the first sampling event.
Returns the time of the last sampling event.
Methods:
from_centered_valid
(system_specs, ...[, ...])Creates an ADC block with valid duration (dwell time on raster) where the stated duration is the upper bound (altered by at max num_samples * adc_raster_time).
- property tmin: Quantity#
Returns the time of the first sampling event. Behavior varies for odd/even number of samples:
Returns the time of the first sampling event minus half a dwell time on gradient raster time.
In both cases this corresponds to the start of the plateau of a readout gradient
- property tmax: Quantity#
Returns the time of the last sampling event. Behavior varies for odd/even number of samples:
Returns the time of the last sampling event plus half a dwell time.
In both cases this corresponds to the end of the plateau of a readout gradient
- classmethod from_centered_valid(system_specs, num_samples, duration, delay=<Quantity(0.0, 'millisecond')>, frequency_offset=<Quantity(0.0, 'hertz')>, phase_offset=<Quantity(0.0, 'radian')>, name='adc', suppress_warnings=False)[source]#
Creates an ADC block with valid duration (dwell time on raster) where the stated duration is the upper bound (altered by at max num_samples * adc_raster_time). The difference in duration is padded around at the start and end of the block to maintain the center.
Guarantees to have a sample at the exact half duration of the ADC block.
- Parameters:
num_samples (
int
) – number of sampling events over durationsystem_specs (
SystemSpec
) – cmrseq.SystemSpec objectduration (
Quantity
) – target duration that is modified such that the resulting dwell time is on the adc rasterdelay (
Quantity
) – Quantity[time] Leading time without sampling eventsfrequency_offset (
Quantity
) – Adds a linearly increasing phase over the ADC duration, used for e.g. RF-spoiling or in-plane FOV shift.phase_offset (
Quantity
) – Adds a constant phase offset to the adc, e.g. in RF spoiling
- Return type:
- class GridSamplingADC(system_specs, duration, delay=<Quantity(0, 'millisecond')>, frequency_offset=<Quantity(0.0, 'hertz')>, phase_offset=<Quantity(0.0, 'radian')>, name='adc')[source]#
Bases:
ADC
Defines an oversampling adc-block on system adc_raster_time.
- Parameters:
system_specs (
SystemSpec
) – SystemSpec instanceduration (
Quantity
) – Duration over which the ADC is active on raster time. Is assumed to be on adc-raster-timedelay (
Quantity
) – Leading time before the ADC block starts. Is assumed to be on adc-raster-timefrequency_offset (
Quantity
) – Linear phase evolution that is added to the demodulation over the ADC durationphase_offset (
Quantity
) – Phase offset that is added to the demodulationname (
str
) – defaults to ‘adc’
Attributes:
Returns the time of the first sampling event.
Returns the time of the last sampling event.
- property tmin: Quantity#
Returns the time of the first sampling event.
- property tmax: Quantity#
Returns the time of the last sampling event.
This module contains definition of a simple delay building block
Classes:
|
Defines a gradient with zero magnitude and given duration |
- class Delay(system_specs, duration, delay=<Quantity(0.0, 'millisecond')>, name='delay')[source]#
Defines a gradient with zero magnitude and given duration
- Parameters:
system_specs (SystemSpec)
duration (Quantity)
delay (Quantity)
name (str)