read_vops#
- pypulseqpp.safety.read_vops()[source]#
Read VOPs and the global SAR matrices from a
.mator.npzfile.The VOPs are the array named
VOP,VOPm,vops,VOPs,VOP_matrices,Q10gorQ, a stack of oneNcbyNcmatrix per point: MARIE’s(N, Nc, Nc)and MATLAB’s(Nc, Nc, N)are both read, and a lone matrix is read as one point. The global SAR matrices are the array namedSglobal,global_matrix,QglobalorQ_global, a single matrix or one per body model as mariepy’svop.writestores a population’s. An.npzfile’smetadata, a JSON string, is read onto the model; itssafety_factormultiplies every local SAR and itsglobal_safety_factorevery global SAR. MATLAB v7.3 (HDF5) files are not read.- Parameters:
path (str or os.PathLike) –
.mator.npzfile to read.- Returns:
The VOPs and, where the file carries them, the global SAR matrices and the metadata, for
check_sar()to take as itsmodel.- Return type:
- Raises:
ValueError – If the file holds no recognised VOP array, or one whose shape is not a stack of square matrices, or a safety factor is below 1.
OSError – If the file cannot be read, a MATLAB v7.3 file among them.