Initial PSF Results

Sorry that this is coming a little late. I lacked the time to create the blog post before Thursday, but I did get quite a bit of progress done. I’ll go through the updates to CutoutCreator, as well as the procedure to create PSFs from the input data.

Procedure

CutoutCreator was first adjusted to save a couple sets of parameters to the header for each object. These are the X and Y coordinates of the object as they relate to the initial image, as well as the X and Y coordinates of the objected related to the cutout. These are derived from the input RA and DEC coordinates. These are used to get sub-pixel values for shifting. I ran CutoutCreator on both u and u* images, so we can generate these results seamlessly for either band.

My PSF procedure starts by gathering all stars within 2 arcminutes of the PSF position. If this number is less than 5, we try again with a distance of 4 arcminutes. Right now, I don’t try to get a PSF if this larger area has less than 5 stars.

After this, I create a stacked image of all our stars. I use scipy.ndimage.shift to shift each individual image using the sub-pixel coordinates, and then normalize the image (to have total value of 1) I then stack the image together, and get the median image from this. I also shift the master image to have the brightest pixel in the centre of the image.

I then create a model using astropy. Right now I’ve been testing a 2D Gaussian and a 2D Moffat model. I then fit it to the median image. At Marcin’s suggestion, I also compute the residuals between the model and the data. Below are some examples of 2D Moffat fits, showing the data (left), best fit model (centre) and residuals (right). I also plot the location of the generated PSF, as well as the number of input stars.

I’m going to be running some tests using multiple Gaussians. If I am unable to keep parameters fixed, 2 Gaussians go all over the place. However, I recently discovered that the Astropy models indeed have a fixed parameter setting. That being said, the Moffat models tend to perform very well. We should have PSFs very soon!

Leave a comment