MethodRegister#
- class mrinufft.MethodRegister(register_name: str, docstring_subs: dict[str, str] | None = None)[source]#
Bases:
objectA Decorator to register methods of the same type in dictionnaries.
- Parameters:
Methods
__init__Create a get_{register_name} function to get methods from the registry.
Attributes
Get the registry dictionary.
- registry_global = {'density': {'cell_count': <function cell_count>, 'pipe': <function pipe>, 'voronoi': <function voronoi>}, 'gradient_connection_solver': {'auto': <function _solve_auto>, 'lp': <function _solve_lp_1d>, 'lp-minslew': <function _solve_lp_1d>, 'osqp': <function _solve_qp_osqp>}, 'optimizer': {'cg': <function cg>, 'lsmr': <function lsmr>, 'lsqr': <function lsqr>}, 'orc_factorization': {'mfi': <function compute_mfi_coefficients>, 'mti': <function compute_mti_coefficients>, 'svd': <function compute_svd_coefficients>}, 'smaps': {'espirit': <function espirit>, 'low_frequency': <function low_frequency>}}[source]#
- __call__(method_name=None)[source]#
Register the function in the registry.
It also substitute placeholder in docstrings.