desihub / redrock

Redshift fitting for spectroperfectionism
BSD 3-Clause "New" or "Revised" License
22 stars 13 forks source link

Systematic error in quasar redshift due to Lya forest #85

Closed londumas closed 6 years ago

londumas commented 6 years ago

The following plot shows 1000 quasars generated with desisim.templates.QSO() and fitted with redrock. Blue points give results with Lya forests, orange points give results without Lya forests The idea is to test to convolve the first eigenspectra of quasar templates with the PDF (lya+lyb+...) and see if the systematic error can be removed or reduced.

systematic_error_redshift_qso

londumas commented 6 years ago

Tested with a simple model, and seems to work well. A more complete model should take the resolution of pixels into account, the presence of Ly-beta, Ly-gamma, ...

systematic_error_redshift_qso_correction

def mean_transmitted_flux_fraction(lRF,zpix):
     f = np.ones(lRF.size)
     w = lRF<1215.67
     f[w] = np.exp(-0.0023*(1.+zpix[w])**3.64)
     return f

Needs to modify redrock at two different places:

- py/redrock/templates/DistTemplate
        for i, z in enumerate(myz):
            for k in list(self._dwave.keys()):
                lRF = self._dwave[k]/(1.+z)
                zpix = self._dwave[k]/1215.67-1.
                data[i][k][:,0] *= mean_transmitted_flux_fraction(lRF,zpix)
- py/redrock/fitz/fitz()
            for k in list(dwave.keys()):
                lRF = dwave[k]/(1.+z)
                zpix = dwave[k]/1215.67-1.
                binned[k][:,0] *= mean_transmitted_flux_fraction(lRF,zpix)
londumas commented 6 years ago

Here are two plots giving:

systematic_error_redshift_qso_correction_capweights

systematic_error_redshift_qso_correction_capweights__distribution

londumas commented 6 years ago

Same result using desisim.templates.SIMQSO()

londumas commented 6 years ago

@sbailey, here is the current status on the issue: The current fix works very well on desisim, but it fails on BOSS data. The reason is that the current PCA base is not corrected for the Lyman-series absorption. See issue https://github.com/desihub/desisim/issues/323. The solution would be to produce a new quasar PCA base where the data would be corrected for the absorption in the Lyman-series and in the Lyman-limit. What do you think?

moustakas commented 6 years ago

Why not just re-derive coefficients from a QSO template set generated using simqso?

londumas commented 6 years ago

@moustakas, why not. Could you link me to the doc or a paper explaining simqso? I need to know how the spectra are build and if they are unabsorbed or have the Lyman-series and the Lyman-limit.

sbailey commented 6 years ago

Progress has been made on this via #104, but more work is to be done on the template side, so leaving this open for now and moving from 18.3 to 18.6 project.

londumas commented 6 years ago

Similar issue as https://github.com/desihub/redrock/issues/106