Friday, June 5, 2009

Brief Update

Today:

Talked with Dave this morning about diagnosing the CMD problems I'm having. He taught me some tricks to use with ds9--WCS matching and some region files stuff. He also sent me some python code to match stars between the two bands.

I didn't get to the match.py but that'll be first up for Monday if not before. I wrote some code to make my own region files and overplotted them onto the images in ds9 and nothing looked wrong. I also checked to be sure that the psfs were spread pretty evenly over th entire image. It looks as if they are, though there's a suspicious lack of psfs in the center of the image.

I also made a histogram of the match distances spherematch is finding when I match stars between the catalogs that way. I'm suspicious of how many stars spherematch is finding--about 600 match to within 1 arcsecond out of ~30,000 stars in each catalog. Hopefully messing with match.py will shed some light on this problem.

Other than that I WCS matched the three stacks in ds9 and discovered some *gasp* wiggling in the location of stars. Incidentally, the g7 and g10 stacks appear to be the furthest off.Talked with Beth about this briefly. Doesn't seem to be a header issue because I feel that there would be a greater discrepancy, though I'll investigate this further on Monday. Also seems like the stars would be elliptical if it was a scamp issue.

The stars in the r7 stack also look a lot bigger than the others. Beth attributed this to a different FWHM than the g-band, which makes me concerned about the fact that I used the same FWHM for all my DAOphoting. But Beth doesn't think that a FWHM that was a little off should cause a big problem.

Both Beth and I seem to be out of ideas at the moment, so the weekend will be a good time to think some more. Waiting until Dave gives me info on how to give him my images via FTP so that he can offer an opinion.

Wednesday, June 3, 2009

Today:

I started out wanting to fix the distortion maps so that it would show all 8 chips. In order to do so I had to scamp the MEF files. So I started by sextractor-ing the MEF files so that I could get the catalog files needed to input into scamp. I was concerned about inputting the gain here because before I had been doing it on the command line for each chip. But now that each chip was in a different extension of the MEF files for each exposure, that was an issue. I talked with Beth and she suggested that it didn't matter too much for a similar reason to why we can use a constant gain and read noise in DAOphot. So I took the median of the gains of each chip and used that as the value in the .sex configuration file:

sex gain= 2.75

I then used the output catalogs from sextractor to run scamp and discovered that the distortion files were in fact showing all 8 chips! Victory!

Seeing that scamp was playing nicely, I went on to swarp the MEFs together. My concern about gain issues was further alleviated by the fact that swarp was getting the proper gains out of the image headers. I then took a look at the stacked image to make sure it looked alright. There's nothing obvious that stands out--the stack looks as good as it did before. I'll check again after DAOphot star subtracts.

After that I added the constant sky into the new 10-exp stack, using the same median value that I calculated before.

3. Then I ran DAOphot and checked again to make sure I have the best analytic model possible.

Model # ........ Avg Chi^2
1....................0.0224
2....................0.0507
3....................0.0221
4....................0.0142
5....................0.0549
6....................0.0137
7....................0.0138

This time it looks like the close race is between 6 and 7, but 6 wins out by a little bit. I DAOphoted again and got the average chi for #6 to be 0.0139 and the average of #7 to be 0.0140. The slight changes are presumably because of minor discrepancies in how I was manually selecting the psf stars. But #6 still wins so that's what I'll stick with.

In the process of DAOphoting I discovered another parameter that's neither in the manual or in our daophot.opt file, but apparently is in the default daophot.opt. Keyword is "USE SATURATED PSF STARS" and it's currently set to 0.0. I'm willing to bet 0= "No" and move on with my life.

I overplotted the SDSS stars once again to make sure that was still looking consistent and see if it looked any better than before. I'm still concerned by a few places where SDSS shows a star and nothing at all appears in the stack, even before star subtraction. But other than that, things look fine.

I then re-did the 7-exp g and r stack using MEFs and re-did all of the DAOphoting and Allstaring there so that I can come up with the CMD.

Tomorrow:

Come up with a good CMD and go over CMD calibration with Beth.

Tuesday, June 2, 2009

Today:

