musevlt / zap

the Zurich Atmosphere Purge. Sky subtraction for MUSE.
http://zap.readthedocs.io/
MIT License
10 stars 9 forks source link

Warn if a slice contains too many NaN values #1

Open saimn opened 6 years ago

saimn commented 6 years ago

Zap cleans the NaN values before doing the PCA (Spaxels with more then 25% of NaN values are removed, the others are replaced with an interpolation from the neighbors.) but this does not take into account specific cases where a slice of the cube has many NaNs, typically at the beginning or end of the cube. This may lead to unexpected results because of the interpolation on these pixels, so it would be useful to at least emit a warning when a slice has more than x % of NaNs.