read_mrd_description#
- torchsim.read_mrd_description(stream)[source]#
Read an MRD stream up to its sequence description.
The messages ahead of the description – a config, a config file name, the XML header, other texts – are read and the stream is left at the message after the description, which is where its first acquisition is.
- Parameters:
stream (binary file-like) – The stream, read with
read(n): an open file, or a socket’smakefile("rb").- Returns:
header (str or None) – The MRD XML header,
Noneif the stream carried none before the description.descriptions (list of SequenceDescription) – One per file of the sequence chain, in play order. RF definitions carry the envelope normalised to a peak of one, played at the event’s
amplitude_hz, and their sample times in units of the RF raster.
- Raises:
ValueError – If any other message, or the end of the stream, comes before the description.