Tuesday, May 29, 2012

Zero Zero Project Update

The goal for yesterday was to, in some way, create a semi-automated method to grab images of individual stars from the SDSS3 survey.  What I came up with is a program that creates an IRAF script that goes out onto the web, grabs a specified full-frame image, and then extracts a small portion (128 pixels by 128 pixels) centered on the object I'm interested in.

IRAF stands for 'Image Reduction and Analysis Facility' and pretty much any astronomer at least knows of IRAF if not relies on it heavily for all kinds of astronomical data reduction and analysis.  I worked in the IRAF programming group for a couple years back in 1998, so I'm still fairly familiar with how it works although it's clear that lots of things are pretty rusty and full of cobwebs.

It looks like from the structure of the SDSS3 that pretty much everything is keyed off of the Object ID number, or 'objId' for short.  The number that is associated with objId is encoded such that it contains information on which image taken with SDSS has the object I'm interested in.  So just from the objId, I could find the original image that a particular object is on.  This information is also contained in the SDSS3 database, so if need be, I can get the info I need from that.

The other thing I did yesterday was to start creating my own local database to store some of the more useful (to me) info that I'll need to complete this project.  For starters, I created a database table that contains the objId, object position in the sky (Right Ascension and Declination), magnitude (for all five filters), and position of the object within a given SDSS3 image.  This will allow my program to access the data it needs easily and quickly.  There's a good chance that sometime soon I'll access the SDSS3 database directly from one of my own programs, but for now this is great.  For the small amount of data I'm working with (9000+ objects isn't all that much considering computer disk capacities these days) it wouldn't matter if I kept all this information in a simple text file rather than a database, but working with databases is very easy and it gives me a lot of flexibility.

So as I said, what this program does is create a 'script' that can then be run in the IRAF environment to extract the images I request.  For those of you who may not know, a 'script' is a list of commands that are executed by the computer sequentially.  So in my case, the script grabs the full-frame image from the SDSS3 and then extracts a small 128x128 pixel "postage stamp" image from that.  I do this for all five wavelengths.  In the end, I have five 128x128 pixel images.  Here they are labeled with their respective color filter designations:

ObjID 127660236032507958, r magnitude 18.53, R SNR 55.27
These are five images of the same object (I just picked a random one) on the same brightness scale.  The signal-to-noise ratio (or SNR) for the 'R' image is about 55, which is more than adequate.  Any SNR above about 10 is acceptable.  The 'Z' image (lower right) is the faintest of them all showing quite a bit of noise.  Yes, the SNR of the 'Z' image is 9.5, which as you can see from the image is still ok (I can still see the star although there's a lot of noise) but is getting questionable.  The measurement errors, for example, will be greater in this image than the other images.

I do what I call a "simple SNR computation" by looking at how much the noise is varying compared to the brightness of the star.  So to use the jargon, I compute the ratio between the maximum value in the image (which will be the brightest pixel in the star) and the 1 sigma standard deviation of the image.  When I divide the two (max value divided by the standard deviation), I get a "good enough" estimate of the SNR.

So now I have a basic tool to extract images from the SDSS3.  Yehaw!  What exactly am I going to do with those images?  Not sure yet, but having the capability at hand will definitely come in handy -- if for no other reason just to take a look and see what I've got!  They say a picture is worth a thousand words and in astronomy that is VERY true.

No comments:

Post a Comment