kammerje / jwst-kpi

Kernel phase pipeline for JWST.
GNU General Public License v3.0
3 stars 2 forks source link

Use Astropy Convolution or Filtering instead of Scipy for "medfilt" bad pixel? #21

Open vandalt opened 1 year ago

vandalt commented 1 year ago

Whe bad pixels are NaN (e.g. with NIRCam default reductions), the scipy medfilt does not behave well in my experience. Astropy has workarounds for this, so it might be worth switching to astropy for median filtering operations in the pipeline.

This page expalins the difference between astropy and scipy for NaN handling: https://docs.astropy.org/en/stable/convolution/index.html.

What do you think @kammerje ?

kammerje commented 1 year ago

I agree we should change to the Astropy solution here.