Running IDL Reduction routines

 

Set up IDL on Athena

 

Here is the procedure to start IDL on athena. Be sure to do all parts before beginning to analyze your data or some fo the functions may fail.

athena% add envi

athena& add 12.410j

athena% idl

IDL> restore, '/mit/12.410j/idl_libs/idllibrary.xdr'

IDL> restore, '/mit/12.410j/idl_libs/idlvars.xdr'

At this point, everything is set up and you may begin analysis at will.

 

Calibrate Data

 

(1) Create master bias frame: makebias

Purpose:

This function takes a list of bias images and averages them to make one master bias image to be used in reducing all of the data for one night.

Calling Example:

makebias, filelist='/directoyr/path/file.txt', outfile='/directory/path/file.fits'

 

Parameter List:

filelist - This should be a string pointing to a textfile of the filelist type, listing all of the files that you wish added to the average bias image, it can include the path to the images if you want to work in a different directory.

outfile - This should be a string containing a file name (with directory) where you want the bias frame to be stored.

Notes:

This function doesn't actually display any frames to the screen, so be sure you are using the right files. (All bias frames from one nights.). You can check your image using slide_image (as explained in the IDL introduction).

 

(2) Create master dark frame: makedark

Purpose:

This function takes a list of darks images and averages them to make one master dark image to be used in reducing all of the data for one night for one exposure time.

Calling Example:

makedark, filelist='/directoyr/path/file.txt', biasfile='/directory/path/diasfile.fits', outfile='/directory/path/file.fits'

Parameter List:

filelist - This should be a string pointing to a textfile of the filelist type, listing all of the files that you wish added to the average dark image.

biasfile - This should be a string containing the full pathname of the master bias file for use in processing. The master bias file should be created with makebias

outfile - This should be a string containing a file name (with directory) where you want the bias frame to be stored.

Notes:

This function doesn't actually display any frames to the screen, so be sure you are using the right files. (All dark images from a single night that have the same exposure time).You can check your image using slide_image (as explained in the IDL introduction).

 

(3) Calibrate data with bias and dark frames: multiccdproc

Purpose:

This function takes a list of CCD images (all the same exposure time from one night) and a bias and dark file (of the appropriate exposure time), and does all of the bias and dark subtraction. The files get written over by the processed versions so you must copy them off of the CD-ROM before processing. Make sure you've a spare copy to process with.

 

Calling Example:

multiccdproc, filelist='/directoyr/path/file.txt', outlist='/directory/path/filesout.txt',biasfile='/directory/path/diasfile.fits', darkfile='/directory/path/darkfile.fits'

Parameter List:

filelist - This should be a string pointing to a textfile of the filelist type, listing all of the files that you wish to be processed.

outlist - This should be a string pointing to a textfile of the filelist type, renaming the files you are calibrating so you do not over write your original files if they are in the same directory.

biasfile - This should be a string containing the full pathname of the master bias file for use in processing. The master bias file should be created with makebias

darkfile - This should be a string containing the full pathname of the master bias file for use in processing. The master bias file should be created with makedark

Notes:

This function doesn't actually display any frames to the screen, so be sure you are using the right files. (All CCD images from a single night that have the same exposure time). If for some reason, you only have one CCD image to process, just make two copies of the file and process both of them. (The function needs to have a list of them.). You can check your image using slide_image (as explained in the IDL introduction).

 

 

Data Reduction: Getting numbers out of the images

 

(1a) Astrometry: singleastrom

Purpose:

This function takes a single CCD image, a boxsize, and an output file. It displays the image, asks for you to click on the object and a standard star in the same frame. It centers on the object and star then prints to the screen and to a file the centroid (center of mass of the light) position, x and y for each.

Calling Example:

singleastrom, '/directoyr/path/file.fits', outfile='/directory/path/data.txt', boxsize=18

Parameter List:

