Apertures
svetlanna.elements.aperture.AbstractMulElement
AbstractMulElement(
simulation_parameters: SimulationParameters,
)
Bases: Element, ABC
Class that generalize all apertures with \(E^\text{out} = \hat{T}E^\text{in}\) like forward function, where \(\hat{T}\) is transmission function.
transmission_function
abstractmethod
property
The tensor representing transmission function of the element, \(\hat{T}\).
The shape of the transmission function should be broadcastable to the shape of the incident wavefront.
To achive this, one can use SimpulationParameters.cast method to cast the transmission function to the shape of the incident wavefront:
svetlanna.elements.Aperture
Aperture(
simulation_parameters: SimulationParameters,
mask: OptimizableTensor,
)
Bases: AbstractMulElement
Aperture defined by mask tensor. Commonly, the mask is a tensor with values of either 0 or 1, where 0 represents blocked light and 1 represents allowed light.
Parameters:
-
simulation_parameters(SimulationParameters) –Simulation parameters.
-
mask(Tensor) –Two-dimensional tensor representing the aperture mask of shape
(Ny, Nx). The mask works as following:\[E^\text{out}_{xyw...} = \text{mask}_{xy} E^\text{in}_{xyw...}\]In this case 0 blocks light and 1 allows light go through.
svetlanna.elements.RectangularAperture
RectangularAperture(
simulation_parameters: SimulationParameters,
height: float,
width: float,
)
Bases: AbstractMulElement
Rectangular aperture. Through the rectangular area of defined height and width located in the center the light is allowed to pass, otherwise blocked.
Parameters:
-
simulation_parameters(SimulationParameters) –Simulation parameters.
-
height(float) –Aperture height.
-
width(float) –Aperture width.
svetlanna.elements.RoundAperture
RoundAperture(
simulation_parameters: SimulationParameters,
radius: float,
)
Bases: AbstractMulElement
Round-shaped aperture. Through the round area of defined radius located in the center the light is allowed to pass, otherwise blocked.
Parameters:
-
simulation_parameters(SimulationParameters) –Simulation parameters.
-
radius(float) –Radius of the round-shaped aperture.