Thursday, June 18, 2009


Today I made my first weight maps. To do so I first normalized the pixel values of the flat field by dividing all the values by the maximum value. The I combined the flat field and bad pixel map by multiplying the values of each pixel in these two images. So the weighted maps look much like the flat fields, but don't have the bad pixels and cosmic rays.

Then I made MEFs of these weight maps for each exposure in each band.

Finally, I swarped the previously MEF'd .fits images with their respective weight maps. I combined them using the "WEIGHTED" method in swarp which stacks the images using a weights average. My weight map type was "WEIGHT_MAP".

The r stack looked pretty good, although it didn't get rid of all the streaks that we had attributed to bad pixels. The g stack pretty much just looked terrible. So I manually set the suspect pixels to zero in an effort to maybe pick up some bad pixels that had been lost.

Because the r stack was looking alright I went ahead and DAOphot'd it to check out how deep it was getting. The verdict: 19th magnitude! This is about a magnitude deeper than before so we should be down to 26th magnitude with calibration.

After emailing with Dave, we decided that the divide-by-the-max-value method of normalization wasn't a good one. In fact, because the average value of our flat was about 1, we're going to assume they're already normalized.


1. Finish re-making all the weight maps using this assumption
2. re-MEF them
3. re-swarp everything
4. Check out the stacks--if good/better then DAOphot
5. if DAOphot'd then do calibration and CMD
6. if good CMD then revel in it for a while.

Wednesday, June 17, 2009

i <3 lacosmic


Several important things got done today.

1. We chose the new .opt files to finish the rest of the analysis. There wasn't much difference between the images made from the new vs. old .opts but we figured if anything the new ones are more thorough.

2. Dave suggested that using a maximum gain and read noise shouldn't matter if all values are pretty close together. I think I'll use a median just to be sure. But that means the images we're looking at to make these decisions are more or less good ones.

3. Beth and I took a look at the averaged stack I had made before and hadn't liked because it looked terrible--LOTS of rows of bad pixels. We're thinking it can be salvaged with a bad pixel map to allow us to ignore the gross stuff.

4. I successfully ran lacosmic to get rid of bad pixels and cosmic rays and it worked super well as far as I can tell. The masks it output are very pretty. One problem: lacosmic sets the bad stuff equal to 1. According to Dave, swarp needs the bad pixels and cosmic rays to be equal to 0 and everything else equal to 1. (Opposite what lacosmic did.) So I'm writing a few lines of code to reverse this.

5. I made some more progress on the calibration code with Beth's help. I got her code up and running, so I now have a more robust calculation for the linear fit in zp-color space. The slope is still small so everything still looks good. I won't do much more with this yet since I'm anticipating better data to calibrate by Friday.

1. lacosmic the r-band images.
2. Makes MEFs of the masks/cleaned images?


1. Explore weighted maps.
2. Swarp stacks average-style with the help of the new maps.
3. Get ready to DAOphot.

By Friday:

1. DAOphot averaged stacks.
2. Admire the beautiful CMD that goes to 26.5 mag.

Beth's thesis suggestion:

Star formation history of Wil1.

Tuesday, June 16, 2009


I spent some time talking to Beth comparing what I have to what she got a few years ago. I ended up taking out my chi and sharp cuts--these can always be added in later. According to Beth, everything seems comparable between my single exposure analyses and hers which is good news.

I also madesome improvements on the plots of position versus offset for both bands for both the new .opts and old .opts. Eyeballing them, there's no real dependence on position, but I'll wait for some feedback from Beth on this and perhaps later (tomorrow?) fit a line to this data to see what kind of a relationship there really is.

Continuing on the quest for calibration, I've written some code that uses linfit to fit a line to the zero-point versus color plots for both bands. The color terms are about 0.05 and 0.04 for the g and r bands, respectively, so this is also good news. I'm now going to apply some code that Beth sent to fit this same data a little better. She used fitexy and was able to incorporate the measurement uncertainties. She also iterated the fit, throwing out data that was more than 3 sigmas from the fit. I know for a fact that I have at least one outlier for each band so this will be impotant. So now that I've used linfit to get a general idea that things are sane, I'll use the more robust version to get a better value for the calibration.

In essence, I've plotted true_mag - inst_mag vs. inst_gmag - inst_rmag. So I've fitted a line that will follow the format true_mag = inst_mag + zero point + slope*(inst_gmag - inst_rmag). I know all of these things except the "slope" which is what all this fitting should solve for. All I know is that it should be small.


1a. Meet with Beth at 9 to talk about subtracted images, etc.

1b. Mention the issue of old .opts vs. new .opts. There's not a big difference between the two in the stack images thus far. Can I make a decision to ditch one in favor of the other? That'll cut down on time spent analyzing things. Because there's not large discrepancy between the two, I'm leaning toward the new .opt files since we know that it some ways at least they're better. And they're obviously not causing any major problems. Are there any other results we're waiting on to make this decision?

2. Talk with Dave at 10.

3. DAOphot average stack. Beth expects that we can get another half a magnitude from this. She's currently digging around for the flat-fields and bad pixel masks.

4. More calibration--get Beth's code working to include measurement uncertainties.

Monday, June 15, 2009


Beth spotted a bug in my calibration code so suddenly we're down to 25th magnitude. Now I'm comparing the calibrated CMD's made from the old .opt files and the new ones. I'm comparing between CMDs of the stack and CMDs of a single exposure on Chip 7. If only I could figure out how to attach plots to the blog, I could show them here, though I think maybe they're too big.

Anyhow, I'm noticing that the stacked images seem to get to the same depth using both new and old .opt files. The colors are slightly different between them, but no other noticeable difference. For the single exposures, a few stars show up in the old .opt CMD that are at fainter mags than in the new .opt CMD. I'm thinking the newer one probably cuts these out at some point because it's more robust and the general cutoff seems to be at ~23.5 or 23.75 for both anyway. I already know the new .opt files turn up fewer stars and the stacks get to the same depth, so I think everything is legit here.

However we're still working on getting deeper because we expected calibrated CMDs down to 26 or 26.5. While more brainstorming on this continues, I'm going to work on getting my calibration code up to snuff. And then I'm going to the sound wave panel at 4 this afternoon.


I checked out the offsets as a function of position in both bands and for both the new and old .opt files. They all seem to be independent of position, which is a good thing. There does appear to be one star or so in both bands and both the new and old .opts that is a lot higher than the rest, but I don't think this is a big deal. If anything, I can cut it out later.

I then moved on to do the linear fit to the zero-pt versus color data. I'm a little confused, though--should I have two fits, one for each band? Since both have a different zero-pt, this must be the case. I guess I'm just a little confused as to what the fit is going to be used for. I understand that when I calculated the zero-point offset I had to add that back into the instrumental magnitude. But color involves both magnitudes and they have different color terms. Will I be adding the color term for each band back into the magnitude in that band to adjust the calibrate the color?


More calibrating.