sdss / mangadap

The MaNGA Data Analysis Pipeline
BSD 3-Clause "New" or "Revised" License
16 stars 9 forks source link

Model cube extensions #44

Closed kbwestfall closed 6 years ago

kbwestfall commented 6 years ago

This changes the extensions of the Model cube.

In previous versions, to get the stellar continuum you need to compute STCNT = MODEL - EMLINE - EMLINE_BASE . In the HYB binning scheme, you have to construct this model if you want to compare the model to the binned spectra in the model cube (FLUX extension). The associated mask for the stellar-continuum fit is in MASK. The model determined from the combined fit is just MODEL; to compare data to model for the HYB scheme, you have to use the spectra in the DRP file. The associated combined fit mask is then in EMLINE_MASK. Just to emphasize, the previous model/mask pairings were MODEL/EMLINE_MASK and (MODEL-EMLINE-EMLINE_BASE)/MASK.

I have changed the relevant extensions to MODEL, MASK, EMLINE, STCNT, STCNT_MASK. The stellar continuum and its relevant mask are provided directly and named appropriately, STCNT and STCNT_MASK; the combined model and its mask are MODEL and MASK; and EMLINE has the same meaning. So now, the model/mask pairings are MODEL/MASK and STCONT/STCONT_MASK. This is much more clear.

I've also fixed some mask issues, particularly for the emission-line module. There were some inconsistencies in what ppxf was masking and what was being reported by the DAP. Given the rearrangement of the masks above, I've also effectively removed the ELFAILED and ELIGNORED masks from the model cube file, replacing them with simply FITFAILED and FITIGNORED. I can do this because there's no longer any ambiguity for whether the pixel was flagged in the stellar-continuum-fitting module or the emission-line-fitting module. Any fit-related bit in the MASK extension is associated with the emission-line fitting module, and any fit-related bit in the STCNT_MASK is associated with the stellar-continuum fitting module.

kbwestfall commented 6 years ago

Just changed the relevant extension names from STCNT to STELLAR.