synpivimage.particles.Particles#

class synpivimage.particles.Particles(*, x, y, z, size, source_intensity=None, max_image_photons=None, image_electrons=None, image_quantized_electrons=None, flag=None)[source]#

Particle class

Contains position, size and flag information: - pixel (!) position: (x,y,z) within the light sheet. Mid of light sheet is z=0. - size: (real)) particle size in arbitrary units. - flag: Indicating status of a particle (active, out of plane, …)

__init__(*, x, y, z, size, source_intensity=None, max_image_photons=None, image_electrons=None, image_quantized_electrons=None, flag=None)[source]#
Parameters:
  • x (np.ndarray) – x-coordinate of the particles on the sensor in pixels

  • y (np.ndarray) – y-coordinate of the particles on the sensor in pixels

  • z (np.ndarray) – z-coordinate of the particles on the sensor in arbitrary units

  • size (np.ndarray) – Particle size in pixels

  • source_intensity (np.ndarray) – Source intensity of the particles, which is the intensity it emits as a point source. The peak intensity on the sensor may be higher. see property irrad_photons

  • max_image_photons (np.ndarray) – Maximum number of photons on the sensor

  • image_electrons (np.ndarray) – Number of electrons on the sensor

  • image_quantized_electrons (np.ndarray) – Number of quantized electrons on the sensor

Methods

__init__(*, x, y, z, size[, ...])

Parameters:
  • x (np.ndarray) -- x-coordinate of the particles on the sensor in pixels

copy()

Return a copy of this object

dict()

Returns a dictionary representation of the particle data

displace([dx, dy, dz])

Displace the particles.

generate(ppp, dx_max, dy_max, dz_max, size, ...)

Generate particles based on a certain ppp (particles per pixel).

generate_uniform(n_particles, size, ...)

Generate particles uniformly

get_ppp(camera_size)

Return the particles per pixel

info()

Prints some useful information about the particles

load_jsonld()

Load the component from JSON-LD

model_dump()

Returns a dictionary representation of the particle data where list instead of numpy arrays are used.

regenerate()

Regenerate the particles of this object.

reset()

Sets all intensities to zero and flags to zero

save_json(filename)

Save the component to JSON

save_jsonld(filename)

Save the component to JSON

Attributes

active

Return mask of illuminated particles

disabled

Return mask of disabled particles

flag

Indicating status of a particle (active, out of plane, ...)

image_electrons

Number of electrons on the sensor

image_quantized_electrons

Number of quantized electrons on the sensor

in_fov

Return mask of particles in the FOV

in_fov_and_out_of_plane

Return mask of particles out of plane

inactive

Return mask of inactive particles

irrad_photons

The number of photons irradiated by the particles on the sensor

max_image_photons

Maximum number of photons on the sensor

n_active

Return the number of active particles

n_out_of_plane_loss

Return the number of particles that are out of plane

n_particles

Return the number of particles.

out_of_plane

Return mask of particles out of plane

size

Particle size in pixels

source_density_number

Return the number of particles in the laser sheet (and FOV)

source_intensity

Source intensity of the particles, which is the intensity it emits as a point source.

x

x-coordinate of the particles on the sensor in pixels

y

y-coordinate of the particles on the sensor in pixels

z

z-coordinate of the particles on the sensor in arbitrary units