mantidimaging.core.utility.data_containers module#
Containers for data. They don’t do much apart from storing the data, and optionally provide helpful operations.
The biggest benefit is explicitly marking what the value represents (e.g. Degrees), and helps the type hints to tell you that you might be passing the wrong value (e.g. ScalarCoR to a VectorCoR), while they’re both Float underneath and the value can be used, it just will produce nonsense.
- class mantidimaging.core.utility.data_containers.Counts(value: 'numpy.ndarray')[source]#
Bases:
SingleValue
- value: numpy.ndarray#
- class mantidimaging.core.utility.data_containers.Degrees(value: 'float')[source]#
Bases:
SingleValue
- class mantidimaging.core.utility.data_containers.FILE_TYPES(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
Enum
Order must match order of files in load dialog menu
- DARK_AFTER = ('Dark', 'After', 'images')#
- DARK_BEFORE = ('Dark', 'Before', 'images')#
- FLAT_AFTER = ('Flat', 'After', 'images')#
- FLAT_AFTER_LOG = ('Flat After Log', '', 'log')#
- FLAT_AFTER_SHUTTER_COUNTS = ('Flat After Shutter Counts', '', 'ShutterCount')#
- FLAT_BEFORE = ('Flat', 'Before', 'images')#
- FLAT_BEFORE_LOG = ('Flat Before Log', '', 'log')#
- FLAT_BEFORE_SHUTTER_COUNTS = ('Flat Before Shutter Counts', '', 'ShutterCount')#
- PROJ_180 = ('180 degree', '', '180')#
- SAMPLE = ('Sample', '', 'sample')#
- SAMPLE_LOG = ('Sample Log', '', 'log')#
- SHUTTER_COUNTS = ('Sample Shutter Counts', '', 'ShutterCount')#
- class mantidimaging.core.utility.data_containers.Indices(start, end, step)#
Bases:
NamedTuple
- class mantidimaging.core.utility.data_containers.Micron(value: 'int')[source]#
Bases:
SingleValue
- class mantidimaging.core.utility.data_containers.ProjectionAngles(value: 'numpy.ndarray')[source]#
Bases:
SingleValue
- value: numpy.ndarray#
- class mantidimaging.core.utility.data_containers.ReconstructionParameters(algorithm: 'str', filter_name: 'str', num_iter: 'int' = 1, cor: 'ScalarCoR | None' = None, tilt: 'Degrees | None' = None, pixel_size: 'float' = 0.0, alpha: 'float' = 0.0, gamma: 'float' = 1.0, non_negative: 'bool' = False, max_projection_angle: 'float' = 360.0, beam_hardening_coefs: 'list[float] | None' = None, stochastic: 'bool' = False, projections_per_subset: 'int' = 50, regularisation_percent: 'int' = 30, regulariser: 'str' = '')[source]#
Bases:
object
- class mantidimaging.core.utility.data_containers.ScalarCoR(value: 'float')[source]#
Bases:
SingleValue
- class mantidimaging.core.utility.data_containers.Slope(value: 'float')[source]#
Bases:
SingleValue