dicspecklegenerator.py

class DICSpeckleGen(seed=None, px_vertical=720, px_horizontal=1280, size_radius=3, size_stddev=0.0, loc_variance=0.6, loc_spacing=7, smooth=True, smooth_stddev=1.0, gray_level=4096, pattern_digitisation=True)[source]

Bases: object

Dataclass holding summary information for the speckle pattern

__init__(seed=None, px_vertical=720, px_horizontal=1280, size_radius=3, size_stddev=0.0, loc_variance=0.6, loc_spacing=7, smooth=True, smooth_stddev=1.0, gray_level=4096, pattern_digitisation=True)[source]
generate_array()[source]

Generate a speckle pattern based on default or user provided paramters.

Args:

None

Returns:

np.array: 2D speckle pattern.

get_array()[source]
show()[source]

Display pattern as an image using Matplotlib.

Returns: None

save(filename)[source]

Save the speckle pattern array as an image with PIL package. Image can either be saved as 8bit or 16bit image. Image Saved in .tiff format.

Args: filename (str): name/location of output image

Returns: None: Saves image to directory withuser specified details.