Logical

class jwst.transforms.models.Logical(condition, compareto, value, **kwargs)[source]

Bases: astropy.modeling.core.Model

Substitute values in an array where the condition is evaluated to True.

Similar to numpy’s where function.

Parameters
  • condition (str) – A string representing the logical, one of GT, LT, NE, EQ

  • compareto (float, ndarray) – A number to compare to using the condition If ndarray then the input array, compareto and value should have the same shape.

  • value (float, ndarray) – Value to substitute where condition is True.

Attributes Summary

conditions

n_inputs

n_outputs

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(x)

Evaluate the model on some input variables.

Attributes Documentation

conditions = {'EQ': <ufunc 'equal'>, 'GT': <ufunc 'greater'>, 'LT': <ufunc 'less'>, 'NE': <ufunc 'not_equal'>}
n_inputs = 1
n_outputs = 1

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.

evaluate(x)[source]

Evaluate the model on some input variables.