Showing posts with label co-adds. Show all posts
Showing posts with label co-adds. Show all posts

Friday, April 23, 2010

Running Likelihood Tests

I'm going to change one thing at a time here to figure out where the new likelihood goes awry. Unfortunately I didn't keep the best notes about how I changed the QSO catalogs before, and so I am finding it difficult to reproduce what I did. So I am going to be much better about documenting all the step here.

1. First I make a catalog of all the BOSS and otherwise known QSOs which aren't already in the inputs which we also have coadded fluxes by spherematching them with . The code to do this is in the following log file ../logs/100423log_1.pro. This makes a file: ~/boss/coaddedBOSSQSOs.fits which has the coadded fluxes (from varcat files) and redshifts of these QSOs. These fluxes are not de-reddened.

Here is a plot of these quasars


2. Combine this BOSS catalog with the SDSS DR5 "bright" quasars that are included in the old version of the Monte Carlo. This is done by running Joe Hennawi's qso_photosamp.pro program (to get the SDSS DR5 QSOs), reading in coaddedBOSSQSOs file, de-reddening them both, and then merging them into one file, which is then saved as ~/boss/brightQSOMCInput.fits. The code to do this is in the following log file ../logs/100423log_2.pro.

SDSS DR5 Quasars


brightQSOMCInput.fits QSOs


3. Change qso_fakephoto.pro to read in the ~/boss/brightQSOMCInput.fits file insteady of just running qso_photosamp.pro. Save this modified program as ../likelihood/qsocatalog/qso_fakephoto_jess.pro

4. Change hiz_kde_numerator.pro to call qso_fakephoto_jess.pro, instead of qso_fakephoto.pro and save as ../likelihood/qsocatalog/hiz_kde_numerator_jess.pro

5. Follow instructions from this post for how to change/create the luminosity function.

6. Enter the command :
.run hiz_kde_numerator_jess.pro into IDL to generate QSO Catalog.

7. Change likelihood_compute.pro so that it points to this QSO Catalog that you just generated as the input QSO Catalog:
; Read in the QSO
filefile2 = '/home/jessica/repository/ccpzcalib/Jessica/likelihood/qsocatalog/newCatalog.fits'

QSO Catalog (including the BOSS quasars)

Code to generate plots is in the log file: ../logs/100423_4log.pro

8. Make sure that the redshift ranges in likelihood_compute.pro match those in the file hiz_qso_dndz.pro.

Wednesday, March 17, 2010

Changing QSO Catalog Inputs

I'm trying to figure out how to modify the inputs (currently SDSS DR5 quasars with good photometry) into Joe's Monte Carlo. Here is what I have figured out so far (all the below files are on riemann):

hiz_kde_numerator.pro ;main program to generate the QSO Catalog
(calls) →
qso_fakephoto.pro ;generates simulated redshift and i-magnitude based on luminosity function and DR5 inputs
(calls) →
qso_photosamp.pro ;This generates the training set photometry
(calls) →
sdss_read_data.pro ;This reads in SDSS data it currently has the following 'DR5' call
qsos = sdss_read_data('DR5', Z_MIN = Z_MIN, Z_MAX = Z_MAX)

Here is a color-color redshift temperature plot of these DR5 QSOs:


I'm going to try to add in the BOSS QSOs with co-added photometry, especially in the redshift range z > 2.0 where we seem to be missing QSOs:


I found that there are 1,973 BOSS quasars that have a redshift above 2.0 for which we also have coadded photometry. Here they are plotted:


While it is a little more filled in in the u-g = 0.8 space, comparing it to all the BOSS quasars (regardless of how good their photometry is) below:

Tuesday, March 16, 2010

Comparing Quasars

Here are the color-color diagrams with redshift temperature plots for the current QSO Catalog (in the BOSS redshift range) and the BOSS 3PC Quasars (same temperature-z map as before). I think this shows pretty well that something is wrong with the QSO Catalog's color distribution. These both have the same number of quasars, in the same redshift range:


Their redshift distributions are not that different so this is really a matter of the input QSOs not properly representing the spread of the possible colors, I believe:

White is BOSS QSOs, Green is the QSO Catalog.
The histograms are scaled as a percentage in each bin.

I want to add in BOSS QSOs to Joe's Monte Carlo. We can do this by just adding in the "chunk 1" objects where we have co-added photometry from Stripe-82, or we can apply the same cuts in terms of brightness as we did to the DR5 catalog.

Wednesday, March 3, 2010

Single Epoch vs Coadded

Joe Hennawi asked me to give him targeting files that were single epoch versus coadded for Stripe 82. Erin Sheldon had created some files for me which had different seeings:

This is the standard primary on stripe 82:
http://data.sdss3.org/sas/bosswork/groups/boss/target/2009-12-05-chunk1-retrain/bosstarget-qso-2009-12-05-chunk1-retrain-collate-fullcache.fits

These are alternative runs on stripe 82:
"good seeing"
http://data.sdss3.org/sas/bosswork/groups/boss/target/2009-11-30-stripe82pairs/bosstarget-qso-2009-11-30-stripe82pairs-collate-good-fullcache.fits

"median seeing"
http://data.sdss3.org/sas/bosswork/groups/boss/target/2009-11-30-stripe82pairs/bosstarget-qso-2009-11-30-stripe82pairs-collate-median-fullcache.fits

"bad seeing"
http://data.sdss3.org/sas/bosswork/groups/boss/target/2009-11-30-stripe82pairs/bosstarget-qso-2009-11-30-stripe82pairs-collate-bad-fullcache.fits

And it matched them to the variable catalogs (co-adds) with the following code:

