normal_shape

jwst.ipc.x_irs2.normal_shape(input_model, n=None, r=None, detector=None)[source]

Determine the shape of the ‘normal’ pixel data when excluding interleaved reference pixels.

Parameters:
input_modelJwstDataModel or ndarray

Either the input science data model or the data array from the input data model.

nint or None

If not None, this value will be used for the nrs_normal parameter. If n is None, the value will be obtained from the metadata for input_model, or, if this fails (e.g., if input_model is actually an ndarray), a default value will be used. None is the default.

rint or None

If not None, this value will be used for the nrs_reference parameter. See also the description for n. None is the default.

detectorstr or None

When input_model is a JwstDataModel, the detector name can be gotten from the metadata. If input_model is an ndarray, the detector name should be explicitly specified. For NIRSpec data, the value should be either “NRS1” or “NRS2”.

Returns:
tuple of int

The shape of the input science data array.