outfile - This should be a string containing the full pathname to a text file where you want the photometry stored. If the file does not exist a new file will be created, if it does exist the file will be appended to.

boxsize - This should be an even number from 2 to 24, giving the number of pixels you want on your boxes.

Notes:

Make sure if the boxsize is n, your mouse clicks are not closer than n/2 to the side of the image. If you wish to process multiple images at once, use multiastrom.

(1b) Astrometry: multipastrom

Purpose:

This function takes a list of CCD images which are all of the same target in the same place. You give it a boxsize and an output file, and it will prompt you for a target mouseclick and a standard star mousclick on the first image in the list. It will then apply these choices to all images in the list, calculating the centroid (center of mass of the light) positions for each and writing all data to the output file.

Calling Example:

multiastrom, filelist='/directoyr/path/file.txt', outfile='/directory/path/data.txt', boxsize=18

Parameter List:

filelist - This should be a string pointing to a textfile of the filelist type, listing all of the files that you wish to be processed.

outfile - This should be a string containing the full pathname to a text file where you want the photometry stored.

boxsize - This should be an even number from 2 to 24, giving the number of pixels you want on your boxes.

Notes:

This function displays the first image, but doesn't display any of the latter images in the filelist. As with singlephot, make sure if the boxsize is n, your mouse clicks are not closer than n/2 to the side of the image.

 

(2a) Photometry: singlephot

Purpose:

This function takes a single CCD image, a boxsize, and an output file. It displays the image, asks for you to click on the object and then the background, and finally does simple box photometry on the object writing the results out to the output file specified.

Calling Example:

singlephot, '/directoyr/path/file.fits', outfile='/directory/path/data.txt', boxsize=18

Parameter List:

outfile - This should be a string containing the full pathname to a text file where you want the photometry stored. If the file does not exist a new file will be created, if it does exist the file will be appended to.

boxsize - This should be an even number from 2 to 24, giving the number of pixels you want on your boxes.

Notes:

Make sure if the boxsize is n, your mouse clicks are not closer than n/2 to the side of the image. If you wish to process multiple images at once, use multiphot.

 

(2b) Photometry: multiphot

Purpose:

This function takes a list of CCD images which are all of the same target in the same place. You give it a boxsize and an output file, and it will prompt you for a target mouseclick and a background mousclick on the first image in the list. It will then apply these choices to all images in the list, doing box photometry as in the homework (singlephot), and writing all data to the output file. In addition to the parameters written by singlephot, multiphot outputs the error on the flux number for use in propagating through your calculations.

Calling Example:

multiphot, filelist='/directoyr/path/file.txt', outfile='/directory/path/data.txt', boxsize=18

Parameter List:

filelist - This should be a string pointing to a textfile of the filelist type, listing all of the files that you wish to be processed.

outfile - This should be a string containing the full pathname to a text file where you want the photometry stored.

boxsize - This should be an even number from 2 to 24, giving the number of pixels you want on your boxes.

Notes:

This function displays the first image, but doesn't display any of the latter images in the filelist. As with singlephot, make sure if the boxsize is n, your mouse clicks are not closer than n/2 to the side of the image.

 

(3) Spectroscopy: specextract

Purpose:

This function takes a single CCD image, and an output file name. It asks you to click on a spectrum on the screen, and then click on a background area (near the bottom of the image). It then extracts the spectrum and writes column numbers and flux values to the output file. It puts it in a two column text format that can be loaded into most standard plotting programs for graphing. (Excel, matlab, kaleidagraph, etc.)

Calling Example:

specextract, '/directoyr/path/file.fits', outfile='/directory/path/data.spec'

Parameter List:

outfile - This should be a string containing the full pathname to a text file where you want the spectrum stored.

Notes:

This is function can be used multiple time on the same image to get several of the spectra from that image. (Each CCD image has approximately 20 spectra on it.) Just make sure to write the output to a different file for each one, as it will overwrite an old spectrum with the new spectrum.