SellmeierGlass¶
-
class
gwcs.spectroscopy.
SellmeierGlass
(B_coef, C_coef, **kwargs)[source]¶ Bases:
astropy.modeling.core.Model
Sellmeier equation for glass.
- Parameters
B_coef : ndarray
Iterable of size 3 containing B coefficients.
C_coef : ndarray
Iterable of size 3 containing c coefficients in units of
u.um**2
.- Returns
n : float
Refractive index.
Notes
Model formula:
\[n(\lambda)^2 = 1 + \frac{(B1 * \lambda^2 )}{(\lambda^2 - C1)} + \frac{(B2 * \lambda^2 )}{(\lambda^2 - C2)} + \frac{(B3 * \lambda^2 )}{(\lambda^2 - C3)}\]References
Examples
>>> import astropy.units as u >>> b_coef = [0.58339748, 0.46085267, 3.8915394] >>> c_coef = [0.00252643, 0.010078333, 1200.556] * u.um**2 >>> model = SellmeierGlass(b_coef, c_coef) >>> model(2 * u.m) <Quantity 2.43634758>
Attributes Summary
B1, B2, B3 coefficients.
C1, C2, C3 coefficients in units of um ** 2.
This property is used to indicate what units or sets of units the evaluate method expects, and returns a dictionary mapping inputs to units (or
None
if any units are accepted).Methods Summary
__call__
(*inputs[, model_set_axis, …])Evaluate this model using the given input(s) and the parameter values that were specified when the model was instantiated.
evaluate
(wavelength, B_coef, C_coef)Evaluate the model on some input variables.
Attributes Documentation
-
B_coef
= Parameter('B_coef', value=[1. 1. 1.])¶ B1, B2, B3 coefficients.
-
C_coef
= Parameter('C_coef', value=[0. 0. 0.])¶ C1, C2, C3 coefficients in units of um ** 2.
-
input_units
¶ This property is used to indicate what units or sets of units the evaluate method expects, and returns a dictionary mapping inputs to units (or
None
if any units are accepted).Model sub-classes can also use function annotations in evaluate to indicate valid input units, in which case this property should not be overridden since it will return the input units based on the annotations.
-
linear
= False¶
-
n_inputs
= 1¶
-
n_outputs
= 1¶
-
param_names
= ('B_coef', 'C_coef')¶
-
standard_broadcasting
= False¶
Methods Documentation
-
__call__
(*inputs, model_set_axis=None, with_bounding_box=False, fill_value=nan, equivalencies=None, inputs_map=None, **new_inputs)¶ Evaluate this model using the given input(s) and the parameter values that were specified when the model was instantiated.