I was at the cosmology seminar today and I was complaining to Nic Ross about my correlation function woos and Marc Davis happened to be in earshot and told me that I was thinking about this all wrong. Basically what I should do is take my galaxies with coordinates of Ra and Dec and calculate their x,y,z coordinates (projecting them onto a unit sphere). Then I can calculate the 3D correlation function on these objects (which I already have code to do), where I can translate between their physical separation in x, y, z coordinates to their angular separation by the following:

Ra

_{1}, Dec

_{1}→ x

_{1}, y

_{1}, z

_{1}

Ra

_{2}, Dec

_{2}→ x

_{2}, y

_{2}, z

_{2}

Separation of objects (s) in Cartesian coordinates:

s = [(x_{1}- x

_{2})

^{2}+ (y

_{1}- y

_{2})

^{2}+ (z

_{1}- z

_{2})

^{2}]

^{½}

Geometry relates the separation angle (γ) to Cartesian separation (s):

s = 2sin(γ/2)or using the dot product of the two vectors:

x_{1}x

_{2}+ y

_{1}y

_{2}+ z

_{1}z

_{2}= cos( γ)

Therefore, the only change I need to make is after I grid objects, and select which objects are 'close by' using above conversion from s to γ, is to convert the 3D separation of the objects to the angular separation. This shouldn't be very difficult to do using the 3D code I already have.

Thank you Marc Davis for making my life a lot better today!

Useful links for writing equations in HTML (used above):

http://www.w3schools.com/tags/ref_entities.asp

http://www.tizag.com/htmlT/htmlsuperscript.php

http://htmlhelp.com/reference/html40/entities/symbols.html

Thank you Marc Davis for making my life a lot better today!

Useful links for writing equations in HTML (used above):

http://www.w3schools.com/tags/ref_entities.asp

http://www.tizag.com/htmlT/htmlsuperscript.php

http://htmlhelp.com/reference/html40/entities/symbols.html

## No comments:

## Post a Comment