Rulings#

class optika.rulings.Rulings(spacing, diffraction_order)[source]#

Bases: AbstractRulings

An idealized set of rulings which have perfect efficiency in all diffraction orders.

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__(spacing, diffraction_order)

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.Rulings
Parameters:
efficiency(rays, normal)[source]#

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

Parameters:
Return type:

float

incident_effective(rays, normal)#

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

diffraction_order: int | AbstractScalar = <dataclasses._MISSING_TYPE object>#

The diffraction order to simulate.

property shape: dict[str, int]#

The array shape of this object.

spacing: Quantity | AbstractScalar | AbstractRulingSpacing = <dataclasses._MISSING_TYPE object>#

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.