Directions for CTE Correction - abostroem/science_programs GitHub Wiki

  1. Create a top level folder with the following subfolders: top_level_folder bias dark sci_data reffiles
  2. Download/install the herringbone correction folder and add it to the top_level_folder
  3. Put the PCTETAB in the reffiles folder
  4. Download/install the refstis pipeline
  5. Download/install the cte_correction_pipeline.py script
  6. Put the anneal_database somewhere accessible and modify the calls to divide_anneal_month to point to the database location
  7. Edit script to point to the refstis code and your top level folder
  8. Retrieve science data taken during a single anneal period and put this in the sci_data folder - figure out how to define this better.
  9. Get the anneal month dates by starting a python prompt in your sci_data folder and typing the following
    >>>import REFSTIS_functions
    >>>import glob
    >>>import pyfits
    >>>filelist = glob.glob('*raw.fits')
    >>>dates = []
    >>>>for ifile in filelist: dates.append(pyfits.getval(ifile, 'texpstrt', 0))
    >>>print REFSTIS_functions.divide_anneal_month(min(dates), max(dates), database_path, N_period)
N_period is 4 for binaxis1 = 1, binaxis2 = 1, and gain = 1, for all other observations N_period is 2
This returns the anneal week boundaries as a list of tuples (start and end of each week). The first entry in the list and the last entry in the list correspond to the beginning and ending of the anneal month.
  1. Retrieve all darks and biases corresponding to your binaxis1, binaxis2, and gain and put the darks in the dark folder and the biases in the bias folder
  2. Set lref environment variable
  3. Run cte_correction_pipeline:
 $python cte_correction_pipeline.py
⚠️ **GitHub.com Fallback** ⚠️