AbstractRulings#

class optika.rulings.AbstractRulings[source]#

Bases: Printable, Shaped

Interface for the interaction of a ruled surface with incident light

Attributes

diffraction_order

the diffraction order to simulate

shape

The array shape of this object.

spacing

Spacing between adjacent rulings at the given position.

spacing_

A normalized version of spacing that is guaranteed to be an instance of optika.rulings.AbstractRulingSpacing.

Methods

__init__()

efficiency(rays, normal)

The fraction of light that is diffracted into a given order.

incident_effective(rays, normal)

Compute the effective propagation direction of the given rays using incident_effective().

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.rulings.AbstractRulings
abstractmethod efficiency(rays, normal)[source]#

The fraction of light that is diffracted into a given order.

Parameters:
Return type:

float | AbstractScalar

incident_effective(rays, normal)[source]#

Compute the effective propagation direction of the given rays using incident_effective().

Parameters:
Return type:

RayVectorArray

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

abstract property diffraction_order: int | AbstractScalar#

the diffraction order to simulate

abstract property shape: dict[str, int]#

The array shape of this object.

abstract property spacing: Quantity | AbstractScalar | AbstractRulingSpacing#

Spacing between adjacent rulings at the given position.

property spacing_: AbstractRulingSpacing#

A normalized version of spacing that is guaranteed to be an instance of optika.rulings.AbstractRulingSpacing.