BaseExtModel¶
- class dust_extinction.baseclasses.BaseExtModel(*args, meta=None, name=None, **kwargs)[source]¶
Bases:
ModelBase Extinction Model. Do not use directly.
Attributes Summary
Methods Summary
Evaluate this model using the given input(s) and the parameter values that were specified when the model was instantiated.
extinguish(x[, Av, Ebv])Calculate the extinction as a fraction
prepare_inputs(*args, **kwargs)This method is used in
__call__to ensure that all the inputs to the model can be broadcast into compatible shapes (if one or both of them are input as arrays), particularly if there are more than one parameter sets.Attributes Documentation
- input_units = {'x': Unit("1 / micron")}¶
- input_units_equivalencies = {'x': [(Unit("m"), Unit("Hz"), <function spectral.<locals>.<lambda>>), (Unit("m"), Unit("J"), <function spectral.<locals>.<lambda>>), (Unit("Hz"), Unit("J"), <function spectral.<locals>.<lambda>>, <function spectral.<locals>.<lambda>>), (Unit("m"), Unit("1 / m"), <function spectral.<locals>.<lambda>>), (Unit("Hz"), Unit("1 / m"), <function spectral.<locals>.<lambda>>, <function spectral.<locals>.<lambda>>), (Unit("J"), Unit("1 / m"), <function spectral.<locals>.<lambda>>, <function spectral.<locals>.<lambda>>), (Unit("1 / m"), Unit("rad / m"), <function spectral.<locals>.<lambda>>, <function spectral.<locals>.<lambda>>), (Unit("m"), Unit("rad / m"), <function spectral.<locals>.<lambda>>), (Unit("Hz"), Unit("rad / m"), <function spectral.<locals>.<lambda>>, <function spectral.<locals>.<lambda>>), (Unit("J"), Unit("rad / m"), <function spectral.<locals>.<lambda>>, <function spectral.<locals>.<lambda>>)]}¶
- n_inputs = 1¶
- n_outputs = 1¶
- return_units = {'y': Unit(dimensionless)}¶
Methods Documentation
- __call__()¶
Evaluate this model using the given input(s) and the parameter values that were specified when the model was instantiated.
- extinguish(x, Av=None, Ebv=None)[source]¶
Calculate the extinction as a fraction
- Parameters:
- Returns:
frac_ext – fractional extinction as a function of x
- Return type:
np array (float)
- prepare_inputs(*args, **kwargs)[source]¶
This method is used in
__call__to ensure that all the inputs to the model can be broadcast into compatible shapes (if one or both of them are input as arrays), particularly if there are more than one parameter sets. This also makes sure that (if applicable) the units of the input will be compatible with the evaluate method.