bccp / nbodykit

Analysis kit for large-scale structure datasets, the massively parallel way
http://nbodykit.rtfd.io
GNU General Public License v3.0
111 stars 60 forks source link

mocks for a non-gaussian field. #660

Open Jayashree-Behera opened 2 years ago

Jayashree-Behera commented 2 years ago

Hi, I am working on a project based on non-gaussian fields. So while generating mocks using nbodykit (let's say lognormal mocks), one requires to give the matter power spectrum(as a functional argument ) and bias (as a number) as input (among other parameters). This is fine as long as we are working are in a gaussian field but when it comes to non-gaussian field, bias is no longer an independent number but a function of k, hence a functional argument. I was wondering if this feature could be added where one could generate mocks in non-gaussian fields. I have some working code that I could share if you are interested. :) Thanks, Shree

rainwoodman commented 2 years ago

Thanks for reaching out. Yes code example will be very helpful!

Did you mean making the b parameter of LogNormalCatalog scale dependent? The b parameter in LogNormalCatalog is applied on configuration space -- how do you get around that?

Or did you mean introducing a scale dependent bias to the linear field (gaussian field), before Log Normal transformation? In that case, the scale dependent biased linear field just need a different powerspectrum or transfer function -- the interaction with the b parameter of LogNormalCatalog will be even more intriguing in this set up.

Jayashree-Behera commented 2 years ago

Hi... Thanks for replying. My code basically lies in the lines of this "..Or did you mean introducing a scale-dependent bias to the linear field (gaussian field), before Log-Normal transformation? In that case, the scale-dependent biased linear field just needs a different powerspectrum or transfer function --..."

I wrote a script for the galaxy power spectrum in a non-gaussian field (which incorporates the scale-dependent bias). Then I generated the mocks by giving the galaxy power spectrum as the input parameter setting bias =1. Please let me know if this wasn't clear.

Have a good day, Shree

rainwoodman commented 2 years ago

Thanks. Aftering thinking about this a bit more, I also realized the displacement field (for velocity) of LogNormal is unbiased(or I think it is). If we trivially apply the scale dependent bias to the initial gaussian field, the velocity would be contaminated. We'll need an additional scale dependent bias step in just for computing the number density of the tracers.

Can I take a look at your implementation?

On Mon, Dec 20, 2021 at 12:25 PM Jayashree-Behera @.***> wrote:

Hi.. Thanks for replying. My code basically lies in the lines of this "..Or did you mean introducing a scale dependent bias to the linear field (gaussian field), before Log Normal transformation? In that case, the scale dependent biased linear field just need a different powerspectrum or transfer function --..."

I wrote a script for the galaxy power spectrum in a non-gaussian field (which incorporates the scale dependent bias). Then I generated the mocks by giving the galaxy power spectrum as the input parameter setting bias =1. Let me know if this wasn't clear.

Have agood day, Shree

— Reply to this email directly, view it on GitHub https://github.com/bccp/nbodykit/issues/660#issuecomment-998244825, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABBWTHQCVQVFXRVJU7PVC3UR6GKXANCNFSM5J64J56A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

Jayashree-Behera commented 2 years ago

Sure. Should I make a pull request and you can check it out there?

Jayashree-Behera commented 2 years ago

Hi.. Did you get a chance to look at the pull request? Does it make sense?

rainwoodman commented 2 years ago

Oops. I missed your PR. I'll take a look this week and get back to you.

On Wed, Jan 12, 2022 at 1:09 AM Jayashree-Behera @.***> wrote:

Hi.. Did you get a chance to look at the pull request? Does it make sense?

— Reply to this email directly, view it on GitHub https://github.com/bccp/nbodykit/issues/660#issuecomment-1010814872, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABBWTCKRUROBI2ZSJ75KRDUVVALXANCNFSM5J64J56A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

Jayashree-Behera commented 2 years ago

Hi..Did you get a chance to review the updated version in PR? I have made some modifications and added the unit test file.