KELT Image Photometry

1. Go to dropbox and download the data from the night. Create a directory to save the raw data and calibration frames folders in.
2. Go to the dropbox and download the KELT\_phot.ipynb file. Save it in the same directory as your raw images and calibration frames folder.
3. Follow the steps for image calibration in "Image Calibration (Bias, Dark, Flat Correction)"
4. Next, we need to align the images
	1. In AstroImageJ, select File --> Import --> Image Sequence and select your calibrated image folder
	2. The "Sequence Options" window should pop up. Make sure "Number of images" is correct, "Starting image" is 1, "Increment" is 1, "Scale images" is 100%. "File name contains" and "or enter pattern" should be blank. "Convert to RGB" should be unselected but "Sort names numerically" and "Use virtual stack" should be selected.
	3. Hit "OK"
	4. Select Process --> Align stack using WCS or apertures
	5. Set "Radius of object aperture" to 25, "Inner radius of background annulus" to 40, and "Outer radius of background annulus" to 65. Make sure the only option selected is "Show help panel during aperture selection". "First slice" should be at one and "Last slice" should be however many images you have.
	6. Hit "OK"
	7. Select three stars in AstroImageJ that are bright but not oversaturated, do not drift out of the frame throughout the night, and are spread around the image in a sort of triangle. Hit "Enter"
	8. AstroImageJ will now move through all of your calibrated images and align them. If the stars jump too much you might have to align in separate groups.
	9. When AstroImageJ is done aligning, it will save your aligned images in a directory named "aligned" that is located within your "Calibrated" directory.
5. Open an aligned image and find your source with a finder chart
	1. Use one of KELT provided star charts (linked on the transit finder) or make your own with AAVSO (note that no comparison stars will show up, you will pick your comparison stars yourself)
6. Choose comparison stars following KELT guidelines
	1. For comparison stars, KELT wants all visible stars within a 1 arcmin radius, all stars at least half as bright as the target within a 2-3 arcmin radius, and all very bright stars within a 6 arcmin radius
	2. Open an aligned image in Ds9
	3. Select scale --> z scale to see the image better
	4. Find the target using the finder chart
	5. Hover over the center of the target and write down the x and y positions of the target
	6. Select Edit --> region
		* Now, when you click anywhere on the image, a circle should appear
		* If a shape other than a circle appears, go to region --> shape and make sure circle is selected
	7. Now we need to create circles centered on our target to find our comparison stars
		* Double click anywhere on the image to create a circle AND open the circle information window
			+ The boxes to the right of "Center" are the x and y positions of the center of the circle
			+ The box to the right of "Radius" is the radius of the circle in units of pixels
		* We need to create three circles centered on the target with radii of 1 arcmin, 3 arcmin, and 6 arcmin (or 120 pixels, 360 pixels, and 720 pixels, respectively)
		* Create the first circle by double tapping anywhere. Enter the x and y position of the target and 120 pixels to create a 1 arcmin radius circle. Hit enter.
		* Repeat the previous step twice more. Continue to enter the x and y positions of the target but enter 360 pixels then 720 pixels for the radius.
	8. Once you have your three circles centered on the target, hover over each visible star in each circle and make note of it's value and the value of the target. Follow the KELT comparison star rules in step 4.1 above and select comparison stars. Pick a maximum of 10 stars.
	9. Make note of which comparison stars you will use as you will need this in the next step
7. Open AstroImageJ again to begin photometry
	1. Click Import --> Image Sequence. Navigate to your aligned image folder and select it.
	2. Click on any unsaturated star and go to analyze --> plot seeing profile to get the FWHM in units of pixels. Make note of this as you will need it later
		* I normally repeat this step with several stars and several images throughout the night to watch for fluctuations in the FWHM
	3. Click on the button with two circles called "Perform multi-aperture photometry" and the "Multi-Aperture Measurements" window will pop up
	4. For "radius of object aperture", give the FWHM you noted earlier. For "inner radius of background annulus", enter two times the FWHM. For "outer background radius" enter three times the FWHM.
	5. Make sure "Reposition aperture to object centroid" and "Show help panel during aperture selection" are selected and that any other options are disabled
	6. At the bottom of the window, click the "Aperture Settings" button and make sure "List the following FITS keyword decimal values in measurements table" is activated
	7. You may also want to click on the "More Settings" button. All of the information that will be stored in the photometry table is located here. It is recommended to select all of them in case the information is needed later.
	8. Click "OK" in the settings window
	9. Click "Place Apertures" in the "Multi-Aperture Measurements" window
	10. You will now be selecting your target and comparison stars to perform photometry!
		* Click on your target first
		* Click on your comparison stars that you chose earlier.
		* Once the target and all of the comparison stars are selected, take a screenshot of the AstroImageJ window. Make sure to include the direction and the pixel scale. You will need this later when you submit data to KELT (it is also helpful to have a reference of what order you selected your comparison stars)
	11. Push "Enter"
	12. The Measurements table should pop open and start to be created as it runs through the images. Once it is done and data stops being added, click file --> save as. Save it as "Measurements.csv" and save it in the same directory as your KELT photometry Jupyter notebook.
8. We will now put the Measurements file through the KELT Photometry Jupyter notebook to create light curves of our target!
	1. Before running the KELT photometry Jupyter notebook, we will need to calculate the predicted start and end time of the transit in JD UTC.
		* Go to any time converter online. I prefer the NASA JPL one found here (the rest of the instructions will be specific for the NASA JPL time converter)
		* Once at the NASA JPL time converter, select your time zone in the drop down menu under "Time Zone"
			+ Be careful with daylight savings, make sure you properly select EST or EDT
		* De-select "Output Alternate Zone"
		* In the "Date and Time" bar, enter the start date and time of the transit following the format. The KELT predicted start and end time are found on the transit finder from the night data was taken.
		* Click "Update using calendar date and time"
		* The Julian date at the bottom should now update to the Julian date of the start of the transit. Write it down as you will need it later.
		* Repeat these steps to obtain the Julian date for the end of the transit as well.
	2. Now that you have the start and end times of the transit in JD UTC, open the KELT Photometry Jupyter notebook
	3. Start running through the cells. File name is "Measurements.csv", the number of comparison stars varies for each source, the start and end time are the ones you just found and converted.
	4. It should create and save light curve figures for each comparison stars! Note if one of the plots looks weird or different than the other, you may need to investigate it more.
9. Congratulations! You are now ready to submit to KELT and perform your own analysis of the results!