Skip to content

Commit

Permalink
doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kbwestfall committed Aug 15, 2023
1 parent 9ed1808 commit 270f886
Show file tree
Hide file tree
Showing 8 changed files with 94 additions and 72 deletions.
2 changes: 2 additions & 0 deletions doc/calibrations/calibrations.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

.. include:: ../include/links.rst

.. _calibrations:

============
Expand Down
20 changes: 13 additions & 7 deletions doc/calibrations/wave_calib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -270,13 +270,19 @@ grating equation.

In general, the approach is:

1. Identify the arc lines in each order
2. Fit the arc lines in each order to a polynomial, individually
3. Fit a 2D solution to the lines using the order number as a basis
4. Reject orders where the RMS of the fit (measured in binned pixels) exceeds ``rms_threshold``
5. Attempt to recover the missing orders using the 2D fit and
a higher RMS threshold
6. Refit the 2D solution
#. Identify the arc lines in each order

#. Fit the arc lines in each order to a polynomial, individually

#. Fit a 2D solution to the lines using the order number as a basis

#. Reject orders where the RMS of the fit (measured in binned pixels)
exceeds ``rms_threshold``

#. Attempt to recover the missing orders using the 2D fit and a higher RMS
threshold

#. Refit the 2D solution

One should always inspect the outputs, especially the 2D solution
(global and orders). One may then need to modify the ``rms_threshold``
Expand Down
8 changes: 4 additions & 4 deletions doc/include/gemini_gnirs_echelle_A_corrected.pypeit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
# User-defined execution parameters
[rdx]
spectrograph = gemini_gnirs_echelle
[calibrations]
[[wavelengths]]
rms_threshold = 0.8, 0.4, 0.8, 0.8, 0.5, 0.9
sigdetect = 5.,5.,6.,6.,5.,7.
#[calibrations]
# [[wavelengths]]
# rms_threshold = 0.8, 0.4, 0.8, 0.8, 0.5, 0.9
# sigdetect = 5.,5.,6.,6.,5.,7.
# Setup
setup read
Expand Down
93 changes: 51 additions & 42 deletions doc/pypeit_par.rst

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions doc/spectrographs/spectrographs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ instrument-specific details for running PypeIt.
gemini_gnirs
gtc_osiris
deimos
keck_hires
keck_kcwi
lris
keck_nires
Expand Down
6 changes: 3 additions & 3 deletions doc/spectrographs/xshooter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ FWHM

For the UVB or the VIS, you may turn off measuring the FWHM (in units
of binned pixdels) from the arc lines
by adding this to your :doc:`pypeit_file`:
by adding this to your :ref:`pypeit_file`:


.. code-block:: ini
Expand All @@ -46,7 +46,7 @@ RMS
---

Another option is to increase the RMS threshold for a good solution.
This may be done in the :doc:`pypeit_file` as well:
This may be done in the :ref:`pypeit_file` as well:

.. code-block:: ini
Expand All @@ -56,5 +56,5 @@ This may be done in the :doc:`pypeit_file` as well:
Note that this is scaled by the ratio of the measured FWHM value
to the default value. See :ref:`_wvcalib-echelle` for
to the default value. See :ref:`wvcalib-echelle` for
further details.
2 changes: 2 additions & 0 deletions pypeit/core/wavecal/patterns.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
""" Module for finding patterns in arc line spectra
.. include:: ../include/links.rst
"""
import numpy as np
import scipy.ndimage
Expand Down
34 changes: 18 additions & 16 deletions pypeit/wavecalib.py
Original file line number Diff line number Diff line change
Expand Up @@ -862,23 +862,25 @@ def echelle_2dfit(self, wv_calib, debug=False, skip_QA=False):
Primarily a wrapper for :func:`pypeit.core.arc.fit2darc`,
using data unpacked from the ``wv_calib`` dictionary.
Args:
wv_calib (:class:`pypeit.wavecalib.WaveCalib`):
Wavelength calibration object
debug (:obj:`bool`, optional):
Show debugging info
skip_QA (:obj:`bool`, optional):
Flag to skip construction of the nominal QA plots.
Parameters
----------
wv_calib : :class:`pypeit.wavecalib.WaveCalib`
Wavelength calibration object
debug : :obj:`bool`, optional
Show debugging info
skip_QA : :obj:`bool`, optional
Flag to skip construction of the nominal QA plots.
Returns:
tuple:
- ``fit2ds``: a list of :class:`pypeit.fitting.PypeItFit`: objects
containing information from 2-d fit. Frequently a list of 1 fit.
The main exception is for a mosaic when one sets ``echelle_separate_2d=True``.
- ``dets``: a list of integers for the detector numbers.
- ``order_dets``: a list of integer lists providing list of the orders.
Returns
-------
fit2ds : list of :class:`pypeit.fitting.PypeItFit`
Contains information from 2-d fit. Frequently a list of 1 fit. The
main exception is for a mosaic when one sets
``echelle_separate_2d=True``.
dets : list
List of integers for the detector numbers.
save_order_dets: list
List of integer lists providing list of the orders.
"""
if self.spectrograph.pypeline != 'Echelle':
msgs.error('Cannot execute echelle_2dfit for a non-echelle spectrograph.')
Expand Down

0 comments on commit 270f886

Please sign in to comment.