AnglesFromGratingEquation3D¶
-
class
gwcs.spectroscopy.
AnglesFromGratingEquation3D
(groove_density, spectral_order, **kwargs)[source]¶ Bases:
astropy.modeling.core.Model
Solve the 3D Grating Dispersion Law in Direction Cosine space for the refracted angle.
- Parameters
groove_density : int
Grating ruling density in units of 1/m.
order : int
Spectral order.
Examples
>>> from astropy.modeling.models import math >>> model = AnglesFromGratingEquation3D(groove_density=20000*1/u.m, spectral_order=-1) >>> alpha_in = (math.Deg2radUfunc() | math.SinUfunc())(.0001 * u.deg) >>> beta_in = (math.Deg2radUfunc() | math.SinUfunc())(.0001 * u.deg) >>> lam = 2e-6 * u.m >>> alpha_out, beta_out, gamma_out = model(lam, alpha_in, beta_in) >>> print(alpha_out, beta_out, gamma_out) 0.04000174532925199 -1.7453292519934436e-06 0.9991996098716049
Attributes Summary
Grating ruling density in units 1/ length.
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).Spectral order.
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, alpha_in, beta_in, …)Evaluate the model on some input variables.
Attributes Documentation
-
groove_density
= Parameter('groove_density', value=1.0)¶ Grating ruling density in units 1/ length.
-
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
= 3¶
-
n_outputs
= 3¶
-
param_names
= ('groove_density', 'spectral_order')¶
-
spectral_order
= Parameter('spectral_order', value=1.0)¶ Spectral order.
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.