Create individual FITS files of K2 superstamp regions.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Lagoon_2MASS_radec_amended.dat
M35_BJD2456728.5277.fits
M67_BJD2457139.6110.fits
M8_BJD2457501.0963.fits
R147_BJD2457300.2607.fits
README.md
adjust_wcs_C9-Lagoon.py
api_util.py
assemble_fits_C0-M35.py
assemble_fits_C5-M67.py
assemble_fits_C7-R147.py
assemble_fits_C9-Lagoon.py
cleanheader_c0-M35.py
cleanheader_c5-M67.py
cleanheader_c7-R147.py
cleanheader_c9-M8.py
client.py
filenames_M35.txt
filenames_M35_wcsfinal.txt
filenames_M67.txt
filenames_M67_wcsfinal.txt
filenames_M8.txt
filenames_M8_wcs.txt
filenames_M8_wcsfinal.txt
filenames_R147.txt
filenames_R147_wcsfinal.txt
fixwcs_api_C0-M35.py
fixwcs_api_C5_M67.py
fixwcs_api_C7-R147.py
fixwcs_api_C9-Lagoon.py
kepprf_AMC.py
myclient.py

README.md

SuperstampFITS

These scripts can be used to create individual FITS files of K2 superstamp regions from the original target pixel files. To use this version of the astrometry.net API and determine a WCS solution, you must have simplejson in your python path, as well as version 2 of the Kepler PyKEtools (https://keplergo.arc.nasa.gov/PyKE.shtml).

Follow these steps to reproduce the superstamp fits files that we have released at the MAST archive at https://archive.stsci.edu/prepds/k2superstamp/ Some example files are provided for you to see the output and text lists.

0.) Pick a superstamp for which you want fits files.

1.) Gather all target pixel files associated with the superstamp of interest and place them in a directory. Go into the appropriate assemble_fits_C*.py file and change the file path in line 13 ('filenames = ...') to reflect that directory path. Run assemble_fits_C*.py.

2.) Make a list of the resulting fits files and put them in a text file called filenames_XX.txt, where XX is your cluster (e.g., M67).

3.) To determine an accurate WCS solution for your files you need an account with astrometry net, and an associated API key. (Alternatively you can follow their instructions to do a local installation and skip this step). Go into the file fixwcs_api_C*.py and insert your API key in the cli.login() line. Do the same in the file myclient.py for the variable apiKey. Run fixwcs_api_C*.py.

4.) Make a list of the results files *wcs.fits in the text file filenames_XX_wcsfinal.txt, where XX is again your cluster.

4a.) If you are interested in a very accurate WCS solution for the Lagoon region (Campaign 9), run the intermediate script adjust_wcs_C9-Lagoon.py. You need to put the input fits files in a list filenames_M8_wcs.txt. Run the script and then save a list of the resulting *wcs2.fits files into filenames_M8_wcsfinal.txt.

5.) To do the final header clean-up that was necessary for us to meet the criteria for a High Level Science Product, run the cleanheader_c*.py script.