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 pixelsy (
np.ndarray) – y-coordinate of the particles on the sensor in pixelsz (
np.ndarray) – z-coordinate of the particles on the sensor in arbitrary unitssize (
np.ndarray) – Particle size in pixelssource_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_photonsmax_image_photons (
np.ndarray) – Maximum number of photons on the sensorimage_electrons (
np.ndarray) – Number of electrons on the sensorimage_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
activeReturn mask of illuminated particles
disabledReturn mask of disabled particles
flagIndicating status of a particle (active, out of plane, ...)
image_electronsNumber of electrons on the sensor
image_quantized_electronsNumber of quantized electrons on the sensor
in_fovReturn mask of particles in the FOV
in_fov_and_out_of_planeReturn mask of particles out of plane
inactiveReturn mask of inactive particles
irrad_photonsThe number of photons irradiated by the particles on the sensor
max_image_photonsMaximum number of photons on the sensor
n_activeReturn the number of active particles
n_out_of_plane_lossReturn the number of particles that are out of plane
n_particlesReturn the number of particles.
out_of_planeReturn mask of particles out of plane
sizeParticle size in pixels
source_density_numberReturn the number of particles in the laser sheet (and FOV)
source_intensitySource intensity of the particles, which is the intensity it emits as a point source.
xx-coordinate of the particles on the sensor in pixels
yy-coordinate of the particles on the sensor in pixels
zz-coordinate of the particles on the sensor in arbitrary units