EncodingSpace#
- class pulserver.mrd.EncodingSpace[source]#
Bases:
objectBuffer layout of one encoding space of an MRD header.
- Parameters:
index (int) – Position in the header’s encoding list; what
encoding_space_refnames.coils (int) – Receive channels.
readout (int) – Samples per readout.
phase_encodes – Extent along
kspace_encode_step_1andkspace_encode_step_2.partitions – Extent along
kspace_encode_step_1andkspace_encode_step_2.loops (tuple[str, ...]) – Counters that vary in this space and are laid out as axes, outermost first: those of
LOOP_COUNTERS, andsegmentwhenfrom_header()was asked for it.loop_sizes (tuple[int, ...]) – Extent of each counter in
loops.recon_matrix (tuple[int, ...]) – Image matrix,
(n_y, n_x)for a plane or(n_z, n_y, n_x)for a volume. Independent of the buffer axes: a stack of spokes has no partition axis and a three-dimensional matrix.recon_fov (tuple[float, ...] | None) – Field of view of the image in metres, ordered as
recon_matrix;Nonewhen the header states none.cartesian (bool) – Whether the space samples a Cartesian grid. A readout of a Cartesian space is placed by its echo along the readout, and its lines by their offset from the k-space centre; a non-Cartesian space places a readout as it arrives and a view by its counter.
phase_center – Counter value of the k-space centre along
kspace_encode_step_1andkspace_encode_step_2, from thecenterof the header’s encoding limits;Nonewhere the header states none, so the counter is the position on the grid.partition_center – Counter value of the k-space centre along
kspace_encode_step_1andkspace_encode_step_2, from thecenterof the header’s encoding limits;Nonewhere the header states none, so the counter is the position on the grid.
Examples
>>> import pulserver.mrd as mrd >>> space = mrd.EncodingSpace( ... index=0, coils=4, readout=64, phase_encodes=32, partitions=1, ... loops=("slice",), loop_sizes=(2,), recon_matrix=(32, 32), ... ) >>> space.shape (4, 2, 32, 64)
Methods
Read every encoding space of a parsed MRD header, in index order. |
|
Read encoding space |
|
Shift that places a counter of |
Attributes
Axis names of a buffer of this space. |
|
Placement axes and their extents, outermost first, including extents of 1. |
|
Shape of a buffer of this space, named by |
|