Schemas

Schemas

class brukerapi.schemas.Schema(dataset)

Base class for all schemes

__init__(dataset)
permutation_inverse(permutation)

Get permutation inverse to the input permutation

Parameters:

permutation (inverse) – list

Returns:

__weakref__

list of weak references to the object

class brukerapi.schemas.SchemaFid(dataset)

Raw ordered FID/k-space schema.

This reader applies storage trimming, dimensional permutation, RARE/EPI phase-line ordering, and EPI odd-line mirroring. It does not perform a full reconstruction: ramp-sampling regridding and RECO_qopts quadrature corrections remain the caller’s responsibility.

property acquisition_factor

Number of stored scalar samples per logical sample.

property continuous_train

Whether §5.3 declares a phase-factor continuous acquisition train.

property mirror_odd_lines

Whether a selected reconstruction requests §6.2 odd-line reversal.

property layouts

Dictionary of possible logical layouts of data

  • encoding_space

  • permute

  • k_space

Returns:

layouts: dict

raw()

Return decoded FID acquisitions as (sample, shot, receiver).

This representation retains acquisition order. It deliberately does not apply encoding-space reshaping, phase-line sorting, EPI mirroring, or object-order correction.

to_kspace(data=None, *, bart=False)

Return the decoded FID k-space, optionally in BART’s layout.

class brukerapi.schemas.SchemaFidCompanion(dataset, primary_schema=None)

Decoder for auxiliary fid.<subtype> files.

__init__(dataset, primary_schema=None)
__weakref__

list of weak references to the object

class brukerapi.schemas.SchemaTraj(dataset)
class brukerapi.schemas.SchemaRawdata(dataset)

PV-360 rawdata.jobN schema.

The on-disk job records describe a complex sample stream, not its acquisition-space layout. to_kspace deliberately supports only the Cartesian subset for which the method metadata proves that layout.

raw()

Return decoded PV-360 acquisitions as (sample, shot, receiver).

to_kspace(data=None, *, bart=False)

Return a Cartesian PV-360 raw-data job in k-space order.

The returned axes are (readout, phase[, partition], object, repetition, channel) for 2-D and (readout, phase, partition, repetition, channel) for 3-D. Retrospectively self-gated 2-D acquisitions retain their NI and NR axes and add an acquisition_cycle axis before the channel axis. The method intentionally does not reconstruct EPI or non-Cartesian acquisitions. With bart=True, the same data is returned in the 16-axis BART layout.

class brukerapi.schemas.Schema2dseq(dataset)

Schema2dseq class

  • vector: data vector as obtained from binary file

  • frames: individual frames combined in

  • framegroups: aldasdasd

ra(slice_)

Random access to the data matrix.

Parameters:

slice (tuple) – Slice object(s) to select data in each dimension.

Returns:

Selected subset of the data.

Return type:

np.ndarray