convert#
- pulserver.ir.convert()[source]#
Segment a sequence file and write its IR cache beside it.
The
NextSequencechain starting at the file is read as the subsequences of one scan. An existing cache at the destination is replaced. RF vendor statistics are left at zero:vendoronly tags the cache for the reader that loads it, which must be built for that vendor.The files are expected in the logical frame, and each is moved to
fov_offsetwithprescribe()before it is segmented. The prescription’s rotation is not applied here: the scanner plays the cache through its rotation matrix, composed after each block’s own rotation.ADC phase modulation is not stored in the cache: the reconstruction proxy applies it to the received samples from the sequence (
SequenceTable).- Parameters:
seq_path – Text or binary Pulseq file.
system – Limits and rasters the scan is segmented under.
fov_offset – Translation of the field-of-view centre along the logical readout, phase and slice axes, in metres. None or zero leaves the files as designed.
vendor –
PULSEG_VENDOR_*code; 0 is vendor-neutral.label_column_map – Pulseq label state indices filling the three ADC label columns: 0 SLC, 1 PHS, 2 REP, 3 AVG, 4 SEG, 5 SET, 6 ECO, 7 PAR, 8 LIN, 9 ACQ.
cache_ext – Extension of the cache file, dot included.
verify_signature – Refuse a file whose contents do not match the signature it carries. A file carrying none is read either way.
sar_ratios – One per file of the chain, as
sar_ratios()returns them, written into each subsequence of the cache; zero when None.profile – What the cache holds its numbers as; every quantity a float in its SI unit when left out.
grouping – How the blocks of a repetition are grouped into virtual segments. Left out,
Grouping(): a boundary falls only where every gradient is within 100 Hz/m of zero, and must fall where theNOROTorPMClabel changes.wave_budget – The waveform memory of the playout the cache is for, which the cache lays the waves out in (
plan_waves()); None holds every wave at once on the gradient raster of the chain’s first file.designed – The chain as
pulserver.mrd.designed_chain()returns it, segmented in place of reading and verifying the files, and moved tofov_offsetin place.
- Returns:
The cache file.
- Return type:
Path
- Raises:
ValueError – If a file of the chain cannot be read, verified or segmented,
sar_ratiosdoes not give one per file, or the waves fit neither layout ofwave_budgetor cannot be loaded in time.OSError – If no cache was written.