LION.utils.mrpro_import

Import mrpro only where MRI functionality needs it.

mrpro is LION’s MRI backend, as tomosipo is the CT one (see LION.utils.tomosipo_import): LION imports without it, and MRI functions import it through import_mrpro, so that a missing installation gives a clear error at the point of use and import LION does not load mrpro and its dependencies.

Functions

import_mrpro([module, feature])

The module module (mrpro or one of its submodules, e.g. mrpro.operators), imported, or an ImportError that says what is missing and how to install it.


LION.utils.mrpro_import.import_mrpro(module='mrpro', feature='This MRI function')[source]

The module module (mrpro or one of its submodules, e.g. mrpro.operators), imported, or an ImportError that says what is missing and how to install it. feature: what needs it, for the message (e.g. “MrproLinearOp”).