ParabolicSag#

class optika.sags.ParabolicSag(focal_length=<Quantity inf mm>, *, transformation=None, parameters_slope_error=None, parameters_roughness=None, parameters_microroughness=None)[source]#

Bases: AbstractConicSag

A parabolic sag profile.

Attributes

conic

The conic constant of this conic section.

focal_length

The focal length of this parabola.

parameters_microroughness

The microroughness parameters for this sag profile.

parameters_roughness

The roughness parameters for this sag profile.

parameters_slope_error

The slope error parameters for this sag profile.

radius

The effective radius of this conic section.

shape

The array shape of this object.

transformation

The transformation between the surface coordinate system and the sag coordinate system.

Methods

__init__([focal_length, transformation, ...])

intercept(rays)

Compute the intercept of a ray with this parabolic surface.

normal(position)

The vector perpendicular to the surface at the given position.

propagate_rays(rays)

For the given input rays, calculate new rays based off of their interation with this object.

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.sags.ParabolicSag
Parameters:
intercept(rays)[source]#

Compute the intercept of a ray with this parabolic surface.

Parameters:

rays (AbstractRayVectorArray) – The rays to find the intercept for.

Return type:

RayVectorArray

Notes

The equation for a paraboloid is

\[z(x, y) = \frac{x^2 + y^2}{4 f},\]

where \(x\), \(y\), and \(z\) are points on the paraboloid and \(f\) is the focal length of the paraboloid. The equation for a line is

\[\mathbf{x} = \mathbf{o} + d \mathbf{u},\]

where \(\mathbf{o}\) is the starting point of the line, \(\mathbf{u}\) is a unit vector pointing in the direction of the line, and \(d\) is the distance from the origin to the intercept with the paraboloid. Combining these equations gives

\[o_z + d u_z = \frac{(o_x + d u_x)^2 + (o_y + d u_y)^2}{4 f},\]

which can then be solved for \(d\) using the quadratic equation,

\[d = \frac{-o_x u_x - o_y u_y + 2 f u_z - \text{sgn}(f u_z) \sqrt{-o_y^2 u_x^2 - o_x^2 u_y^2 + 2 o_y u_y (o_x u_x - 2 f u_z) + 4 f (o_z (u_x^2 + u_y^2) - o_x u_x u_z + f u_z^2} }{u_x^2 + u_y^2}.\]

If the line is parallel to the \(z\) axis, then the above equation is singular and we need to solve the corresponding linear equation to find

\[d = \frac{o_x^2 + o_y^2 - 4 f o_z}{4 f u_z}.\]
normal(position)[source]#

The vector perpendicular to the surface at the given position.

Parameters:

position (AbstractCartesian3dVectorArray) – The location on the surface to evaluate the normal vector

Return type:

AbstractCartesian3dVectorArray

propagate_rays(rays)#

For the given input rays, calculate new rays based off of their interation with this object.

Parameters:

rays (AbstractRayVectorArray) – a set of input rays that will interact with this object

Return type:

AbstractRayVectorArray

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 conic: int#

The conic constant of this conic section.

focal_length: Quantity | AbstractScalar = <Quantity inf mm>#

The focal length of this parabola.

parameters_microroughness: None | RoughnessParameters = None#

The microroughness parameters for this sag profile.

parameters_roughness: None | RoughnessParameters = None#

The roughness parameters for this sag profile.

parameters_slope_error: None | SlopeErrorParameters = None#

The slope error parameters for this sag profile.

property radius: Quantity | AbstractScalar#

The effective radius of this conic section.

property shape: dict[str, int]#

The array shape of this object.

transformation: None | AbstractTransformation = None#

The transformation between the surface coordinate system and the sag coordinate system.