bd-j / prospector

Python code for Stellar Population Inference from Spectra and SEDs
http://prospect.readthedocs.io
MIT License
153 stars 71 forks source link

IGM incorrect for Ly-alpha? #321

Closed palfeng closed 4 months ago

palfeng commented 4 months ago

Hello, I'm using the IGM model in Prospector as:

model_params.update(TemplateLibrary['igm'])
model_params["add_igm_absorption"] = {'N': 1, 'isfree': False, 'init': True} model_params["igm_factor"]["init"] = 1.0 model_params["igm_factor"]["isfree"] = False

I got a few questions for which I didn't find clear answers online:

  1. I saw in the manual: "igm_factor is an optional overall scaling factor to account for line-of-sight variations." What is the typical range of this parameter? I suppose it is around the order of unit?

  2. It seems like IGM is not correctly added when I plot the best-fit results for Ly-alpha lines at high-z. This is because I still see very strong LyA emission lines at z ~10 in my test, while < LyA is fully attenuated (~0). For your information: 1) I have defined model_params["zred"]['init'] = object_redshift, so I suppose Prospector will use it to scale IGM optical depth. 2) I read the MCMC fit results using res, obs, model = reader.results_from("MCMC.h5") best = res["bestfit"] wspec = best['restframe_wavelengths'](1+zobj) fspec = best['spectrum'])
    Then plt.plot(wspec, flux_MaggietoNJY(wspec,fspec) 3) I tried to vary igm_factor from 1 to 50. It seems this factor does not change the best-fit LyA strength...

I appreciate if you have any comments or suggestions! Thanks in advance for your help!

bd-j commented 4 months ago

Hi @palfeng the IGM model used in FSPS and hence prospector is from Madau 1995. It does not include the damping wing, so only wavelengths less than 1215 restframe are attenuated. The variation of the scale factor is likely to be redshift dependent in detail, depending on density variations from LSS and a specific model of reionization. igm_factor is intended as a very approximate scaling factor for e.g. a more or less dense than usual line-of-sight.

At z~10 I think the Madau model gives very high opacity already, so increasing IGM absorption will not have a noticeable effect. You might try igm_factor < 1...

In general detailed modeling of the Lyman-alpha line profile is beyond the scope of prospector modelling at the moment, as it depends on complex radiative transfer of a resonant line.

palfeng commented 4 months ago

Thanks for the prompt reply! I should find it earlier, my second question seems been solved by https://github.com/bd-j/prospector/issues/180. I tried update sps = CSPSpecBasis(reserved_params=["sigma_smooth"]) and now Ly-alpha is attenuated significantly. The red wing of LyA is not attenuated and I think this is as you said the limitation of Madau 1995 model. Anyways, it works OK now!

bd-j commented 4 months ago

Great, glad it's working (modulo the M95 approximations) - the reserved_params change should be in the most recent couple versions of prospector, if you are still encountering it in the latest versions please let me know.