- Mail actions: [ respond to this message ] [ mail a new topic ]
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]

From: Antonio Bibiano <antbbn_at_gmail.com>

Date: Thu, 27 Jun 2013 20:28:14 +1000

Thank you for your reply!

So to understand how to correctly tabulate the initial power spectrum i

looked at the code and understood that the table should be in the format:

log10(k [your units]) log10(4 Pi k^3 P(k) [no units])

Am I right? this might be useful to someone since the usual CAMB and CLASS

output is:

k [h/Mpc] P(k) [Mpc/h)^3]

I also looked at the inputspec_ics.txt file that N-geniIC creates and

looked at the code that generates it to understand what is it's format

(only the first two columns),

i understood that the format this time is

k [internal units] 4 Pi k^3 k^(PrimordialIndex-1) P(k) [internal

units]

am i right?

So looking at this file when using one of the fitting functions it contains

the power spectrum at the starting redshift and the second column is

generated using those two lines of code in main.c:

575: po = PowerSpec(k);

576: dl = 4.0 * PI * k * k * k * po;

So i argue that PowerSpec(k) should give the power spectrum at the starting

redshift, not redshift 0, right?

If this is the case then i cannot understand the comment in this snippet of

code (main.c):

214: p_of_k = PowerSpec(kmag);

216: p_of_k *= -log(ampl);

218: delta = fac * sqrt(p_of_k) / Dplus; /* scale back to

starting redshift */

which contains the only occurrence of Dplus (the variable holding the growt

factor which is 1.0 if I use a tabulated power spectrum properly

normalized for the starting redshift and ReNormalizeInputSpectrum = 0).

So is the comment somehow misleading or that's the right behavior? Because

it seems like this line espects a powerspectrum a z=0 and scales back to

the starting redshift (z=Redshift from the input file).

I hope i was clear about my doubt.

Thanks for your help!

Antonio Bibiano

2013/6/23 Volker Springel <volker_at_mpa-garching.mpg.de>

*>
*

*>
*

*> On Jun 9, 2013, at 9:53 AM, Volker Springel wrote:
*

*>
*

*> >
*

*> >
*

*> > On Jun 6, 2013, at 12:01 PM, Antonio Bibiano wrote:
*

*> >
*

*> >> Hello Everyone,
*

*> >> I was trying to generate some initial conditions for a cosmological
*

*> simulation using
*

*> >> N-genIC and i wanted to use a tabulated power spectrum.
*

*> >> This is my first experience with simulations so I apologize if my
*

*> questions are obvious or even stupid!
*

*> >>
*

*> >> My question is, should the redshift of the tabulated power spectrum be
*

*> the same as the starting
*

*> >> Redshift in the N-genIC parameter file?
*

*> >
*

*> > Dear Antonio,
*

*> >
*

*> > No, this is not really necessary, provided you use
*

*> ReNormalizeInputSpectrum = 1. The IC code will then only use the shape of
*

*> the (linear) input spectrum and scale it up or down as needed (by the same
*

*> factor for all k) to reproduce the specified normalization at z=0 (given by
*

*> sigma8).
*

*> >
*

*> >>
*

*> >> I got my power spectra from CAMB and CLASS, as far as i understand
*

*> those powerspectra a normalized to the sigma_8 that the programs give in
*

*> their output, so ReNormalizeInputSpectrum = 0 should be the right setting,
*

*> is this right?
*

*> >
*

*> > I think so, but this question is really one about CAMB and/or CLASS, not
*

*> about N-GenIC.
*

*> >
*

*> >
*

*> >> And so the Sigma8 parameter should be initialized as the one given by
*

*> those ouputs?
*

*> >>
*

*> >
*

*> > If you use ReNormalizeInputSpectrum = 0, the N-GenIC code will ignore
*

*> the value specified for sigma8 in its parameterfile and assume that the
*

*> input spectrum is correctly normalized for z=0. It will then scale it back
*

*> to the starting redshift with the linear growth factor for the specified
*

