acquisition_data
acquisition_data
Interface class for acquisition data.
AcquisitionData
dataclass
AcquisitionData(receive_data: list[RxData], acquisition_parameters: AcquisitionParameter, sequence: SequenceProvider | Sequence, session_path: str | Path, meta: dict[str, Any] = dict(), _additional_numpy_data: dict = dict())
Result of an acquisition: receive data, sequence, acquisition parameters and meta data.
Returned by AcquisitionControl.run. The data can be stored with save (HDF5, JSON, .seq) and
exported to ISMRMRD with save_ismrmrd.
receive_data
instance-attribute
Flat list of RxData objects, one per ADC event and average, ordered by average and then by
ADC index ([avg0/adc0, ..., avg0/adcN, avg1/adc0, ...]). The average index of each entry is
stored in RxData.average_index.
acquisition_parameters
instance-attribute
acquisition_parameters: AcquisitionParameter
Acquisition parameters.
sequence
instance-attribute
sequence: SequenceProvider | Sequence
Sequence object used for the acquisition acquisition.
session_path
instance-attribute
Directory the acquisition data will be stored in.
Within the given storage_path a new directory with time stamp and sequence name will be created.
meta
class-attribute
instance-attribute
Meta data dictionary for additional acquisition info. Dictionary is updated (extended) by post-init method with some general information.
save
Save all the acquisition data to a given data path.
Parameters:
-
user_path(str | None, default:None) –Optional user path, default is None. If provided, it is taken to store the acquisition data. Other wise a datetime-based folder is created.
-
overwrite(bool, default:False) –Flag which indicates whether the acquisition data should be overwritten in case it already exists from a previous call to this function, default is False.
Source code in src/console/interfaces/acquisition_data.py
add_info
Add entries to meta data dictionary.
Parameters:
Source code in src/console/interfaces/acquisition_data.py
add_data
Add data to additional_data dictionary.
Parameters:
Source code in src/console/interfaces/acquisition_data.py
save_ismrmrd
save_ismrmrd(header: ismrmrdHeader | str | Path | None = None, user_path: str | None = None) -> Path | None
Store acquisition data in ISMRMRD format.
The file data.mrd is written to the acquisition folder. Measurement information,
experimental conditions (Larmor frequency) and acquisition system information are added to the header.
PyPulseq labels of the ADC events are mapped to the ISMRMRD acquisition counters and flags.
Parameters:
-
header(ismrmrdHeader | str | Path | None, default:None) –ISMRMRD header, e.g. as returned by a sequence constructor, or path to an ISMRMRD file whose XML header is used. If None, a header without encoding information is created.
-
user_path(str | None, default:None) –Base directory of the output, by default the session path.
Returns:
-
Path or None–Path of the written MRD file, or None if the header is invalid.
Raises:
-
AttributeError–No processed receive data available.
Source code in src/console/interfaces/acquisition_data.py
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | |