xrheed.plugins.example_plugin_bmp

Classes

ExampleRheedBmpPlugin()

Plugin for loading grayscale BMP RHEED images.

class ExampleRheedBmpPlugin[source]

Bases: LoadRheedBase

Plugin for loading grayscale BMP RHEED images.

Contract: - ATTRS define defaults only - Acquisition parameters (alpha, beta) are attached ONLY if known - The returned DataArray is always fully initialized

ATTRS = {'alpha': None, 'beam_energy': 19400, 'beta': None, 'screen_center_sx_px': None, 'screen_center_sy_px': None, 'screen_sample_distance': 309.2, 'screen_scale': 10.0}
TOLERATED_EXTENSIONS = {'.bmp'}
dataarray_from_image(image_np, *, file_path=None, attrs_override=None, flip=True)

Construct a canonical RHEED DataArray from an image.

Responsibilities: - merge default attrs with overrides - resolve geometry (including screen center) - construct sx / sy coordinates - attach file provenance automatically

is_file_accepted(file_path)
load_single_image(file_path, **kwargs)[source]

Load a single image and return a canonical RHEED DataArray.

Implementations MUST call self.dataarray_from_image(…) exactly once and return its result.