Wednesday, July 7, 2010

 Today:
Yesterday I screwd something up with the completeness calculation when I went to apply Dave's suggestion. For some reason the positions of the artificial stars weren't matching properly and so I was getting screwy completeness numbers. I ended up remaking the masterlist and that fixed the problem. I think I had inadvertently changed the addstar files and so they weren't matching properly with the masterlist.

In lieu of a better fix, I manually changed the addstar input magnitudes in the g-band by 0.35. This is the average value of the offset in the g-band brighter than r=24.5. Unfortunately when I was doing the post-allframe analysis I screwed up one of the allframe files so I have to re-run it. (In case you ever wondered why I keep the same files in so many different places, that'd be why; in one iteration of daomatch, you can corrupt an allframe file and have to re-run everything. C'est la vie. One allframe finishes again, the rest should be quick and the offset should be gone.

I was thinking about the nature of fixing the problem this way and it made me concerned about the way I was planning to calculate the photometric uncertainties. At first I thought that I would need to think of a different approach because in tweaking the offsets, I could easily just tweak them so much that the photometric uncertainties would turn out to be artificially low. However, the output magnitudes which I use to calculate the offsets must follow from the arbitrarily chosen magnitudes I input. And so the tweaking wouldn't be a problem as long as it's done pre-daophot/allstar/allframe. This is something I've been working on justifying to myself and I think I finally have.


While allframe runs, I've been working on Dave's approach to a chi and sharp cut. He suggested that we base our cuts on the envelopes defined by the artificial stars. These are very well behaved so it makes total sense. I empirically determined the envelopes and then interpolated functions to define the upper and lower limits on chi and sharp. My functions look good, but I'm trying to use a where statement to define the areas of chi and sharp space to allow. When I plot the results, my stars aren't within those bounds, so there's still a bug in the code. I think I need to take a break from it and come back later tonight. It'll be a good chance to take solace in the a/c in the lab instead of my sweltering apartment.

Tomorrow (not in this order):
1. With my new masterlist defined by the chi and sharp functions,
  • calculate the completeness and see how awesome it looks
  • run the ML code to see if the results are better behaved; if they're not, I'll need to make a choice about a brighter completeness limit to use for the ML calculation.
2. Edit the code for the artificial star tests so that I can run multiple tests. The positions of the stars need to be offset by a small amount each time. I also need to iteratively change the seed for the random selection of my stars to change things up a bit. Then start allframing like crazy!

Friday, July 2, 2010

I haven't posted all week. Mostly because there hasn't seemed to be anything new to post. But finally--an update!

Distance
I've spent my week doing a few things. First, the distance code is done. It took me longer than expected to finish the bootstrap which will be used to calculate the uncertainty in the distance. It ended up being tricky to automate everything to give me exactly what I want with little effort. Hopefully it will be a pleasure to run later when I calculate the best fit distance.

ML
Second, I've been fighting with the ML code for much of this week. At first, I wasn't getting any sort of sane response from the code, it was just outputting my input values 1000 times. I found the bug there--a discrepancy between the field area calculation in LIKE_exp_kpno.pro and that in struct_ML_grid_kpno.pro. The most updated versions of these can now be found in /home/gail/comparedata. The other thing to keep in mind in the future is the shape of the input field. I settled on using a circular field of a certain radius around Wil1. This is what I used for my thesis and I wanted to be able to directly compare. As such, the code is set up to calculate the area of the field assuming it's circular. Should I instead use a rectangular field (e.g. by taking out the radius cut in preparelist.pro), I'll need to change the way that I'm calculating field area in struct_ML_grid_kpno.pro.

I was interested in the ML results for three data sets: the 2006 data, the 2010 data with strict chi/sharp cut, and the 2010 data with the loose (2006) chi/sharp cut. When I ran the ML code on the 2010 data using the looser chi/sharp cut, I found that there were some anomalies in the results. There was a secondary peak at e = 0 and also at PA ~ 30 degrees. There was also a double peak in the half-light radius distribution. The primary peaks lined up with the SDSS data, but these double peaks were troubling. I spent some time seeing if the parameters I was using could be having this effect. I experimented with several things that I had tweaked before: the closeness of the color cut and the field size. For all of the runs I left the faint magnitude limit at 24.25--the limit used in my thesis and also probably what our completeness limit will end up being. Whatever I did, I couldn't get rid of the weird double peaks and so I concluded that the 2006 data and 2010 data with loose chi/sharp cuts just weren't as good as the 2010 data with strict chi/sharp cut. I talked over this result with Beth and she agreed, so I'm going to forge ahead with the 2010 data set after all.

Completeness
First up was reminding myself of the completeness numbers that I was getting to begin with. For the 2010 data set with strict chi/sharp I was getting completeness levels like:


This is compared to the completeness levels for a looser chi/sharp cut. The following is for the 2010 data with the looser, 2006 chi/sharp limits:
As expected, the latter has a higher completeness. The 2010 data with the strict chi/sharp cut turns out the best ML results, but a really bad completeness, with limits ~ 1 mag brighter than when using the 2006 cut. I'm going to explore using only brighter stars with high completeness for the ML code and perhaps using the same data set but including fainter magnitudes for some of the other calculations such as absolute magnitude and distance. Beth suggests that the latter can be corrected for the low completeness and likely won't be affected by it, respectively. High completeness can be important for the ML code, but it's possible to just use the brighter stars where completeness is high. I'm in the process of getting results for such a data set for comparison. I'll also consult Ricardo and Dave on this.

Surface brightness
In other news, I've drafted the surface brightness code. It should be relatively straightforward, but something still isn't quite right. I think I'm close, though, and hope to fix this in the near future.

Friday, June 25, 2010

Things I did today

I haven't posted in a while, but here's a quick update.

Today I discovered:
1. The calibration stars are fine. I wasn't comparing the same area of observations before.
2. There's still a problem in the zero point that can't be located.
3. Is it a problem with the star injection?

Tomorrow:
1. Finish the distance code by adding the uncertainty bootstrap to the end a la Walsh et al. 2008.
2. Code up the surface brightness calculation from the ML results a la Maya's handy guide.

Friday, June 18, 2010

Friday

Today:

1. I found a bug in the addstar file code that will hopefully have a profound impact on my completeness results. Unfortunately, I accidentally corrupted my only copy of one of the allframe output files, so I have to re-run Allframe all over again. :( I still have high hopes that my completeness problems will all magically disappear after this. If so, Allframing begins this weekend.

2. I spent part of the morning working on the manual that tracks all of my analysis. I had originally written it as a .doc because I was working from my computer during a break from school and the ssh connection was horrible. Today I converted it all to a latex document and made the formatting really nice. I also added a preface and have been trying to incorporate a table of contents. Some other time, I'll get to updating the content. So far, the Bertin software sections are largely complete; the Allframe and Artificial Star Test sections still have a ways to go.

3. During the afternoon I revised the first two sections of the paper. Overall, the intro reflects that of my thesis much more now, with plenty of revisions I nabbed from the first draft of the real paper. I'll proofread draft 2 and then send it on to Beth for review. Next on the paper agenda will be finishing the completeness section and moving on to results.

Monday:
1. Completeness like it's never been done before.
2. Adding bootstrapping to the distance code.
3. More work on the paper.

Priorities

Today marks the end of week 4. I thought I'd take a moment to pause and reflect. The first month has seen fewer results than I had initially hoped. The completeness stuff is taking much longer than expected due to all the problems I'm having. I will be VERY glad to have all of that behind me. However, it seems to finally be almost together. I've also set it aside at times to get ahead on other things, so while there aren't a lot of results to show, I have gotten around to a lot. A recap for posterity:

Done
1. UMD cosmology meeting
2. 1st draft of intro and data sections of the paper
3. Bright artificial star tests
4. Completeness calculation of said tests
5. Near-convergence on the real artificial star tests
6. Distance calculation (all but the distance uncertainty calculation)

To Do
1. Perhaps obviously, completeness tests are back to being my #1 priority. I already have the code to calculate the completeness (once it's working properly!). Once I have reliable results there will be a lot of Allframe action.

2. Revising the first two sections of the paper.

3. Once I've calculated completeness and photometric uncertainty, I need to include these parameters in the distance calculation and finalize that.

4. I can then use the completeness limit to properly calculate ML results. The only calculation I really need to check on is the surface brightness. I believe the ML code already does it, or at least makes it easy to do, but I'll make sure the calculation is ready to go before the ASTs are finished.

5. The resulting number of stars provided by ML will then be input into the absolute magnitude code and that can be finalized.

6. Using the completeness limit and the best matched fiducial at the appropriate distance, I can finalize the morphology.

7. The structural parameters will inform the simulation that Beth and/or I probably just need to start over on to correct.

8. Paper Paper Paper--When all is said and done it should be relatively straightforward to write up all the results. I've got my thesis to work from and also Beth's 2006 paper. I plan to write bits and pieces and I go, in the order mentioned above.

9. Analysis Manual--Along the way, I also need to finish the document that describes how I've done all this. A lot is included already, but I've indicated where I need to add detail. I also need to include a lot more information about the Allframe portion and need to add a section for the Artificial Star Tests. There's also a lot of formatting that needs to get done. This is fairly low priority at the moment because this is something that could technically be finished even after I leave here, though I hope to make some time before then.

Distance and Completeness Updates

Fun
Today started out with breakfast in Zubrow for all the KINSC students. Twas good. It's also pot luck day!

I spent part of the afternoon helping some other folks figure things out. But now for my own work:

Distance
I came back and double checked my input to the distance code, just to be sure that everything was good to go there. I checked my technique against Dave's description of his calculation and went back to Shane's Bootes II paper, which Dave had cited. I discovered that there were a few additional things that I hadn't coded yet. Primarily, after I select the best fit isochrone or fiducial and the best distance, I need to bootstrap the distance calculation with the best fit to derive the error in the distance. Everything besides this last step is set, so I'll add the bootstrap after I've got the completeness stuff figured out.

I also tracked down the info about M13 and M92 (age/metallicity/distance) which was missing from yesterday's post.

Completeness
I spent all afternoon working on the completeness calculation for the actual ASTs. I really want to get the full-fledged Allframing started before the weekend. At this point I need the results to make significant progress on other calculations. Essentially, a lot of things will come together quickly once the artificial star tests are finished and the completeness levels are calculated.

Last I left the completeness calculation, I had a debugged version for the bright star tests, but had run into trouble matching the positions for the real test. That problem is still there. I did find a bug in the code where I was creating the input addstar file, so I made new ones and am running Allframe again. Hopefully that will solve the problem. In the meantime, I'm going to double check a few other things. Fingers crossed, this will not be an issue by lunchtime. Below are some signs of problems I've discovered on my hunt for answers. These are results from the bad addstar input runs, so I'll go back after running Allframe again to see if these red flags are still there.

A few observations:
1. I'm definitely getting 96% completeness for the bright star tests at r < 22.5. I've confirmed qualitatively and quantitatively.
2. Without applying a faint magnitude limit, only 6 stars out of 1765 artificial stars are matching between my art star input and the output from Allframe.
3. There are fewer stars coming out of allframe for the true distribution than are getting input as artificial. This could possibly be correct but seems unlikely. Allframe will pick up noise down to 27.5 mags, so even for stuff that's very faint I should be getting a lot of signal there. This is not to mention the true stars that allframe should be picking out of the image, too.
4. A quick, informal survey of 22 stars in the center of the ref frame shows that 3/22 visible artstars weren't subtracted (at least not well) by DAOphot/Allstar. Real stars are getting subtracted pretty well.
5. The bright star test outputs 1426 more stars than the real artificial star test. After calibration the bright star masterlist contains 1538 more stars than the actual art star masterlist. After final chi/sharp cuts, the margin is almost twice as many stars in the bright masterlist as in the actual AST masterlist.
6. I've double checked my option files, the program I use to create the masterlist, and the calibration program and they're exactly the same for both the bright tests and the actual tests.




Tomorrow:
1. Paper revisions
2. Completeness calculation
3. Allframing

Thursday, June 17, 2010

Distance Calculation

I downloaded 4 isochrones for the distance calculation. They are:

13Gyr, [Fe/H] = -2.3
13Gyr, [Fe/H] = -2.0
10Gyr, [Fe/H] = -2.3
10Gyr, [Fe/H] = -2.0

I downloaded these from Aaron Dotter's database at http://stellar.dartmouth.edu/~models/isolf.html. For each of the four, I assumed [a/Fe] = 0.0, Y = 0.245 + 1.5Z, and used the SDSS color database in ugriz.

I'll also be comparing to the M13 and M92 fiducials. The info on them is:

M13: (Grundahl et al. 1998)
distance = 7.7 kpc (dm = 14.431)
age = 12 +/- 1 Gyr
metallicity = [Fe/H] = -1.61
[a/Fe] = 0.3


M92: (Pont et al. 1998)
distance = 8kpc (dist modulus (dm) = 14.515)
age = 14 +/- 1.2 Gyr
metallicity = [Fe/H] = -2.2

I'll be fitting each of the fiducials and isochrones at 6 distances:

distance | dm
35.0 kpc | 17.720
36.0 kpc | 17.782
37.0 kpc | 17.841
38.0 kpc | 17.899
39.0 kpc | 17.955
40.0 kpc | 18.010

As of the end of the day Wednesday, the code was completed and de-bugged. The best match so far is M13 at a distance of 39 kpc with a total of 210 Wil1 stars within the envelope. This is derived using a magnitude limit of r = 24.25, which will need to be compared to the results of the completeness tests. Also, I'm currently using the measurement errors from the KPNO data to define the envelope around each isochrone/fiducial within which I'm matching Wil1 stars. This will need to be adjusted to the photometric uncertainty derived from the completeness tests.