musevlt / zap

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

Option to mask wavelength ranges (with known spectral features) in the reprojection #4

Open Knusper opened 6 years ago

Knusper commented 6 years ago

In the PCA sky subtraction developed by Wild & Hewett for SDSS spectra a spectral feature mask was utilised, so that spectra with emission lines at known places would not change the amplitudes to favour components that could mimic this feature.

I think such a feature could also improve the quality of the sky-subtraction (especially in the filled) with ZAP.

Here is the link to the paper Wild & Hewett: https://academic.oup.com/mnras/article/358/3/1083/1025290

saimn commented 6 years ago

Hi Christian, Thanks for the reference. So it seems that there are just masking a given set of wavelength ranges ? I experimented something similar recently, for someone who was trying to use zap on a cube with an extended galaxy. I thought about adding an option with a list of wavelength ranges to mask. This would be easy to do, with the drawback that there would be no sky subtraction everywhere in the field for these ranges.

So instead I tried something else, that looked promising: the idea is to do an orthogonal projection with one (it could be more) spectrum, to remove the signal from this spectrum from the cube. So typically you provide a spectrum with your extended emission line, the projection removes this signal from the cube, and we compute the eigenvectors. It seems to work well, but I did not get too far in the analysis, as it was not sufficient in the studied case. But I still have the (experimental) code in a branch if you want to try: https://github.com/musevlt/zap/commit/f44781262901e6d1d6c6d40b3cfab409663f0e70

Knusper commented 6 years ago

On Tue, Jul 10, 2018 at 06:29:26PM +0200, Simon Conseil wrote:

Thanks for the reference. So it seems that there are just masking a given set of wavelength ranges ? I experimented something similar recently, for someone who was trying to use zap on a cube with an extended galaxy. I thought about adding an option with a list of wavelength ranges to mask. This would be easy to do, with the drawback that there would be no sky subtraction everywhere in the field for these ranges.

The way I understand it, there would be sky-subtraction, as the masked ranges where used when creating the sky-spectrum PCAs (in our case the objects would be assumed to be masked out completely during that step).

Just when doing the reprojection actual features in the spectrum will not enter in the caluclation amplitudes for the to-be-subtracted sky-spectrum.