Showing posts with label ximat. Show all posts
Showing posts with label ximat. Show all posts

Wednesday, December 8, 2010

Trimming Reconstruction

When looking over my xi and wps matrices used in the reconstruction, Alexia noticed that some fo the numbers were all over the place. She suggested changing the range of the correlation functions I use to those which have enough data to have reasonable number. So I spent yesterday creating the following code to "trim" the matrices to whatever ranges the user wants. Here is how it works:

The wpsMat is a concatenation of all the wps(r,theta) correlation functions at the different redshift (r) bins. However, sometimes there aren't enough objects at certain redshift bins, so the values in wps for that bin are nonsensical. Likewise there might angles (theta) that are too big or small. The followincg code allows you to decide how many of the r and theta bins to skip from the start and end of the data set:

skipStartR = 2 # number of r bins to skip at start
skipEndR = 1 # number of r bins to skip at end
skipR = skipStartR + skipEndR #total r bins skiped
skipStartT = 0 # number of theta bins to skip at start
skipEndT = 0 # number of theta bings to skip at end
#Make matrix with skipping:
makeWPSmatrix4(workingDir,rbins, corrBins, wpsMatrixFile, skipStartR, skipEndR, skipStartT, skipEndT)

Similarly, we can want to skip the same r bins in the xi matrix, and also we can skip bins along the line of sight (l):

#Create a matrix to input the correlation function data
# Write Xi Matrix to file
skipStartL = 0 # number of line of sight bins to skip at start
skipEndL = 0 # number of line of sight bins to skip at end
makeXimatrix4(workingDir,rbins,nxicorr,xiMatrixFile, skipStartR, skipEndR, skipStartL, skipEndL)

This doesn't appear to be helping the reconstruction. Here is reconstruction without trimming:

Reconstruction without trimming

Construction with trimming:

The code to make these plots is here: ../logs/101208log.py

Tuesday, June 15, 2010

Deconstructing Reconstruction

Sorry for the lack of postings lately. I'm at Princeton working with Alexia this week. Hoping to make a lot of progress on the reconstruction project. Remember way back when we were having troubles with binning? Well I am finally trying to get to the bottom of it.

Using my best working run from back in February (man on man has it been that long?) Here is the reconstruction.... (code to reproduce these plots is in the following log file ../logs/100615log.py)

A few things we discovered... first. I wasn't interpolating correctly in getximat. I needed to set interpolate=1. Second, the sximat has some pretty outrageous values in it. This is mostly due to the fact that I am running the reconstruction on too small of angles/separations where I don't have enough objects to have a valid correlation function.

In places where I do have enough objects the interpolation now looks pretty good:
Yellow line is the correlation function, pink dots are the interpolation

The next thing we discovered is that when I include correlation function in the reconstruction that do not have enough objects in them such that they give sensible answers -- this happens when I try to reconstruct at low redshifts -- my ximat blows up and gives really large values which mess up the interpolation.

So, I've fixed these two problems by
1) Setting interpolation = 1 (as default)
2) Re-running the reconstruction such that it doesn't include low redshifts.