I started with checking out the analytical models of the psfs to try to find one that fit well. I ran DAOphot using each option to check out the residuals. I compared the chi^2 DAOphot printed to the screen for each model. A good chi^2 is close to 0--it represents the percent deviation, root-mean-square, to which DAOphot's first approximation matches the observed stellar profiles, on average.


Model // Chi^2
Gaussian (#1) // 0.0224
Moffat, beta=1.5 (#2) // 0.0500
Moffat, beta=2.5 (#3) // 0.0197
Lorentz (#4) // 0.0137
Penny, 4 free (#5) // 0.0544
Penny, 5 free (#6) // 0.0136
Super Secret (#7) // 0.0134

Looks like the super secret model wins out, but the 5-free-parameter Penny and Lorentz models are close behind.


In an effort to address the distortion problems Dave brought up yesterday, I've created multi-extension fits (MEF) files similar to what he was using.

Tomorrow:

I'll scamp all 10 of the MEF files at once to see if I can get a distortion file that shows all 8 chips. If this works, I'll swarp the files to see if that looks good. If swarp looks good, I'll redo DAOphot and test the different analytical models once again just to be sure I've got the best one.

Assuming all of this runs smoothly, I'll also talk to Beth about CMD calibration, which we pushed back today when I got stuck with this mef stuff.

Monday, June 1, 2009

Today:

Mag limit issues:

Last Friday afternoon I was having trouble because my CMD was only going to about 17th magnitude. I tackled that problem for most of the day.

I discovered that I'd lied to DAOphot a bit about how I had made the stack. So, after fixing this, my plots of sharp, round, and flux versus magnitude jumped down to about 20.5 magnitudes. Beth still expected this to be deeper. I then DAOphot'd a single exposure on one chip--Exposure 126 on Chip 7 to compare. I made the same sharp, round, and flux plots to check out the instrumental magnitude limits and they were showing stars only out to about 19 magnitudes. Still deeper than the 17 I was getting at first, but not quite down to the 20.5. This might be expected because the stack should get deeper than a single exposure, but not totally sure what the numbers should be.

I made a CMD of the new stack with proper DAOphot'ing and that looks to go down to about 19 mag. A few magnitudes better than before, but still not as good as I was expecting.

Email from Dave:

Dave sent an email today bringing up the issue of the distortion in our images. My scamp distortion output shows only one chip instead of all 8, so he was worried that we were assuming each chip has the same distortion which could easily be very untrue. At his suggestion, I overplotted SDSS stars before and after star subtraction to make sure that my stars were lining up with the ones SDSS knows. It looked like they were lining up pretty well, though there were a few places where SDSS said there should be a star but my image had nothing. I'm still not clear on what was causing this, but in general things lined up very well. I'll check again tomorrow to see if there's anything else I can do to check off on the distortion problems, though things look pretty good to me.

Dave also got back to me today about my DAOphot questions. He agreed with most of our parameter values: He used a single value for gain assuming it wouldn't affect any calculations we were actually going to use. He also used a variable psf and suggested that the KPNO Mosaic imager is probably especially prone to variable psf because it was one of the first wide-field imagers. He set percent error and profile error to 0 like we did, too. But just like us he doesn't really understand what this does either.

As far as Analytical Model PSF, he uses an option that's in the code, but not in the manual. Setting the parameter equal to 7 gives:

C Penny function --- Gaussian core plus Lorentzian wings.
C The Lorentzian and Gaussian may be tilted in different
C directions.

This is the fit he used, but he said it was because his LBT data was particularly bad and suggested we might not need to use it. He said we should try out some other things first. I emailed him back to ask how I could tell if the fit I chose was a good one. He suggested checking by eye to see if the residuals look good and checking to see if the chi-squareds were legit. I'm not sure I totally understand how to do those things, but that'll be a project for tomorrow.

Tomorrow:
1. Sign off on the distortion problems--make sure everything's cool there.
2. Explore some of the analytical models of psf to make sure I have a good one. This will pretty much conclude the discussion of DAOphot parameters pending future weirdness in results.
3. Talk with Beth in the morning about CMD calibration and get moving in that direction.
4. Email Dave back.