LSSTDESC / CCL

DESC Core Cosmology Library: cosmology routines with validated numerical accuracy
BSD 3-Clause "New" or "Revised" License
133 stars 64 forks source link

Simplify IAs #639

Closed damonge closed 4 years ago

damonge commented 5 years ago

Right now, when creating a tracer with intrinsic alignments, we need to pass two arrays: the alignment amplitude and the fraction of aligned galaxies. In the L-NLA model these two quantities are completely degenerate, and in fact people usually fit for a single amplitude that is the product of these two quantities.

I'd like to simplify the current interface so IAs (with the L-NLA model) only take a single array of amplitudes as input. If people agree, then I'll do this in the ongoing PR #630 .

Pinging @jablazek @elisachisari

jablazek commented 5 years ago

@damonge : I agree with this simplification. If it's possible, I would suggest that f_aligned (or whatever you want to call it) is set to 1 by default, but can be changed if an array is passed (in which case the two are properly multiplied together). The more general IA modeling will require at least one additional array as well.

damonge commented 5 years ago

@jablazek ok, great. What would the additional array be? (mostly out of curiosity)

elisachisari commented 5 years ago

I agree with Jonathan's proposal. I think he just means that f_red should be an optional parameter.

damonge commented 5 years ago

ok, but you still want it there. Fine

elisachisari commented 5 years ago

The other option is to just code the NLA and then include f_ref (if we wanted to) at the level of firecrown. Would that be possible in the current firecrown set-up?

damonge commented 5 years ago

I'd prefer to do this, yes. Move as much of this stuff into firecrown to avoid overcomplicating CCL. Is that OK?

elisachisari commented 5 years ago

To me, yes. We can have LA, NLA, generalized P(k,z) in CCL, and then combine them in different ways within firecrown. Imagine that we have observational constraints for two populations of galaxies: red and blue, and we want to make use of these priors. Red and blue will have different redshift distributions, so the overall alignment contamination would be predicted from red/blue and their cross-correlations. Can we do that in firecrown instead of CCL?

damonge commented 5 years ago

If you're asking me, yes, that's what I'd rather to do (and it's my reason for generalizing things in CCL)

elisachisari commented 5 years ago

Sounds ok to me, as long as we can do it in firecrown. Can we have confirmation of this? @elikrause @beckermr

beckermr commented 5 years ago

Firecrown just passes data in to ccl. It is easy enough to set things to 1 there. I’d keep ccl as is.

jablazek commented 5 years ago

I think that's fine, especially if the fully nonlinear IA model will be coming from outside CCL (i.e. we don't put FASTPT into CCL), then the bookkeeping can be done outside CCL as well.

elisachisari commented 4 years ago

As part of this PR, I want to renormalize the IA bias for v2 such that it matches A_IA=1 (see issue #280). The way that I should do this is IA_kernel = - C1 rhocrit Omega_m / D(z) user_input_bias old_IA_kernel where old_IA_kernel = dn/dz normalized to integrate to 1, C1=5e-14, rhocrit=ccl.RHO_CRITICAL and D(z) is the growth function. (Page 8 of this paper: https://arxiv.org/pdf/1008.3491.pdf)

Looking for confirmation from @sjoudaki who produced the IA benchmarks that are used in our tests: https://github.com/LSSTDESC/CCL/blob/master/examples/Benchmark_Comparisons.ipynb

sjoudaki commented 4 years ago

Hi Elisa, yes, this is consistent with my approach. Confirmed with you that your D(z) is the normalized growth function, which is great.

beckermr commented 4 years ago

I think @elisachisari had another to do on this issue? (Got closed by github when we just merged another PR.)

damonge commented 4 years ago

I think this is all we wanted to implement, but I'll let @elisachisari confirm, in case I'm missing something.