calc_absolute_offsets#
- pypulseqpp.calc_absolute_offsets()[source]#
Return an RF or ADC event’s frequency and phase offsets with its ppm offsets resolved.
- Parameters:
event (RF or ADC event) – Any object carrying
freq_offset(Hz) andphase_offset(rad).freq_ppm(ppm) andphase_ppm(rad/MHz) count as zero where absent.system (Opts, default=None) – The gamma (Hz/T) and B0 (T) the ppm offsets are resolved at; the default system when None.
- Returns:
freq_offset (float) –
freq_offset + freq_ppm * fin Hz, wheref = 1e-6 * gamma * B0is the Larmor frequency in MHz, which is also its value in Hz per ppm.phase_offset (float) –
phase_offset + phase_ppm * fin rad.
See also
pypulseqpp.io.SequenceLibraries.absolute_offsetsthe same for every RF and ADC row of a sequence.
Examples
>>> import pypulseqpp as pp >>> fat = pp.make_block_pulse(1.0, duration=4e-3, freq_ppm=-3.45) >>> frequency, phase = pp.calc_absolute_offsets(fat, system=pp.Opts(B0=3.0)) >>> round(frequency, 2), phase (-440.66, 0.0)