You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The weight masking functions in make_optimal_extraction occasionally corrupt the 1D extractions at very high S/N. The earlier default behavior max_wht_percentile=98 masked pixels where the weight was above the 98th percentile, in order to flag occasional pixels that had extremely high weights for some unknown reason. This would occasionally clip the centers of bright targets.
This change implemented a new masking scheme with the parameter max_med_wht_factor=10, which would mask pixels that have weights larger than 10 times the median (nonzero) weight in the 2D array. That seems to mostly fix the issue.
Here's an example comparing the weighting schemes:
importmatplotlib.pyplotaspltfrommsaexpimportspectrum# A bright UNCOVER objectfile='https://s3.amazonaws.com/msaexp-nirspec/extractions/uncover-4m1-v1/uncover-4m1-v1_prism-clear_2561_42213.spec.fits'spec=spectrum.SpectrumSampler(file)
new=spec.redo_1d_extraction(bkg_offset=6,
max_wht_percentile=None, # Turn off this maskmax_med_wht_factor=20)
_=spec.drizzled_hdu_figure(unit='flam')
_=new.drizzled_hdu_figure(unit='flam')
The weight masking functions in make_optimal_extraction occasionally corrupt the 1D extractions at very high S/N. The earlier default behavior
max_wht_percentile=98
masked pixels where the weight was above the 98th percentile, in order to flag occasional pixels that had extremely high weights for some unknown reason. This would occasionally clip the centers of bright targets.This change implemented a new masking scheme with the parameter
max_med_wht_factor=10
, which would mask pixels that have weights larger than 10 times the median (nonzero) weight in the 2D array. That seems to mostly fix the issue.Here's an example comparing the weighting schemes:
The text was updated successfully, but these errors were encountered: