[yt-users] 1D matter power spectrum

Stephen Skory stephenskory at yahoo.com
Wed Mar 9 07:40:08 PST 2011


Geoffrey,

> One is that I'm getting 0 correlation on all length scales... which is
> bad.  I've set the min density threshold to 0 and played around with other
> parameters but still get 0 for the \xi column in the output
> dens_tpcorr_correlation.txt.  Can you check this on a small dataset to see
> if that's what you get, or I am doing something terribly wrong.  (do I
> have to re-Cython or missed some other things?)


This is what I get for a density threshold of zero, and I think that it isn't a problem. When you set your density limit to zero, every pair of points in the volume will satisfy the pair matching condition, and you're really not measuring anything interesting. Try setting your density threshold to something interesting, like the mean density of the volume, and see if you get all zeros again. I tried this and I got something like this:

# length    \xi         
1.35316e-02 4.42081e+00 
6.21785e-02 3.50204e+00 
1.10825e-01 2.76448e+00 
1.59472e-01 2.08298e+00 
2.08119e-01 1.51931e+00 
2.56766e-01 1.03966e+00 
3.05413e-01 6.42185e-01 
3.54059e-01 3.37379e-01 
4.02706e-01 1.11586e-01 
4.51353e-01 -5.16496e-02
5.00000e-01 -1.63145e-01

which tells me that things are super-gaussian at small scales, and sub-gaussian at the largest scales. Which is right for a cosmology simulation.

> Another thing is when I was trying to find out how to insert the two new
> angles, I looked in
> 
> yt/analysis_modules/two_point_functions/two_point_functions.py
> on line 478, 481 when you generate the phi and theta, you might want to
> use the equation 6,7,8 on this page
> http://mathworld.wolfram.com/SpherePointPicking.html
> to avoid non-uniform distribution over the unit sphere surface.  (but of
> course being mathematicians their theta and phi is flipped from ours I
> think, their phi goes from 0 to pi and theta goes from 0 to 2pi)


You're absolutely right, although Eqns. 1 & 2 are better matched to how I am doing things. So I have just implemented that, and pushed it to BitBucket. Thanks for the pointer, I'm slightly embarrassed that I was so lazy before and did it wrong!

 
Stephen Skory
stephenskory at yahoo.com
http://stephenskory.com/
510.621.3687 (google voice)




More information about the yt-users mailing list