Skip to content

jsulli27/tilsotua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reverse Autoslit Code: TILSOTUA

This code calculates the WCS positions of slits within slitmasks designed for the Low-Resolution Imaging Spectrograph (LRIS) on the Keck I telescope.

Overview

This code uses the slit coordinates used with the UCO/Lick milling machine to produce the slit masks, reversing the steps taken by the autoslit3 code employed by the original slitmask designers to calculate the WCS coordinates of the slits. These milling machine-specific slit vertices are held in FITS files created as an archive of slit designs by UCO/Lick or within the output files produced by autoslit (specifically the .file3 files). After reconstructing the slit WCS positions used by the original mask designers, the code also attempts a final astrometric correction (a simple shift) based on a comparison of the alignment star slits with the Gaia survey. (This correction can be turned off.)

These final WCS coordinates for the slits are recorded and output to a file, where they can then be used with the archive of LRIS observations.

Installation

Clone the GitHub repository with:

    git clone https://github.com/jsulli27/tilsotua.git

Change to the package directory and run:

    cd tilsotua/
    pip install .

Using the Code

The standard way to run the code on a given mask FITS file is:

    from tilsotua import xytowcs

    xytowcs(maskfilename,outputfilename)

The code needs an input FITS file or autoslit output file containing the mask information (the maskfilename variable). The FITS files for this purpose must be in the format used by the UCO/Lick archive. These have multiple extensions, each containing a specific table. The code uses this structure to grab the mask information.

The outputfilename variable will serve as the base for the four output files produced by the code.

Note on Astrometric (Shift) Correction

The code defaults to using the Gaia catalog to calculate a correction to bring the slit positions into agreement with modern astrometry. There code does allow for use of the PanSTARRS catalog or a custom catalog of objects if the Gaia catalog

Code Outputs

The code outputs four files: an updated FITS file, a CSV file, a PDF file, and a DS9 region file.

The updated FITS file is a copy of the original mask FITS file with the previously blank columns meant to record the slit center RA and slit center Dec positions filled in.

The PDF is the quick look plot generated by the code that shows the mask slit positions on the full mask field as well as zoomed in images of up to 6 alignment boxes with Gaia catalog objects used to correct the mask astrometry marked.

The CSV file contains the original coordinates of the slit corners in the mask coordinate frame, the calculated WCS positions of the slit corners, the slit center positions in both coordinate frames, and the coordinates of the Gaia catalog objects selected to go in the alignment boxes (zeros are recorded for non alignment box slits).

The DS9 region file contains the final slit positions for use in DS9.

Other Useful information

LRIS_Mask_Coords_to_WCS.py contains the main function, which begins by reading the FITS file information and ends with writing the output files.

astrometrycorrection.py contains the routine for the distortion correction at the LRIS focal plane.

precessionoutine.py and refractioncorrection.py contain the precession and refraction routines adapted from autoslit3.

find_shifts.py contains the function for finding the astrometry correction (shift) based on Gaia catalog object positions.

create_err_plot.py contains the function for writing the quick look plot.

The version of autoslit3 originally used to create the mask will affect the plate scale assumed when designing the mask due to the Atmospheric Dispersion Corrector (ADC) being installed. Our code makes a general cut on whether the pre or post-ADC plate scale was used based on the mask design date (masks designed prior to August 2007 are assumed to be pre-ADC). This can be manually changed if needed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages