RampModel

class roman_datamodels.datamodels.RampModel(init=None, **kwargs)[source]

Bases: _RomanDataModel

Handle the case where one passes in an already instantiated version of the model. In this case the constructor should just directly return the model.

Methods Summary

from_science_raw(model)

Attempt to construct a RampModel from a DataModel

Methods Documentation

classmethod from_science_raw(model)[source]

Attempt to construct a RampModel from a DataModel

If the model has a resultantdq attribute, this is copied into the RampModel.groupdq attribute.

Otherwise, this conversion does not do a detailed mapping between all of the new and old metadata, but instead opportunistically looks for fields with common names and assigns them. Other metadata with non-matching names is simply copied in place. This allows processing to proceed and preserves the original metadata, but the resulting files have duplicates of many entries.

Parameters:

model (FpsModel, RampModel, ScienceRawModel, TvacModel) – The input data model (a RampModel will also work).

Returns:

ramp_model – The RampModel built from the input model. If the input is already a RampModel, it is simply returned.

Return type:

RampModel