Slit2Msa

class stdatamodels.jwst.transforms.Slit2Msa(slits, models)

Bases: Model

Transform from Nirspec slit_frame to msa_frame.

Initialize the model.

Parameters:
slitslist

A list of open slits. A slit is a namedtuple, ~stdatamodels.jwst.transforms.models.Slit Slit(“name”, “shutter_id”, “dither_position”, “xcen”, “ycen”, “ymin”, “ymax”, “quadrant”, “source_id”, “shutter_state”, “source_name”, “source_alias”, “stellarity”, “source_xpos”, “source_ypos”, “source_ra”, “source_dec”)

modelslist

List of models (astropy.modeling.core.Model) corresponding to the list of slits.

Attributes Summary

n_inputs

n_outputs

slits

Return the slits.

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(name, x, y)

Compute the x and y coordinates in the MSA frame for a given slit.

get_model(name)

Retrieve the model for a given slit.

Attributes Documentation

n_inputs = 3
n_outputs = 3
slits

Return the slits.

Returns:
list

List of ~stdatamodels.jwst.transforms.models.Slit objects.

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(name, x, y)

Compute the x and y coordinates in the MSA frame for a given slit.

Parameters:
namestr

Name of the slit.

x, yfloat or np.ndarray

The x and y coordinates within the virtual slit.

Returns:
x_msa, y_msafloat or np.ndarray

The x and y coordinates in the MSA frame.

get_model(name)

Retrieve the model for a given slit.

Parameters:
namestr

Name of the slit.

Returns:
astropy.modeling.core.Model

Model for the given slit.