desihub / redrock

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

treatment of IGM absorption is incorrect #237

Closed moustakas closed 9 months ago

moustakas commented 1 year ago

The utils.transmission_Lyman method is supposed to account for absorption in the intergalactic medium (IGM) due to the hydrogen Lyman series, but something is amiss with the way this absorption has been coded in a way which likely affects the redshifts of the highest-redshift QSOs (as well as the FastSpecFit model fits which uses the same method).

Specifically, this figure shows the transmission in Redrock for a z=3 target compared to the output of Cigale, which uses the attenuation coefficients from Meiksin 2006 (see here as well as Madau et al. 1996 and many other references).

Some relevant / related tickets and discussions are:

Screenshot 2023-03-22 at 12 27 42 PM
andreufont commented 1 year ago

Is this quasar really at z=3? If so, the Lya absorption should start at 4860A, it doesn't look like this is the case in the plot.

The "redrock" line seems reasonable, coming from Lya absorption, then Lyb (should be at 4100A) and other Lyman lines.

However, this does not include the impact of DLAs or LLS, these would add extra absorption in some lines of sight, specially at low wavelengths. Maybe this is what the other line tries to model?

Cheers, Andreu

On Wed, 22 Mar 2023, 17:35 Moustakas, @.***> wrote:

The utils.transmission_Lyman https://github.com/desihub/redrock/blob/main/py/redrock/utils.py#L222-L281 method is supposed to account for absorption in the intergalactic medium (IGM) due to the hydrogen Lyman series, but something is amiss with the way this absorption has been coded in a way which likely affects the redshifts of the highest-redshift QSOs (as well as the FastSpecFit model fits which uses the same method).

Specifically, this figure shows the transmission in Redrock for a z=3 target compared to the output of Cigale https://gitlab.lam.fr/cigale/cigale, which uses the attenuation coefficients from Meiksin 2006 https://ui.adsabs.harvard.edu/abs/2006MNRAS.365..807M/abstract (see here https://gitlab.lam.fr/cigale/cigale/-/blob/master/pcigale/sed_modules/redshifting.py#L25 as well as Madau et al. 1996 https://ui.adsabs.harvard.edu/abs/1996MNRAS.283.1388M/abstract and many other references).

Some relevant / related tickets and discussions are:

[image: Screenshot 2023-03-22 at 12 27 42 PM] https://user-images.githubusercontent.com/1431820/226972472-3b5c753c-7052-4228-ae8a-d60e473e89e7.png

— Reply to this email directly, view it on GitHub https://github.com/desihub/redrock/issues/237, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5RYR7ZQIXQ4VWL6K5YIMDW5MS4DANCNFSM6AAAAAAWECFMIE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Avís - Aviso - Legal Notice - (LOPD) - http://legal.ifae.es http://legal.ifae.es/

paulmartini commented 1 year ago

I agree with Andreu. I looked at the Redrock code and it uses the mean measured value of the LyA transmitted flux and then calculates the higher n transitions by just using the ratio of the oscillator strengths. This is fine to capture the photoelectric contribution from the optically thin IGM, but this doesn't take into account DLAs or LLSs, and these will dominate below the Lyman limit for most lines of sight (at the redshifts where this matters).

abrodze commented 1 year ago

linking this issue to redrock-templates opticaldepth and redrock opticaldepth branch.

qso-HIZ template file and lyman series corrections are updated with Kamble+ 2020 values so that Redrock and HIZ are in sync on the correction. This only accounts for N=2 correction, as higher order corrections introduce troublesome discontinuities in the eigenspectra flux densities (likely rooted in issues with the shortest observer frame wavelengths in SDSS).

These changes significantly reduce the observed bias on QSO redshifts at z>2.5. There is slight degradation in redshift precision measured by repeat exposures (59+-2.5 km/s -> 64+-2.5 km/s). Quick checks show no impacts z<1.4 (the limit of hiz).

drp-qso

moustakas commented 1 year ago

Below is a comparison of how the IGM absorption is handled in Redrock vs other standard implementations that I am more familiar with (e.g., from a variety of photometric redshift and other spectral fitting codes).

It's clear that what is currently coded up in Redrock is discrepant with these other implementations in the sense that it ignores DLAs and Lyman-limit systems (as @paulmartini and @andreufont both pointed out).

However, because I have not yet fully wrapped my head around how IGM absorption is handled in the QSO templates, I am uncertain what this means for QSO redshifts (but see https://github.com/desihub/redrock/issues/237#issuecomment-1503580068, https://github.com/desihub/redrock/pull/104, and https://github.com/imcgreer/simqso/issues/24#issuecomment-372193756).

As far as https://github.com/desihub/fastspecfit/issues/123 is concerned, I am planning to move forward with implementing the Inoue+14 coefficients in FastSpecFit, and these (or comparable) coefficients should be used in Redrock when/if we extend the galaxy redshift scan to higher redshift (see https://github.com/desihub/redrock-templates/issues/11).

@abrodze should comment on how we should move forward with the QSO templates and redshift scan.

[Note: in the figure legend, I list the code and, in parenthesis, the IGM implementation; e.g. Bagpipes (Inoue+14) means the Bagpipes SED-modeling code and the Inoue+14 IGM coefficients.]

Screenshot 2023-07-24 at 5 22 10 PM
sbailey commented 9 months ago

Implemented in PR #271 to allow templates to specify which IGM model to use. Past templates will continue to use whatever model they were originally using, but new templates can specify RRIGM=Inoue14 to use Inoue+ 2014 instead.