AnglesFromGratingEquation3D¶
- class gwcs.spectroscopy.AnglesFromGratingEquation3D(groove_density, spectral_order, **kwargs)[source]¶
Bases:
Model
Solve the 3D Grating Dispersion Law in Direction Cosine space for the refracted angle.
- Parameters:
- groove_densityint
Grating ruling density in units of 1/m.
- orderint
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).Names of the parameters that describe models of this type.
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¶
- linear = False¶
- n_inputs = 3¶
- n_outputs = 3¶
- param_names = ('groove_density', 'spectral_order')¶
Names of the parameters that describe models of this type.
The parameters in this tuple are in the same order they should be passed in when initializing a model of a specific type. Some types of models, such as polynomial models, have a different number of parameters depending on some other property of the model, such as the degree.
When defining a custom model class the value of this attribute is automatically set by the
Parameter
attributes defined in the class body.
- 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.