Chris-Pedersen / LaCE_manager

Cosmological emulator for the 1D flux power spectrum of the Lyman-alpha forest
3 stars 1 forks source link

added option to specify k-range to use in linP fits #35

Open andreufont opened 3 years ago

andreufont commented 3 years ago

Not ready yet, but opening this PR for discussion.

I added code to chose the k-range used in the fitting. Current is 0.5 < k / k_p < 2.0, but if we really want to use localized derivatives it would be better to use something like 0.95 < k / k_p < 1.05. Less than that is dangerous, I guess, since numpy might not have enough points to fit the polynomial.

The alternative could have been to provide the fixed alpha you want to use in the fit (when compressing at fixed alpha). Then the code would remove that curvature from the linear power and then fit a simple power law. I didn't implement this because the other was easier to do and to explain.