Feeds:
Posts

## Galaxy surveys in a periodic geometry

Have just had a nice week working at Mount Stromlo Observatory and am looking forward to the coming week in Melbourne (generally) and Swinburne (particularly). Yesterday and the day before I was working on a small problem that grew out of a larger project (which I’m sure I’ll return to at a later date, just not now) involving a little geometry: when numerical simulations of large-scale cosmological structure are made, they inevitably result in galaxies located within a big cube; on the other hand, when we observe the Universe with telescopes what we get is a pointy wedge with the Earth at the tip. How to go from one to the other? N.B. this post has exciting mathematics puzzles!

If you read that first paragraph on the main page, then in the time it took for the section under the fold to load you will have thought of the best first choice: extract the wedge from the cube. There’s nothing wrong with this. By sticking the tip in one corner and letting the survey fan out, one can get, oh, at least a third of the simulated points in, depending on the anglular size of the survey field. The reverse process is useful for placing an observational survey wedge inside a Cartesian data structure (an array) for computation. But I want to talk about a slightly different idea involving a trick that seems illegal (maybe it is).

By and large, the output from a simulation will not only be cubic, it will be periodic. The reason for this is that simulations are generated using FFTs to speed up computation. Now, of course the Universe isn’t periodic. But there nothing wrong with studying the relationship between galaxies that are close to one another through a side of the cube—of course, one shouldn’t be studying distances involving an entire period, but of course, no-one is proposing to study structure on scales larger than the box itself. So the idea is as follows: locate yourself in a corner of the cube and let your survey fan out; when it hits the edge of the box, just wrap around and keep going! Before we worry about all the things that are wrong with this approach, let’s look at the detail of how this should be done. The description contains a number of small questions along the way if you’re keen; they aren’t hard but they still took me a while to puzzle out without retrospective diagrams to help!

Construction of a ‘lighttriangle’ by periodic wrapping: a simulated distribution of galaxies (top-right) is projected (top-left) and tiled to form a mock survey under the assumption of periodicity (bottom).

This figure demonstrates the two-dimensional case. Because these mock surveys often go by the name ‘lightcone’ (not to be confused with light-cone), I have christened the two-dimensional case a lighttriangle. The free parameter is the opening angle of the ‘survey’ (this is a flatland astronomical survey) or equivalently the number of segments such that each point is in at most one segment and the final segment finishes at the opposing corner of the square. I find the latter a nicer number to start with, call it S. First question: what is the relationship between the two? Answer: The opening angle is then $\theta_c = \arctan\left(\frac{1}{S}\right)$ (show this; of course one should use atan2 in an implementation); it makes sense retrospectively that this should be independent of the length of the square, L.

Next question: how to assign each point $(x,y)$ to a segment? (Work this out before proceeding.) My observation, as shown by the different colours in the top-left panel of the figure, is that an object will be in segment one if $y < x\tan\theta_c$, in segment two if $y < x\tan\theta_c + L\tan\theta_c$ and in segment n if $y < x\tan\theta_c + (n-1)L\tan\theta_c$. The segment number of an object is thus $s = \lceil (y/\tan\theta_c-x)/L \rceil$.

Final question: how to construct the periodic tiling once the segment number is known? (Again, work this out.) As the colouring of the figure makes clear (this wasn’t obvious to me at first!), the shift occurs only in the x coordinate and is $x^\prime = x + Ls$, $y^\prime = y$. The slightly trickier part is implementing this a different number of times for different segments. I have used a for loop, so that $x^\prime = x + Li, i = s,\ldots,S$.

Okay, here is the Matlab code, with a final big question and a bit more cosmology discussion at the end.

close all; clc; format compact;
% Note no 'clear all' when reading largeish data sets.

segs = 5; % Number of segments
L = 250; % Size of box;
thetac = atan2(1,segs); % Lightcone extraction angle

if ~exist('galdata')
end

x = galdata(:,1);
y = galdata(:,2);
z = galdata(:,3);

%% Lightcone extraction
theta0 = atan2(y,x);
s = ceil( (y/tan(thetac)-x)/L ); % Segment number

for i = 1:segs
% Plot single square
subplot(2,2,1);
cut = find(s == i-1);
plot(x(cut),y(cut),'Color',[1-i/reps 0 i/reps],...
'LineStyle','none','Marker','.','MarkerSize',0.1); hold on; axis([0 L 0 L]);

% Plot tiled squares
subplot(2,2,3:4);
for j = i:segs
plot(x(cut)+(j-1)*L,y(cut),'Color',[1-i/reps 0 i/reps],...
'LineStyle','none','Marker','.','MarkerSize',0.1); hold on;
axis([0 L*segs 0 L]);
end
end

subplot(2,2,2);
plot3(x,y,z,'b.','MarkerSize',0.1); axis ([0 L 0 L 0 L]);

Right, so that’s all there is to say about the two-dimensional case. The take-home question, if you aren’t bored by it, is to solve the three-dimensional case. I know that by reading my solution to the special case above, you are no longer a blank slate for the purpose of this problem, but I would be interested to see any solutions posted in the comments that take a different approach. Of course there is a little more subtlety in the three-dimensional case, but tragically the resulting plots aren’t anywhere near as pretty. I will post the outline of my approach and picture in the next couple of days, and the full solution a little after that.

The final thing that needs to be discussed is whether this should be of interest outside its mathematical context. Of course, the Universe is not periodic, at least not on distances we’ve observed to date. My purpose in constructing these tilings is to generate a long base-line mock survey to test out some other ideas relating to redshifts. There no new information being introduced in the tiling (apart from the single free parameter, which would represent some choice about the survey in question), so there won’t be any new physics to be discovered, but if one, say, subsequently perturbs each galaxy (perturbing reproduced galaxies differently to their progenitors, I mean), in principle statistical ideas can be tested with a longer sample obeying the same (although now a little noisier) clustering properties as the original sample. Mostly, this just seems to be a visual representation thing. I know that something like this may have been tried before by some folks in Garching with the Millennium Run; as usual I’ve gone ahead with my own idea rather than reading what others have done, but I’m pretty sure they didn’t write up what they did anyway. If someone has more information on this, perhaps they’d like to drop me a line/pop something in the comments.