Curve::Zernike class reference
[Core module]
Declaration
#include <Goptical/Curve/Zernike>
namespace Goptical {
namespace Curve {
class Zernike;
};
};
This class is a member of the Curve namespace.
Inheritance
Description
This class enables use of zernikes polynomials to define a surface curve. Zernikes terms can be enabled and disabled individually.
Fitting can be used to get best fit Zernike polynomials coefficients of an other curve.
This implementation uses Zernike polynomials set as described in ISO standard 10110-5.
Based on Zernikes pages by James C Wyant and Michael Koch. http://www.optics.arizona.edu/jcwyant/Zernikes/ZernikePolynomials.htm and http://www.astro-electronic.de/faq2.htm
Members
See also the full member list section for this class.
Inherited members
- 5 members inherited from Base
Functions
- Zernike(double radius, double unit_scale = [...])
- Zernike(double radius, double coefs[], unsigned int coefs_count, double unit_scale = [...])
- virtual void derivative(const Math::Vector2 &xy, Math::Vector2 &dxdy) const
- double fit(const Base &c, const Trace::Distribution &d = [...])
- double get_coefficient(unsigned int n) const
- double get_radius() const
- bool get_term_state(unsigned int n)
- virtual double sagitta(const Math::Vector2 &xy) const
- void set_coefficient(unsigned int n, double c)
- void set_coefficients_scale(double s)
- void set_coefficients_threshold(double t)
- void set_radius(double radius)
- void set_term_state(unsigned int n, bool enabled)
Static functions
- static double zernike_poly(unsigned int n, const Math::Vector2 &xy)
- static void zernike_poly_d(unsigned int n, const Math::Vector2 &xy, Math::Vector2 &dxdy)
Constant
- static const unsigned int term_count
Members detail
Create a Zernike curve defined over the given circle radius.
- radius: Zernike circle radius
- unit_scale: Sagitta scale factor used to change units globally
Create a Zernike curve defined over the given circle radius and initialize coefficients from table.
- radius: Zernike circle radius
- coefs: Table of Zernike coefficients starting with z0 (piston)
- coefs_count: Number of coefficients available in the table
- unit_scale: Sagitta scale factor used to change units globally
This virtual function overrides the derivative
virtual function defined in the Base
base abstract class.
Documentation inherited from base class:
Get curve x and y derivative (gradient) at specified point
double fit(const Base &c, const Trace::Distribution &d = default_dist)
Compute all zernike coefficient to best fit the given curve. RMS difference is returned. The specified distribution is used to choose sampling points on curve. Terms state is adjusted according to current threshold
Get coefficient associated with zernike term n
Get Zernike circle radius
Get current term enable state
virtual double sagitta(const Math::Vector2 &xy) const
This virtual function implements the sagitta
pure function declared in the Base
base abstract class.
Documentation inherited from base class:
Get curve sagitta at specified point
Set coefficient associated with zernike term n and enable term according to current threshold. See set_coefficients_threshold()
Set coefficients unit scale factor. default is 1 (1 mm).
Set new coefficient threshold and adjust all term states (enabled/disabled) depending on new threshold. Term with coefficient absolute value below the specified threshold will be disabled. Disabling useless terms improve performance. Default threshold is 10^-10.
Set Zernike circle radius
This functions must be used to enable/disable a zernike term without changing its coefficient
Number of implemented zernike polynomials
static double zernike_poly(unsigned int n, const Math::Vector2 &xy)
Evaluate zernike polynomial n
Evaluate x and y derivatives of zernike polynomial n