Micro-library for representing sphero-cylindrical refraction as a second-order angular harmonic.
Refractive power over meridians is invariant under a 180 degree rotation of axis labeling. This symmetry implies periodicity in
- Minus-cylinder convention.
- Axis is in degrees at the API boundary.
-
$\theta$ is in radians by default for evaluation.
Let
Inverse conversion is implemented in the library with axis wrapped to
This representation is closely related to double-angle encodings used for axial orientation fields in computer vision and directional signal modeling.
import numpy as np
from dho import DioptricOperator
op = DioptricOperator.from_sph_cyl_axis(-2.00, -1.50, 30.0)
print("coefficients (M, a, b):", op.coefficients())
print("reconstructed (SPH, CYL, AXIS):", op.to_sph_cyl_axis())
theta_deg = np.linspace(0.0, 180.0, 7)
print("P(theta):", op.evaluate(theta_deg, degrees=True))
op_rot = op.rotate(15.0, degrees=True)
print("rotated prescription:", op_rot.to_sph_cyl_axis())
A minimal GitHub Pages interface is provided in docs.