erinfile2 = '/home/jessica/boss/boss-qso-stripe82median.fits'
confTT = mrdfits(erinfile2, 2)

varcat0 = '/home/schlegel/varcat4/varcat-ra0-30.fits.gz'
varcat = mrdfits(varcat0, 1)
spherematch, confTT.ra, confTT.dec, varcat.ra, varcat.dec, 2./3600, i1, i2, d12
truthmatch0 = confTT[i1]
varmatch0 = varcat[i2]

varcat1 = '/home/schlegel/varcat4/varcat-ra30-60.fits.gz'
varcat = mrdfits(varcat1, 1)
spherematch, confTT.ra, confTT.dec, varcat.ra, varcat.dec, 2./3600, i1, i2, d12
truthmatch1 = confTT[i1]
varmatch1 = varcat[i2]

varcat2 = '/home/schlegel/varcat4/varcat-ra60-90.fits.gz'
varcat = mrdfits(varcat2, 1)
spherematch, confTT.ra, confTT.dec, varcat.ra, varcat.dec, 2./3600, i1, i2, d12
truthmatch2 = confTT[i1]
varmatch2 = varcat[i2]

varcat3 = '/home/schlegel/varcat4/varcat-ra90-120.fits.gz'
varcat = mrdfits(varcat3, 1)
spherematch, confTT.ra, confTT.dec, varcat.ra, varcat.dec, 2./3600, i1, i2, d12
truthmatch3 = confTT[i1]
varmatch3 = varcat[i2]

varcat4 = '/home/schlegel/varcat4/varcat-ra300-330.fits.gz'
varcat = mrdfits(varcat4, 1)
spherematch, confTT.ra, confTT.dec, varcat.ra, varcat.dec, 2./3600, i1, i2, d12
truthmatch4 = confTT[i1]
varmatch4 = varcat[i2]

varcat5 = '/home/schlegel/varcat4/varcat-ra330-360.fits.gz'
varcat = mrdfits(varcat5, 1)
spherematch, confTT.ra, confTT.dec, varcat.ra, varcat.dec, 2./3600, i1, i2, d12
truthmatch5 = confTT[i1]
varmatch5 = varcat[i2]

truthmatch = [truthmatch0, truthmatch1, truthmatch4, truthmatch5]
varmatch = [varmatch0, varmatch1, varmatch4, varmatch5]

outfile = "./singleEpochMatch.fits"
splog, 'Writing file ', outfile
mwrfits, truthmatch, outfile, /create

outfile = "./coaddedMatch.fits"
splog, 'Writing file ', outfile
mwrfits, varmatch, outfile, /create

This creates two matched catalogs, each with 735,498 objects in Stripe-82. I'm sending these files to Jo and Joe to help with the "extreme deconvolution." (Man I love that name)

Tuesday, February 2, 2010

Stacking Quasars

I heard an interesting talk today by J. Xavier Prochaska, from Santa Cruz. The abstract is below. The basic idea was that we can co-add quasar spectra to get a cleaner signal of opacity (due to lyman absorption) and thus the mean free path as a function of redshift. We should totally do this with BOSS.

~~~
"Direct Measurement of the IGM Opacity to H I Ionizing Photons"
Paper: http://arxiv.org/abs/0910.0009
We present a new method to directly measure the opacity from HI Lyman limit (LL) absorption k_LL along quasar sightlines by the intergalactic medium (IGM). The approach analyzes the average (``stacked'') spectrum of an ensemble of quasars at a common redshift to infer the mean free path (MFP) to ionizing radiation. We apply this technique to 1800 quasars at z=3.50-4.34 drawn from the Sloan Digital Sky Survey (SDSS), giving the most precise measurements on k_LL at any redshift. From z=3.6 to 4.3, the opacity increases steadily as expected and is well parameterized by MFP = (48.4 +/- 2.1) - (38.0 +/- 5.3)*(z-3.6) h^-1 Mpc (proper distance). The relatively high MFP values indicate that the incidence of systems which dominate k_LL evolves less strongly at z>3 than that of the Lya forest. We infer a mean free path three times higher than some previous estimates, a result which has important implications for the photo-ionization rate derived from the emissivity of star forming galaxies and quasars. Finally, our analysis reveals a previously unreported, systematic bias in the SDSS quasar sample related to the survey's color targeting criteria. This bias potentially affects all z~3 IGM studies using the SDSS database.

Thursday, September 24, 2009

Back to the Likelihoods

It's been a while since I have worked on the likelihood QSO selection method. With the next deadline for target selection is coming up, it's time to go "Back to the Likelihoods." Note to self: It more time efficient to keep working on something continuously than to not work on it for weeks and then waste a day trying to remember what I was doing.

Where we left off...
Below is a color-color (ug - gr) plot of the final likelihood selection objects for the commissioning data.



The white data points are a random sampling of 20,000 possible objects to target. The red data points are objects who's likelihood ratio is greater than 0.1, where likelihood ratio is defined as:



where L_QSO and L_everything, as described in "A Likely Result" are defined as:



The green data points are objects are objects who's likelihood ratio is greater than 0.1 and L_everything is greater than 10^-6. This is eliminate classification of "fringe" objects that are not close to any objects (and therefore have a small everything likelihood.

The likelihood was then run on the co-added Stripe 82 data and all of the above green objects were submitted as targets for the commissioning data.

What we need to work out...
  • Why are the likelihoods so small/large? The likelihoods should be a probability, but we have likelihood's spanning from 0-11.
  • Why is our completeness and efficiency on the MMT data so poor?
  • How does the likeliness compare to QSOs based on variability?
  • How well does this method work on single epoch Stripe 82 data versus the co-added images?