image

The two-dimension detector generates images of the reflected intensity. The purpose of the Image class stored in this module is the investigation and manipulation of these images.

Module Contents

Classes

Image

This class stores information about the detector images.

API

class image.Image(array: numpy.ndarray, transpose: bool = False)

This class stores information about the detector images.

Attributes:
file_path (str):

File path for the image.

array (array_like):

The image described as an array.

array_original (array_like):

The original value of the image array when it was loaded from disk.

array_e (array_like):

The errors on each pixel of the array.

bkg (float):

The background that was subtracted from the image.

bkg_e (float):

The uncertainty on the background.

Args:

file_path (str): The file path for the image. data (pandas.DataFrame, optional): Experimental data about the measurement. Defaults to None. transpose (bool, optional): Should the data be rotated by 90 degrees? Defaults to False.

Initialization

Initialisation of the islatu.image.Image class, includes assigning uncertainties.

property nominal_values

Get the nominal values of the image array.

Returns:

array_like: Nominal values of image.

property initial_std_devs

Get the standard deviation values of the original raw image array.

Returns:

array_like: Standard deviation values of image.

property shape

Array shape

Returns:

tuple of int: The shape of the image.

__repr__()

Custom representation.

Returns:

array_like: Image array.

__str__()

Custom string.

Returns:

array_like: Image array.

crop(crop_function, **kwargs)

Perform an image crop based on some function.

Args:

crop_function (callable): The function to crop the data. **kwargs (dict): The crop function keyword arguments.

background_subtraction(background_subtraction_function, **kwargs)

Perform a background subtraction based on some function.

Args:

background_subtraction_function (callable): The function to model the data and therefore remove the background. **kwargs (dict): The background substraction function keyword arguments.

sum()

Perform a summation on the image’s array.

Returns:

A tuple taking the form (summed_intensity, summed_intensity_e).