fix_inputs

astropy.modeling.fix_inputs(modelinstance, values)[source]

This function creates a compound model with one or more of the input values of the input model assigned fixed values (scalar or array).

Parameters:
modelinstance : Model instance. This is the model that one or more of the

model input values will be fixed to some constant value.

values : A dictionary where the key identifies which input to fix

and its value is the value to fix it at. The key may either be the name of the input or a number reflecting its order in the inputs.

Examples

>>> from astropy.modeling.models import Gaussian2D
>>> g = Gaussian2D(1, 2, 3, 4, 5)
>>> gv = fix_inputs(g, {0: 2.5})

Results in a 1D function equivalent to Gaussian2D(1, 2, 3, 4, 5)(x=2.5, y)