DataSet
- class jwst.persistence.persistence.DataSet(output_obj, save_persistence, persistence_time=None, dn_threshold=None, persistence_array=None, persistence_dnu=None)[source]
Bases:
objectInput dataset to which persistence will be applied.
- Parameters:
- output_obj
JwstDataModel A copy of the input model. This will be modified in-place.
- save_persistencebool
If
True, the persistence that was subtracted will be written to an output file.
- output_obj
- Attributes:
- output_obj
JwstDataModel A copy of the input model. This will be modified in-place.
- save_persistencebool
If
True, the persistence that was subtracted will be written to an output file.- persistence_timeint
The number of seconds for a persistence window to persist.
- persistence_arraystr or None
If not None, then it is the path to a file containing a persistence array.
- persistence_dnubool
When flagging PERSISTENCE, if
True, then flag as DO_NOT_USE as well.
- output_obj
Methods Summary
do_all()Execute all tasks for persistence correction.
process_persistence_flagging(current_time, ...)Flag groups that are within a persistence window.
Methods Documentation
- process_persistence_flagging(current_time, sat_array, integ, group)[source]
Flag groups that are within a persistence window.
The structure of the persistence_array is as follows:
Zero entries indicate no persistence flagging.
Non-zero entries indicate the end time of the persistence flagging window.
Since a non-zero entry indicates a persistence flagging window has been found for that pixel. The entry is the epoch time of the end of that window for a pixel. To check to see if any groups are within a persistence flagging window, it is first decided if there is a non-zero entry in the persistence_array for that pixel. If non-zero, make sure the current_time is between the start and end times of the persistence window in the persistence_array.
Additionally, the current time may be the beginning of a persistence window if it is determined to be the first group in a ramp to be saturated, in which case the end time of the window is current_time + persistence_time.
- Parameters:
- current_timefloat
The epoch time of the current integration and group.
- sat_arrayndarray
The saturation count for each pixel.
- integint
The current integration being processed.
- groupint
The current group being processed.