*> cosmology.
*

*> >
*

*>
*

*> Sorry, the last statement I made here in my previous mail is not quite
*

*> correct (had remembered this differently... thanks to Hector Campos for
*

*> pointing this out).
*

*>
*

*> When you use ReNormalizeInputSpectrum = 0 together with a tabulated power
*

*> spectrum, the code will assume that the input power spectrum is already
*

*> properly normalized for the starting redshift, i.e. it is not scaled at all
*

*> in this case.
*

*>
*

*> Volker
*

*>
*

*>
*

*> > Regards,
*

*> > Volker
*

*> >
*

*> >>
*

*> >> Antonio Bibiano.
*

*> >>
*

*> >>
*

*> >> -----------------------------------------------------------
*

*> >>
*

*> >> If you wish to unsubscribe from this mailing, send mail to
*

*> >> minimalist_at_MPA-Garching.MPG.de with a subject of: unsubscribe
*

*> gadget-list
*

*> >> A web-archive of this mailing list is available here:
*

*> >> http://www.mpa-garching.mpg.de/gadget/gadget-list
*

*> >
*

*> >
*

*> >
*

*> >
*

*> > -----------------------------------------------------------
*

*> >
*

*> > If you wish to unsubscribe from this mailing, send mail to
*

*> > minimalist_at_MPA-Garching.MPG.de with a subject of: unsubscribe
*

*> gadget-list
*

*> > A web-archive of this mailing list is available here:
*

*> > http://www.mpa-garching.mpg.de/gadget/gadget-list
*

*>
*

*>
*

*>
*

*>
*

*> -----------------------------------------------------------
*

*>
*

*> If you wish to unsubscribe from this mailing, send mail to
*

*> minimalist_at_MPA-Garching.MPG.de with a subject of: unsubscribe gadget-list
*

*> A web-archive of this mailing list is available here:
*

*> http://www.mpa-garching.mpg.de/gadget/gadget-list
*

*>
*

Received on 2013-06-27 12:27:51

Date: Thu, 27 Jun 2013 20:28:14 +1000

Thank you for your reply!

So to understand how to correctly tabulate the initial power spectrum i

looked at the code and understood that the table should be in the format:

log10(k [your units]) log10(4 Pi k^3 P(k) [no units])

Am I right? this might be useful to someone since the usual CAMB and CLASS

output is:

k [h/Mpc] P(k) [Mpc/h)^3]

I also looked at the inputspec_ics.txt file that N-geniIC creates and

looked at the code that generates it to understand what is it's format

(only the first two columns),

i understood that the format this time is

k [internal units] 4 Pi k^3 k^(PrimordialIndex-1) P(k) [internal

units]

am i right?

So looking at this file when using one of the fitting functions it contains

the power spectrum at the starting redshift and the second column is

generated using those two lines of code in main.c:

575: po = PowerSpec(k);

576: dl = 4.0 * PI * k * k * k * po;

So i argue that PowerSpec(k) should give the power spectrum at the starting

redshift, not redshift 0, right?

If this is the case then i cannot understand the comment in this snippet of

code (main.c):

214: p_of_k = PowerSpec(kmag);

216: p_of_k *= -log(ampl);

218: delta = fac * sqrt(p_of_k) / Dplus; /* scale back to

starting redshift */

which contains the only occurrence of Dplus (the variable holding the growt

factor which is 1.0 if I use a tabulated power spectrum properly

normalized for the starting redshift and ReNormalizeInputSpectrum = 0).

So is the comment somehow misleading or that's the right behavior? Because

it seems like this line espects a powerspectrum a z=0 and scales back to

the starting redshift (z=Redshift from the input file).

I hope i was clear about my doubt.

Thanks for your help!

Antonio Bibiano

2013/6/23 Volker Springel <volker_at_mpa-garching.mpg.de>

Received on 2013-06-27 12:27:51

*
This archive was generated by hypermail 2.3.0
: 2022-09-01 14:03:42 CEST
*