Code


Below are download links to and quick descriptions of a few IRAF scripts and C/C++ programs I've written. Please feel free to download and put them to use! Feel free to modify, however please record it in the commented information at the top of each file if you re-distribute.


Bin
C++ program to take an input file with 3columns (x y yerr) and bin in constant xunits using error-weighted means, producing an output file with xbin ybin ybinerr.

Download bin.cpp


HPHSP2 \ PhotPlot2

HPHSP stands for High-Precision High-Speed Photometry. After a few inputs from the user, the program performs aperture photometry on any number of given stars for any number of images consisting of any number of UBVRI or ugriz filters. The program automatically follows stars if they move on the CCD, offering two modes of doing so. The given aperture can either be a constant number of pixels as is standard, or can be automatically adjusted based on the full-width half-max (FWHM) of each star in each image. HPHSP is capable of looping over a range of apertures and outputting statistical data for each aperture, thus allowing the user to quickly determine the aperture that maximizes the photometric precision. The output file contains the HJD, Filter, and Airmass for each image, along with the instrumental magnitude and error of each star.


PhotPlot is a plotting and data manipulation program that runs natively in IRAF and is designed for the data files outputted by HPHSP. PhotPlot is capable of computing and displaying raw magnitude, differential magnitude, error-weighted ensemble-corrected magnitude, and extinction-corrected ensemble magnitude. The program also allows the user to delete bad data points, bin data, save processed data to new tables, and save displayed plots to postscript files.


The gzipped tar package contains the hphsp2.cl and photplot2.cl files, as well as a detailed manual on how to use and modify both programs.

Download HPHSP2\Photplot2 Package


Pipeline

Pipeline is a well-organized script to calibrate images via overscan, bias, dark, and flat correction. It is set-up to automatically detect and sort all calibration and science frames sitting in one directory, perform the calibrations, and then leave the user with the calibrated science images and master calibration images. It is capable of detecting UBVRI and ugriz filter sets. It has an easy to modify section to adapt it to your camera\system.

Download Pipeline


HSDisp

HSDisp stands for High-Speed Display. It is a simple script that will take a list of files and quickly display the first 16 images in the 16 frames available in DS9. It will then pause for the user, and when a key is entered will display the next 16 images, and so on until the end of the list.

Download HSDisp


FlatNorm

FlatNorm is a simple script that will take a list of flats and normalize them by their median value.

Download FlatNorm


ExpCor and CtoJ

ExpCor and CtoJ are two really simple scripts to rename or modify headers in fits images.

Download ExpCor

Download CtoJ