Lippy’s HDI Tools Developed by Andy Lipnicky January 17, 2017 ///////////////////////////////////////// ///////////////////////////////////////// \\\\\\\\\\\\\ Description: \\\\\\\\\\\\\\ ///////////////////////////////////////// ///////////////////////////////////////// Lippy’s HDI Tools is a set of AstroImageJ Java macros designed to work with data taken with the Half Degree Imager (HDI) on the 0.9m WIYN Telescope. There are currently 11 macros which do various things from data reduction to characterization of the telescope. Most macros will prompt you to select a directory of images to work on, it is important that everything in that folder is a FITS image because it will try to perform this operation on everything contained inside the directory including other folders or text files which will cause the program to fail. Each macro is heavily commented and should be easy to follow. There is also a document named “Using Lippys-HDI-tools.pdf” that includes a tutorial for how to reduce data and perform photometry using these macros and AstroImageJ’s built in tools. ///////////////////////////////////////// ///////////////////////////////////////// \\\\\\\\\\\\\\ Included: \\\\\\\\\\\\\\\\ ///////////////////////////////////////// ///////////////////////////////////////// -11 AstroImageJ macros -README.txt -Using Lippys-HDI-tools.pdf ///////////////////////////////////////// ///////////////////////////////////////// \\\\\\\\\\\\\ Requirements: \\\\\\\\\\\\\ ///////////////////////////////////////// ///////////////////////////////////////// These macros were developed using AstroImageJ version 3.2.0 which includes ImageJ version 1.47i on a MacBook Pro running Mavericks OSX 10.9.5. AstroImageJ is available at: http://www.astro.louisville.edu/software/astroimagej/installation_packages/ and the download is very straightforward. Versions of AstroImageJ exist for Linux, Mac, and Windows systems. To use these macros, just drop the “Lippys-HDI-tools” folder into the “macros” folder in your AstroImageJ installation. Some of the macros will require you to update the file path to match your system. Below is a description of each macro, if an update is needed by the user, it is stated in the macro description. To update the file path, simply open the macro in a text editor and make sure that the path to the macro that is called matches the path to the macro on your system. ///////////////////////////////////////// ///////////////////////////////////////// \\\ Description of Individual Macros: \\\ ///////////////////////////////////////// ///////////////////////////////////////// bias_correct- -This program will take a set of images and bias subtract them based on the overscan region. It will create a new image and save it in a new directory named “biased”. calibrate- -This will create a master flat field image and then calibrate a set of observations. It simply runs the create_master_flat macro followed by the flat_field macro. Use this to quickly calibrate your images and if you already understand how the process works. It will work behind the scenes without opening any of the images on the screen. The fully reduced images will be saved in a new folder named “calibrated”. NOTE: Ensure that the file path for the macros matches your filesystem!!! calibrate(depricated)- -This was the first macro I created to reduce images. It is clunky and requires a very specific data structure. It should be ignored but is here for nostalgia. create_diffs_and_sums- -This program will take pairs of images and create summed [(A+B)/2] and differenced [A-B] images. These images are needed in order to calculate the mean and variance between images for gain calculations. The created images are saved into separate folders named “summed” and “differenced”. create_master_flat- -This program will create a master flat image after bias subtracting and scaling all the flats. The master flat will be created in the directory where the flats are located and will be left open at the end of the program for inspection. crop_images- -This program will trim the overscan region off a set of files that you specify and save them to a new directory named “cropped”. flat_field- -This program will bias subtract and then flat field divide all the images in a given directory. You must already have the master flat image open before running this macro. It will then place all the corrected and trimmed images in a new folder called "calibrated". gain_calculations- -This program will run the macros required to reduce a set of flats, create difference and sum images, calculate the mean of each sum image and the variance of each difference image, and print those results into separate data files. Then by creating a variance vs. mean plot, the amplifier gain can be obtained by the formula: gain = 1/slope This follows the procedure described at spiff.rit.edu/richmond/wiyn/technotes/tech_8/tech_8.html Unfortunately, this will create a bunch of biased subtracted images that are not necessarily needed after the analysis is done. You will have to delete them manually. NOTE: Make sure to update the file paths for each macro!!! means- -This program is used by gain_calculations and will find the mean value of four different locations in a list of images and record them in a file named "means.txt" in the working directory. shutter_effects- -This program creates ratio images by dividing every image in a directory by the first image. When looking for shutter effects one can compare illumination between 20 second and 1 second exposures by creating a ratio image like this which will highlight inconsistencies. variances- -This program is used by gain_calculations and will find the variance of four different locations in a list of images and record them in a file named "variance.txt" in the working directory.