ImagingSensor#

class optika.sensors.ImagingSensor(name=None, width_pixel=<Quantity 0. um>, axis_pixel=None, num_pixel=None, timedelta_exposure=<Quantity 0. s>, material=None, aperture_mechanical=None, is_field_stop=False, is_pupil_stop=False, transformation=None, kwargs_plot=None)[source]#

Bases: AbstractImagingSensor

An arbitrary imaging sensor described by a pixel grid and a light-sensitive material.

Attributes

aperture

The light-sensitive aperture of the sensor.

aperture_mechanical

The shape of the physical substrate supporting the sensor.

axis_pixel

The names of the logical axes corresponding to the rows and columns of the pixel grid.

is_field_stop

A flag controlling whether this sensor is the field stop for the system.

is_pupil_stop

A flag controlling whether this sensor is the pupil stop for the system.

is_stop

If this surface is pupil stop or the field stop, return True.

kwargs_plot

Extra keyword arguments to pass to plot()

material

A model of the light-sensitive material composing this sensor.

name

The human-readable name of this sensor.

num_pixel

The number of pixels along each axis of the sensor.

rulings

The optional ruling profile of this surface.

sag

The sag profile of this surface.

shape

The array shape of this object.

timedelta_exposure

The exposure time of the sensor.

transformation

The position and orientation of the sensor in the global coordinate system.

width_pixel

The physical size of each pixel on the sensor.

Methods

__init__([name, width_pixel, axis_pixel, ...])

plot([ax, transformation, components])

Plot the selected components onto the given axes.

propagate_rays(rays)

Refract, reflect, and/or diffract the given rays off of this surface

readout(rays, wavelength[, timedelta, axis, ...])

Given a set of rays incident on the sensor surface, where each ray represents an expected number of photons per unit time, simulate the number of electrons that would be measured by the sensor.

to_dxf(file, unit[, transformation])

to_string([prefix])

Public-facing version of the __repr__ method that allows for defining a prefix string, which can be used to calculate how much whitespace to add to the beginning of each line of the result.

Inheritance Diagram

Inheritance diagram of optika.sensors.ImagingSensor
Parameters:
plot(ax=None, transformation=None, components=None, **kwargs)#

Plot the selected components onto the given axes.

Parameters:
Return type:

dict[str, AbstractScalar]

propagate_rays(rays)#

Refract, reflect, and/or diffract the given rays off of this surface

Parameters:

rays (RayVectorArray) – a set of input rays that will interact with this surface

Return type:

RayVectorArray

readout(rays, wavelength, timedelta=None, axis=None, where=True, noise=True)#

Given a set of rays incident on the sensor surface, where each ray represents an expected number of photons per unit time, simulate the number of electrons that would be measured by the sensor.

Parameters:
  • rays (RayVectorArray) – A set of incident rays in local coordinates to measure.

  • wavelength (AbstractScalar) – The edges of the wavelength bins to sample.

  • timedelta (None | Quantity | AbstractScalar) – The exposure time of the measurement. If None (the default), the value in timedelta_exposure will be used.

  • axis (None | str | Sequence[str]) – The logical axes along which to collect photons.

  • where (bool | AbstractScalar) – A boolean mask used to indicate which photons should be considered when calculating the signal measured by the sensor.

  • noise (bool) – Whether to add noise to the result

Return type:

FunctionArray[SpectralPositionalVectorArray, AbstractScalar]

to_dxf(file, unit, transformation=None)#
Parameters:
to_string(prefix=None)#

Public-facing version of the __repr__ method that allows for defining a prefix string, which can be used to calculate how much whitespace to add to the beginning of each line of the result.

Parameters:

prefix (None | str) – an optional string, the length of which is used to calculate how much whitespace to add to the result.

Return type:

str

property aperture#

The light-sensitive aperture of the sensor.

aperture_mechanical: RectangularAperture = None#

The shape of the physical substrate supporting the sensor.

axis_pixel: Cartesian2dVectorArray[str, str] = None#

The names of the logical axes corresponding to the rows and columns of the pixel grid.

is_field_stop: bool = False#

A flag controlling whether this sensor is the field stop for the system.

is_pupil_stop: bool = False#

A flag controlling whether this sensor is the pupil stop for the system.

property is_stop: bool#

If this surface is pupil stop or the field stop, return True.

kwargs_plot: None | dict = None#

Extra keyword arguments to pass to plot()

material: AbstractSensorMaterial = None#

A model of the light-sensitive material composing this sensor.

If None (the default), optika.sensors.IdealImagingSensor will be used.

name: None | str = None#

The human-readable name of this sensor.

num_pixel: Cartesian2dVectorArray[int, int] = None#

The number of pixels along each axis of the sensor.

property rulings: None#

The optional ruling profile of this surface.

property sag: AbstractSag#

The sag profile of this surface.

property shape: dict[str, int]#

The array shape of this object.

timedelta_exposure: Quantity | AbstractScalar = <Quantity 0. s>#

The exposure time of the sensor.

transformation: None | AbstractTransformation = None#

The position and orientation of the sensor in the global coordinate system.

width_pixel: Quantity | AbstractCartesian2dVectorArray = <Quantity 0. um>#

The physical size of each pixel on the sensor.