nima.generat#

Generate mock images.

Functions:

gen_bias([nrows, ncols])

Generate a bias frame.

gen_flat([nrows, ncols])

Generate a flat frame.

gen_object([nrows, ncols, min_radius, ...])

Generate a single ellipsoid object with random shape and position.

gen_objs([params, seed])

Generate a frame with ellipsoid objects; random n, shape, position and I.

gen_frame(objs[, bias, flat, sky, noise_sd, ...])

Simulate an acquired frame [bias + noise + flat * (sky + obj)].

Classes:

ImageObjsParams([max_num_objects, nrows, ...])

Parameters for an image frame.

nima.generat.gen_bias(nrows=128, ncols=128)#

Generate a bias frame.

Return type:

ndarray[tuple[Any, ...], dtype[float64]]

nima.generat.gen_flat(nrows=128, ncols=128)#

Generate a flat frame.

Return type:

ndarray[tuple[Any, ...], dtype[float64]]

nima.generat.gen_object(nrows=128, ncols=128, min_radius=6, max_radius=12, seed=None)#

Generate a single ellipsoid object with random shape and position.

Return type:

ndarray[tuple[Any, ...], dtype[bool]]

class nima.generat.ImageObjsParams(max_num_objects=8, nrows=128, ncols=128, min_radius=6, max_radius=12, max_fluor=20.0)#

Parameters for an image frame.

Variables:
  • max_num_objects (int, optional) – Maximum number of objects to generate (default: 8).

  • nrows (int, optional) – Number of rows in the image frame (default: 128).

  • ncols (int, optional) – Number of columns in the image frame (default: 128).

  • min_radius (int, optional) – Minimum radius of an object (default: 6).

  • max_radius (int, optional) – Maximum radius of an object (default: 12).

  • max_fluor (float, optional) – Maximum fluorescence intensity of an object (default: 20.0).

Attributes:

max_num_objects

Maximum number of objects to generate

nrows

Number of rows in the image frame

ncols

Number of columns in the image frame

min_radius

Minimum radius of an object

max_radius

Maximum radius of an object

max_fluor

Maximum fluorescence intensity of an object

max_num_objects: int = 8#

Maximum number of objects to generate

nrows: int = 128#

Number of rows in the image frame

ncols: int = 128#

Number of columns in the image frame

min_radius: int = 6#

Minimum radius of an object

max_radius: int = 12#

Maximum radius of an object

max_fluor: float = 20.0#

Maximum fluorescence intensity of an object

nima.generat.gen_objs(params=None, seed=None)#

Generate a frame with ellipsoid objects; random n, shape, position and I.

Return type:

ndarray[tuple[Any, ...], dtype[float64]]

nima.generat.gen_frame(objs, bias=None, flat=None, sky=2, noise_sd=1, seed=None)#

Simulate an acquired frame [bias + noise + flat * (sky + obj)].

Return type:

ndarray[tuple[Any, ...], dtype[float64]]