no_nan
- jwst.persistence.persistence.no_nan(input_model, fill_value, zap_nan=False, zap_zero=False)[source]
Replace NaNs and/or zeros with a fill value.
- Parameters:
- input_model
JwstDataModel The input will typically be a reference file model.
- fill_valuefloat
Use this value to replace NaNs and/or zeros.
- zap_nanbool
If
True, replace NaNs in a copy ofinput_model.data. The default isFalse.- zap_zerobool
If
True, replace zeros in a copy ofinput_model.data. The default isFalse.
- input_model
- Returns:
JwstDataModelA copy of
input_modelwith NaNs and/or zeros in thedataattribute replaced withfill_value.