Skip to content

Commit

Permalink
Merge pull request #1559 from pypeit/lris_docs_fix
Browse files Browse the repository at this point in the history
merging.
  • Loading branch information
SunilSimha authored Mar 10, 2023
2 parents 149cf4b + 12d57ab commit 8d97dbc
Showing 1 changed file with 36 additions and 9 deletions.
45 changes: 36 additions & 9 deletions doc/spectrographs/lris.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,16 +180,16 @@ processing with PypeIt if they are desirous of incorporating
the abovementioned features into their reduction.
Here are the steps to do so:

#. Obtain the mask design files. The design files can be in one of two forms:
#. Obtain the mask design files. The design files include:

#. The AUTOSLIT-generated mask design files (those with the ".file3" extension).
#. The AUTOSLIT-generated mask design files.
#. One file with the ".file3" extension containing milling information.
#. One file with the ".file1" extension containing the object catalog corresponding to the mask slits.
#. The ASCII object list file fed as input to AUTOSLIT to generate the files above.

#. FITS files of the mask designs from UCO/Lick: As of 2022 Jan 27th, when
the AUTOSLIT mask design files (ascii files that end with ".file3" by
default) are fed to the slitmask database, a FITS file is generated with
the milling blueprint. The FITS files have HDUs akin to DEIMOS raw files
(sans the raw image of course). Please contact Steve Allen of UCO/Lick
(UCSC) to procure these files.
".file3" is mandatory while the other two files can be optionally excluded to debug
`TILSOTUA
<https://github.com/jsulli27/tilsotua>`__.

#. Process the design files with `TILSOTUA
<https://github.com/jsulli27/tilsotua>`__ : The design files contain the
Expand All @@ -205,8 +205,22 @@ Here are the steps to do so:

.. code-block:: python
xytowcs(input_file_name,output_file_base)
xytowcs(input_file_name="yourmaskname.file3",output_file_base="yourmaskname_output.fits")
Replace
#. The `ObjectCat` and `SlitObjMap` are only populated if ".file1" and the object list are provided.
e.g.

.. code-block:: python
xytowcs(input_file_name="yourmaskname.file3",output_file_base="yourmaskname_output.fits",
obj_file="yourtargets.obj", file1="yourmaskname.file1")
It is assumed that the entries in `file1` and `obj_file` have unique `Name` values. i.e. Make
sure you have a unique identifier for each object. Without this, it is not possible to correctly
reconcile the two tables.

#. Append TILSOTUA's output to your raw trace files: Once the user is satisfied
with the processed FITS file from TILSOTUA, append the binary tables to the
trace FITS files. The user must first verify that TILSOTUA has indeed
Expand All @@ -216,6 +230,19 @@ Here are the steps to do so:

#. TILSOTUA has estimated the `TopDist` and `BotDist` in the `SlitObjMap` table correctly.

One may append the binary tables from the outputs as additional `HDUs` in the LRIS trace files. e.g.

.. code-block:: python
from astropy.io import fits
tracehdus = fits.open("trace_rawframe.fits")
autoslithdus = fits.open("yourmaskname_output.fits")
for hdu in autoslithdus[1:]:
tracehdus.append(hdu)
tracehdus.writeto("trace_with_maskinfo.fits")
If processed correctly, PypeIt should now fully utilize its
arsenal of slitmask processing tools to reduce and coadd spectra
with the WCS information incorporated.
Expand Down

0 comments on commit 8d97dbc

Please sign in to comment.