signal#
- optika.sensors.signal(photons_expected, wavelength, direction=1, n=1, n_substrate=None, absorbance=None, thickness_implant=<Quantity 2317. Angstrom>, thickness_depletion=<Quantity 7. um>, thickness_substrate=<Quantity 7. um>, width_pixel=<Quantity 27. um>, cce_backsurface=0.21, temperature=<Quantity 300. K>, method='monte-carlo', axis_xy=None, wrap=False, shape_random=None)[source]#
A random sample from the distribution of measured electrons given the expected number of photons incident on the front surface of the sensor.
This function adds shot noise to the expected number of photons, and then adds Fano noise and recombination noise using
electrons_measured().- Parameters:
photons_expected (Quantity | AbstractScalar) – The expected number of photons incident on the detector surface.
wavelength (Quantity | ScalarArray) – The vacuum wavelength of the absorbed photons.
direction (float | AbstractScalar) – The cosine of the incidence angle.
n (complex | AbstractScalar) – The complex index of refraction of the ambient medium.
n_substrate (None | complex | AbstractScalar) – The complex index of refraction of the light-sensitive material If
None(the default), the result ofoptika.chemicals.Chemical.n()for silicon will be used.absorbance (None | float | AbstractScalar) – The fraction of incident energy absorbed by the light-sensitive region of the detector. If
None(the default), the result ofabsorbance()called with default values will be used.thickness_implant (Quantity | AbstractScalar) – The thickness of the implant layer. Default is the value given in Stern et al. [1994].
thickness_depletion (Quantity | AbstractScalar) – The thickness of the depletion region, the region with significant electric field. If
None(the default), this is set to the same value as thickness_substrate.thickness_substrate (None | AbstractScalar) – The thickness of the entire light-sensitive region of the device. The default
width_pixel (Quantity | AbstractScalar | AbstractCartesian2dVectorArray) – The size of a single pixel on the sensor.
cce_backsurface (Quantity | AbstractScalar) – The differential charge collection efficiency on the back surface of the sensor. Default is the value given in Stern et al. [1994].
temperature (Quantity | ScalarArray) – The temperature of the light-sensitive silicon layer.
method (Literal['monte-carlo', 'expected']) – The method used to generate samples of measured electrons. The monte-carlo method draws a random sample by simulating every photon using
electrons_measured(), including shot, Fano, and recombination noise as well as charge diffusion. The expected method adds no noise and just returns the expected number of electrons in each pixel; since it is a per-pixel expectation, it does not apply charge diffusion.axis_xy (None | tuple[str, str]) – The two logical axes corresponding to the pixel grid of the sensor along which electrons will diffuse. If
None(the default), there is no charge diffusion.wrap (bool) – Controls how diffused charge is treated at the edges of the pixel grid. If
False(the default), charge that diffuses past the edge of the grid is lost, as it would be at the physical edge of a sensor. IfTrue, the grid is treated as periodic and the charge re-enters the opposite edge (a toroidal boundary).shape_random (None | dict[str, int]) – Additional shape used to specify the number of samples to draw.
- Return type:
Examples
Plot the variance-to-mean ratio of the number of electrons measured by the sensor as a function of wavelength.
import matplotlib.pyplot as plt import astropy.units as u import named_arrays as na import optika # Define the number of experiments to perform num_experiments = 1000 # Define the expected number of photons # for each experiment photons_expected = 100 * u.photon # Define a grid of wavelengths wavelength = na.geomspace(10, 10000, axis="wavelength", num=1001) * u.AA # Compute the actual number of electrons measured for each experiment electrons = optika.sensors.signal( photons_expected=photons_expected, wavelength=wavelength, shape_random=dict(experiment=num_experiments), ) # Plot the variance-to-mean ratio of the result # as a function of wavelength. fig, ax = plt.subplots(constrained_layout=True) na.plt.plot( wavelength, electrons.vmr("experiment"), ax=ax, ); ax.set_xscale("log"); ax.set_yscale("log"); ax.set_xlabel(f"wavelength ({wavelength.unit:latex_inline})"); ax.set_ylabel(f"variance-to-mean ratio ({electrons.unit:latex_inline})");
References to
optika.sensors.signal