From 77cf107080f154491072e5ce75cc618ffba5d36a Mon Sep 17 00:00:00 2001 From: rcooke Date: Wed, 2 Oct 2024 13:16:48 +0100 Subject: [PATCH] updated flexure docs --- doc/calibrations/flexure.rst | 22 ++- doc/calibrations/image_proc.rst | 4 +- doc/help/run_pypeit.rst | 2 +- doc/include/class_datamodel_pypeitimage.rst | 2 +- doc/include/datamodel_arcimage.rst | 2 +- doc/include/datamodel_biasimage.rst | 2 +- doc/include/datamodel_darkimage.rst | 2 +- doc/include/datamodel_tiltimage.rst | 2 +- doc/include/gemini_gnirs_echelle_A.pypeit.rst | 4 +- doc/include/imgproc_defaults_table.rst | 38 ++--- doc/include/keck_deimos.sorted.rst | 6 +- doc/include/keck_deimos_A.pypeit.rst | 4 +- doc/include/keck_nires_A.pypeit.rst | 4 +- doc/include/shane_kast_blue_A.pypeit.rst | 4 +- doc/pypeit_par.rst | 160 +++++++++--------- doc/scripts/build_imgproc_defaults.py | 2 +- 16 files changed, 135 insertions(+), 125 deletions(-) diff --git a/doc/calibrations/flexure.rst b/doc/calibrations/flexure.rst index c75e3c31de..a53f8b4627 100644 --- a/doc/calibrations/flexure.rst +++ b/doc/calibrations/flexure.rst @@ -26,12 +26,22 @@ Spatial Flexure The code has a simple yet relatively robust method to cross-correlate the slits against any input image to determine a rigid, spatial offset. This algorithm is performed for any frame type by setting -``spat_flexure_correct = True`` in the ``process`` block -of :ref:`processimagespar`. +``spat_flexure_method = `` in the ``process`` block +of :ref:`processimagespar`, where you should replace ```` with one of the +following valid methods: +``skip`` - this will skip the spatial flexure correction +``detector`` - this will calculate one spatial flexure value for all slits on the detector +``slit`` - this will calculate the spatial flexure for each slit separately +``edge`` - this will calculate the spatial flexure for each slit edge separately We have made our own determinations for which instruments to enable this as the default. Inspect the :ref:`instr_par` list to see if your instrument is included -(search for the value of ``spat_flexure_correct``). +(search for the value of ``spat_flexure_method``). We recommend that you use the +``detector`` method for most instruments, unless you have good reason to believe +that the spatial flexure is different for different slits or slit edges. Also note +that some spectrographs post-process the spatial flexure values when using the ``slit`` +or ``edge`` methods (e.g. perform a linear fit to the spatial flexure values) to improve +the result. Consult the documentation for your instrument to see if this is the case. Depending on what frame types you choose to correct, the code will behave somewhat differently. Here we describe @@ -49,11 +59,11 @@ add this to your PypeIt file: [scienceframe] [[process]] - spat_flexure_correct = True + spat_flexure_method = detector [calibrations] [[standardframe]] [[[process]]] - spat_flexure_correct = True + spat_flexure_method = detector This will: @@ -75,7 +85,7 @@ following to your :doc:`../pypeit_file`: [calibrations] [[tiltframe]] [[[process]]] - spat_flexure_correct = True + spat_flexure_method = detector This will: diff --git a/doc/calibrations/image_proc.rst b/doc/calibrations/image_proc.rst index b80caecf80..b6785573e0 100644 --- a/doc/calibrations/image_proc.rst +++ b/doc/calibrations/image_proc.rst @@ -288,8 +288,8 @@ Spatial Flexure Shift A spatial shift in the slit positions due to instrument flexure is calculated using :func:`~pypeit.core.flexure.spat_flexure_shift` if the -``spat_flexure_correct`` parameter is true. See :ref:`flexure` for additional -discussion. +``spat_flexure_method`` parameter is set to an option other than ``skip``. +See :ref:`flexure` for additional discussion. Flat-fielding ------------- diff --git a/doc/help/run_pypeit.rst b/doc/help/run_pypeit.rst index 77d8e84bbc..24424bd4c4 100644 --- a/doc/help/run_pypeit.rst +++ b/doc/help/run_pypeit.rst @@ -4,7 +4,7 @@ usage: run_pypeit [-h] [-v VERBOSITY] [-r REDUX_PATH] [-m] [-s] [-o] [-c] pypeit_file - ## PypeIt : The Python Spectroscopic Data Reduction Pipeline v1.16.1.dev468+g832ee84e4 + ## PypeIt : The Python Spectroscopic Data Reduction Pipeline v1.15.1.dev38+g075fdecaa.d20240212 ## ## Available spectrographs include: ## aat_uhrf, bok_bc, gemini_flamingos1, gemini_flamingos2, diff --git a/doc/include/class_datamodel_pypeitimage.rst b/doc/include/class_datamodel_pypeitimage.rst index be505a3a30..ecc344bfab 100644 --- a/doc/include/class_datamodel_pypeitimage.rst +++ b/doc/include/class_datamodel_pypeitimage.rst @@ -1,5 +1,5 @@ -**Version**: 1.3.0 +**Version**: 1.3.1 ================ =================================================================================================== ================= ================================================================================================================================================================================================================================ Attribute Type Array Type Description diff --git a/doc/include/datamodel_arcimage.rst b/doc/include/datamodel_arcimage.rst index 513d279776..221c8887a8 100644 --- a/doc/include/datamodel_arcimage.rst +++ b/doc/include/datamodel_arcimage.rst @@ -1,5 +1,5 @@ -Version 1.3.0 +Version 1.3.1 ================ ============================== ========= ================================================================================================================================================ HDU Name HDU Type Data Type Description diff --git a/doc/include/datamodel_biasimage.rst b/doc/include/datamodel_biasimage.rst index fcc54ad6c9..a9710f5d4b 100644 --- a/doc/include/datamodel_biasimage.rst +++ b/doc/include/datamodel_biasimage.rst @@ -1,5 +1,5 @@ -Version 1.3.0 +Version 1.3.1 ================= ============================== ========= ================================================================================================================================================ HDU Name HDU Type Data Type Description diff --git a/doc/include/datamodel_darkimage.rst b/doc/include/datamodel_darkimage.rst index 787919fc75..e56057a0fb 100644 --- a/doc/include/datamodel_darkimage.rst +++ b/doc/include/datamodel_darkimage.rst @@ -1,5 +1,5 @@ -Version 1.3.0 +Version 1.3.1 ================= ============================== ========= ================================================================================================================================================ HDU Name HDU Type Data Type Description diff --git a/doc/include/datamodel_tiltimage.rst b/doc/include/datamodel_tiltimage.rst index 55189a8428..abf90e427f 100644 --- a/doc/include/datamodel_tiltimage.rst +++ b/doc/include/datamodel_tiltimage.rst @@ -1,5 +1,5 @@ -Version 1.3.0 +Version 1.3.1 ================= ============================== ========= ================================================================================================================================================ HDU Name HDU Type Data Type Description diff --git a/doc/include/gemini_gnirs_echelle_A.pypeit.rst b/doc/include/gemini_gnirs_echelle_A.pypeit.rst index 996d0ea8ad..9f67b44af5 100644 --- a/doc/include/gemini_gnirs_echelle_A.pypeit.rst +++ b/doc/include/gemini_gnirs_echelle_A.pypeit.rst @@ -1,7 +1,7 @@ .. code-block:: console - # Auto-generated PypeIt input file using PypeIt version: 1.16.0 - # UTC 2024-06-11T08:31:55 + # Auto-generated PypeIt input file using PypeIt version: 1.15.1.dev38+g075fdecaa.d20240212 + # UTC 2024-10-02T12:11:46.067+00:00 # User-defined execution parameters [rdx] diff --git a/doc/include/imgproc_defaults_table.rst b/doc/include/imgproc_defaults_table.rst index 190a256e99..bbeb19e0f6 100644 --- a/doc/include/imgproc_defaults_table.rst +++ b/doc/include/imgproc_defaults_table.rst @@ -1,19 +1,19 @@ -======================== ========= ========= ========= ========= ========= ========= ========= ============= ============= ======== ============ =========== -Parameter Default ``bias`` ``dark`` ``trace`` ``arc`` ``tilt`` ``align`` ``pixelflat`` ``illumflat`` ``sky`` ``standard`` ``science`` -======================== ========= ========= ========= ========= ========= ========= ========= ============= ============= ======== ============ =========== -``apply_gain`` ``True`` -``use_pattern`` ``False`` -``empirical_rn`` ``False`` -``use_overscan`` ``True`` -``trim`` ``True`` -``orient`` ``True`` -``use_biasimage`` ``True`` ``False`` -``use_darkimage`` ``False`` -``spat_flexure_correct`` ``none`` -``use_pixelflat`` ``True`` ``False`` ``False`` ``False`` ``False`` ``False`` ``False`` ``False`` ``False`` -``use_illumflat`` ``True`` ``False`` ``False`` ``False`` ``False`` ``False`` ``False`` ``False`` ``False`` -``use_specillum`` ``False`` -``shot_noise`` ``True`` ``False`` -``noise_floor`` ``0.0`` ``0.01`` ``0.01`` ``0.01`` -``mask_cr`` ``False`` ``True`` ``True`` ``True`` ``True`` -======================== ========= ========= ========= ========= ========= ========= ========= ============= ============= ======== ============ =========== +======================= ========= ========= ========= ========= ========= ========= ========= ============= ============= ======== ============ =========== +Parameter Default ``bias`` ``dark`` ``trace`` ``arc`` ``tilt`` ``align`` ``pixelflat`` ``illumflat`` ``sky`` ``standard`` ``science`` +======================= ========= ========= ========= ========= ========= ========= ========= ============= ============= ======== ============ =========== +``apply_gain`` ``True`` +``use_pattern`` ``False`` +``empirical_rn`` ``False`` +``use_overscan`` ``True`` +``trim`` ``True`` +``orient`` ``True`` +``use_biasimage`` ``True`` ``False`` +``use_darkimage`` ``False`` +``spat_flexure_method`` ``skip`` +``use_pixelflat`` ``True`` ``False`` ``False`` ``False`` ``False`` ``False`` ``False`` ``False`` ``False`` +``use_illumflat`` ``True`` ``False`` ``False`` ``False`` ``False`` ``False`` ``False`` ``False`` ``False`` +``use_specillum`` ``False`` +``shot_noise`` ``True`` ``False`` +``noise_floor`` ``0.0`` ``0.01`` ``0.01`` ``0.01`` +``mask_cr`` ``False`` ``True`` ``True`` ``True`` ``True`` +======================= ========= ========= ========= ========= ========= ========= ========= ============= ============= ======== ============ =========== diff --git a/doc/include/keck_deimos.sorted.rst b/doc/include/keck_deimos.sorted.rst index 828519122f..655eedb3a6 100644 --- a/doc/include/keck_deimos.sorted.rst +++ b/doc/include/keck_deimos.sorted.rst @@ -14,13 +14,13 @@ d0527_0030.fits.gz | arc,tilt | 57.99999999999999 | 45.0 | DOME PHLAT | 830G | LongMirr | 1,1 | 57900.077631 | 1.41291034 | 1.0 | 8099.98291016 | SINGLE:B | OG550 | Kr Xe Ar Ne | 2017-05-27 | 01:51:53.87 | 30 | 0 d0527_0031.fits.gz | pixelflat,illumflat,trace | 57.99999999999999 | 45.0 | DOME PHLAT | 830G | LongMirr | 1,1 | 57900.07851 | 1.41291034 | 4.0 | 8099.98291016 | SINGLE:B | OG550 | Qz | 2017-05-27 | 01:53:10.93 | 31 | 0 DE.20170527.06790.fits | pixelflat,illumflat,trace | 57.99999999999999 | 45.0 | DOME PHLAT | 830G | LongMirr | 1,1 | 57900.07851 | 1.41291034 | 4.0 | 8099.98291016 | SINGLE:B | OG550 | Qz | 2017-05-27 | 01:53:10.93 | 31 | 0 - DE.20170527.06864.fits | pixelflat,illumflat,trace | 57.99999999999999 | 45.0 | DOME PHLAT | 830G | LongMirr | 1,1 | 57900.079356 | 1.41291034 | 4.0 | 8099.98291016 | SINGLE:B | OG550 | Qz | 2017-05-27 | 01:54:24.03 | 32 | 0 d0527_0032.fits.gz | pixelflat,illumflat,trace | 57.99999999999999 | 45.0 | DOME PHLAT | 830G | LongMirr | 1,1 | 57900.079356 | 1.41291034 | 4.0 | 8099.98291016 | SINGLE:B | OG550 | Qz | 2017-05-27 | 01:54:24.03 | 32 | 0 - d0527_0033.fits.gz | pixelflat,illumflat,trace | 57.99999999999999 | 45.0 | DOME PHLAT | 830G | LongMirr | 1,1 | 57900.080211 | 1.41291034 | 4.0 | 8099.98291016 | SINGLE:B | OG550 | Qz | 2017-05-27 | 01:55:36.93 | 33 | 0 + DE.20170527.06864.fits | pixelflat,illumflat,trace | 57.99999999999999 | 45.0 | DOME PHLAT | 830G | LongMirr | 1,1 | 57900.079356 | 1.41291034 | 4.0 | 8099.98291016 | SINGLE:B | OG550 | Qz | 2017-05-27 | 01:54:24.03 | 32 | 0 DE.20170527.06936.fits | pixelflat,illumflat,trace | 57.99999999999999 | 45.0 | DOME PHLAT | 830G | LongMirr | 1,1 | 57900.080211 | 1.41291034 | 4.0 | 8099.98291016 | SINGLE:B | OG550 | Qz | 2017-05-27 | 01:55:36.93 | 33 | 0 + d0527_0033.fits.gz | pixelflat,illumflat,trace | 57.99999999999999 | 45.0 | DOME PHLAT | 830G | LongMirr | 1,1 | 57900.080211 | 1.41291034 | 4.0 | 8099.98291016 | SINGLE:B | OG550 | Qz | 2017-05-27 | 01:55:36.93 | 33 | 0 DE.20170527.37601.fits | science | 261.0363749999999 | 19.028166666666667 | P261_OFF | 830G | LongMirr | 1,1 | 57900.435131 | 1.03078874 | 1200.0 | 8099.98291016 | SINGLE:B | OG550 | Off | 2017-05-27 | 10:26:41.61 | 80 | 0 - d0527_0081.fits.gz | science | 261.0363749999999 | 19.028166666666667 | P261_OFF | 830G | LongMirr | 1,1 | 57900.449842 | 1.01267696 | 1200.0 | 8099.98291016 | SINGLE:B | OG550 | Off | 2017-05-27 | 10:47:52.92 | 81 | 0 DE.20170527.38872.fits | science | 261.0363749999999 | 19.028166666666667 | P261_OFF | 830G | LongMirr | 1,1 | 57900.449842 | 1.01267696 | 1200.0 | 8099.98291016 | SINGLE:B | OG550 | Off | 2017-05-27 | 10:47:52.92 | 81 | 0 + d0527_0081.fits.gz | science | 261.0363749999999 | 19.028166666666667 | P261_OFF | 830G | LongMirr | 1,1 | 57900.449842 | 1.01267696 | 1200.0 | 8099.98291016 | SINGLE:B | OG550 | Off | 2017-05-27 | 10:47:52.92 | 81 | 0 DE.20170527.41775.fits | science | 261.0362916666666 | 19.028888888888886 | P261_OFF | 830G | LongMirr | 1,1 | 57900.483427 | 1.00093023 | 1200.0 | 8099.98291016 | SINGLE:B | OG550 | Off | 2017-05-27 | 11:36:15.35 | 83 | 0 d0527_0083.fits.gz | science | 261.0362916666666 | 19.028888888888886 | P261_OFF | 830G | LongMirr | 1,1 | 57900.483427 | 1.00093023 | 1200.0 | 8099.98291016 | SINGLE:B | OG550 | Off | 2017-05-27 | 11:36:15.35 | 83 | 0 DE.20170527.43045.fits | science | 261.0362916666666 | 19.028888888888886 | P261_OFF | 830G | LongMirr | 1,1 | 57900.498135 | 1.00838805 | 1200.0 | 8099.98291016 | SINGLE:B | OG550 | Off | 2017-05-27 | 11:57:25.35 | 84 | 0 diff --git a/doc/include/keck_deimos_A.pypeit.rst b/doc/include/keck_deimos_A.pypeit.rst index ba4dae4c2b..a2a9ecca04 100644 --- a/doc/include/keck_deimos_A.pypeit.rst +++ b/doc/include/keck_deimos_A.pypeit.rst @@ -1,7 +1,7 @@ .. code-block:: console - # Auto-generated PypeIt input file using PypeIt version: 1.16.0 - # UTC 2024-06-11T08:31:55 + # Auto-generated PypeIt input file using PypeIt version: 1.15.1.dev38+g075fdecaa.d20240212 + # UTC 2024-10-02T12:11:45.568+00:00 # User-defined execution parameters [rdx] diff --git a/doc/include/keck_nires_A.pypeit.rst b/doc/include/keck_nires_A.pypeit.rst index d50c6ffb58..b5129b39c9 100644 --- a/doc/include/keck_nires_A.pypeit.rst +++ b/doc/include/keck_nires_A.pypeit.rst @@ -1,7 +1,7 @@ .. code-block:: console - # Auto-generated PypeIt input file using PypeIt version: 1.16.0 - # UTC 2024-06-11T08:31:55 + # Auto-generated PypeIt input file using PypeIt version: 1.15.1.dev38+g075fdecaa.d20240212 + # UTC 2024-10-02T12:11:46.443+00:00 # User-defined execution parameters [rdx] diff --git a/doc/include/shane_kast_blue_A.pypeit.rst b/doc/include/shane_kast_blue_A.pypeit.rst index 50fed58129..6c6900edd1 100644 --- a/doc/include/shane_kast_blue_A.pypeit.rst +++ b/doc/include/shane_kast_blue_A.pypeit.rst @@ -1,7 +1,7 @@ .. code-block:: console - # Auto-generated PypeIt input file using PypeIt version: 1.16.0 - # UTC 2024-06-11T08:31:55 + # Auto-generated PypeIt input file using PypeIt version: 1.15.1.dev38+g075fdecaa.d20240212 + # UTC 2024-10-02T12:11:39.981+00:00 # User-defined execution parameters [rdx] diff --git a/doc/pypeit_par.rst b/doc/pypeit_par.rst index d921969ecb..9d0316bcb2 100644 --- a/doc/pypeit_par.rst +++ b/doc/pypeit_par.rst @@ -592,21 +592,21 @@ Collate1DPar Keywords Class Instantiation: :class:`~pypeit.par.pypeitpar.Collate1DPar` -========================= =============== ======= ============================================ ================================================================================================================================================================================================================================================================================================================================================================================================================== -Key Type Options Default Description -========================= =============== ======= ============================================ ================================================================================================================================================================================================================================================================================================================================================================================================================== -``dry_run`` bool .. False If set, the script will display the matching File and Object Ids but will not flux, coadd or archive. -``exclude_serendip`` bool .. False Whether to exclude SERENDIP objects from collating. -``exclude_slit_trace_bm`` list, str .. A list of slit trace bitmask bits that should be excluded. -``flux`` bool .. False If set, the script will flux calibrate using archived sensfuncs before coadding. -``ignore_flux`` bool .. False If set, the script will only coadd non-fluxed spectra even if flux data is present. Otherwise fluxed spectra are coadded if all spec1ds have been fluxed calibrated. -``match_using`` str .. ``ra/dec`` Determines how 1D spectra are matched as being the same object. Must be either 'pixel' or 'ra/dec'. -``outdir`` str .. ``/Users/westfall/Work/packages/pypeit/doc`` The path where all coadded output files and report files will be placed. -``refframe`` str .. .. Perform reference frame correction prior to coadding. Options are: observed, heliocentric, barycentric -``spec1d_outdir`` str .. .. The path where all modified spec1d files are placed. These are only created if flux calibration or refframe correction are asked for. -``tolerance`` str, float, int .. 1.0 The tolerance used when comparing the coordinates of objects. If two objects are within this distance from each other, they are considered the same object. If match_using is 'ra/dec' (the default) this is an angular distance. The defaults units are arcseconds but other units supported by astropy.coordinates.Angle can be used (`e.g.`, '0.003d' or '0h1m30s'). If match_using is 'pixel' this is a float. -``wv_rms_thresh`` float .. .. If set, any objects with a wavelength RMS > this value are skipped, else all wavelength RMS values are accepted. -========================= =============== ======= ============================================ ================================================================================================================================================================================================================================================================================================================================================================================================================== +========================= =============== ======= ===================================== ================================================================================================================================================================================================================================================================================================================================================================================================================== +Key Type Options Default Description +========================= =============== ======= ===================================== ================================================================================================================================================================================================================================================================================================================================================================================================================== +``dry_run`` bool .. False If set, the script will display the matching File and Object Ids but will not flux, coadd or archive. +``exclude_serendip`` bool .. False Whether to exclude SERENDIP objects from collating. +``exclude_slit_trace_bm`` list, str .. A list of slit trace bitmask bits that should be excluded. +``flux`` bool .. False If set, the script will flux calibrate using archived sensfuncs before coadding. +``ignore_flux`` bool .. False If set, the script will only coadd non-fluxed spectra even if flux data is present. Otherwise fluxed spectra are coadded if all spec1ds have been fluxed calibrated. +``match_using`` str .. ``ra/dec`` Determines how 1D spectra are matched as being the same object. Must be either 'pixel' or 'ra/dec'. +``outdir`` str .. ``/Users/rcooke/Software/PypeIt/doc`` The path where all coadded output files and report files will be placed. +``refframe`` str .. .. Perform reference frame correction prior to coadding. Options are: observed, heliocentric, barycentric +``spec1d_outdir`` str .. .. The path where all modified spec1d files are placed. These are only created if flux calibration or refframe correction are asked for. +``tolerance`` str, float, int .. 1.0 The tolerance used when comparing the coordinates of objects. If two objects are within this distance from each other, they are considered the same object. If match_using is 'ra/dec' (the default) this is an angular distance. The defaults units are arcseconds but other units supported by astropy.coordinates.Angle can be used (`e.g.`, '0.003d' or '0h1m30s'). If match_using is 'pixel' this is a float. +``wv_rms_thresh`` float .. .. If set, any objects with a wavelength RMS > this value are skipped, else all wavelength RMS values are accepted. +========================= =============== ======= ===================================== ================================================================================================================================================================================================================================================================================================================================================================================================================== ---- @@ -659,22 +659,22 @@ ReduxPar Keywords Class Instantiation: :class:`~pypeit.par.pypeitpar.ReduxPar` -====================== ============== ======= ============================================ ========================================================================================================================================================================================================================================================================================================================================================================================================== -Key Type Options Default Description -====================== ============== ======= ============================================ ========================================================================================================================================================================================================================================================================================================================================================================================================== -``calwin`` int, float .. 0 The window of time in hours to search for calibration frames for a science frame -``chk_version`` bool .. True If True enforce strict PypeIt version checking to ensure that all files were created with the current version of PypeIt. If set to False, the code will attempt to read out-of-date files and keep going. Beware (!!) that this can lead to unforeseen bugs that either cause the code to crash or lead to erroneous results. I.e., you really need to know what you are doing if you set this to False! -``detnum`` int, list .. .. Restrict reduction to a list of detector indices. In case of mosaic reduction (currently only available for Gemini/GMOS and Keck/DEIMOS) ``detnum`` should be a list of tuples of the detector indices that are mosaiced together. E.g., for Gemini/GMOS ``detnum`` would be ``[(1,2,3)]`` and for Keck/DEIMOS it would be ``[(1, 5), (2, 6), (3, 7), (4, 8)]`` -``ignore_bad_headers`` bool .. False Ignore bad headers (NOT recommended unless you know it is safe). -``maskIDs`` str, int, list .. .. Restrict reduction to a set of slitmask IDs Example syntax -- ``maskIDs = 818006,818015`` This must be used with detnum (for now). -``qadir`` str .. ``QA`` Directory relative to calling directory to write quality assessment files. -``quicklook`` bool .. False Run a quick look reduction? This is usually good if you want to quickly reduce the data (usually at the telescope in real time) to get an initial estimate of the data quality. -``redux_path`` str .. ``/Users/westfall/Work/packages/pypeit/doc`` Path to folder for performing reductions. Default is the current working directory. -``scidir`` str .. ``Science`` Directory relative to calling directory to write science files. -``slitspatnum`` str, list .. .. Restrict reduction to a set of slit DET:SPAT values (closest slit is used). Example syntax -- slitspatnum = DET01:175,DET01:205 or MSC02:2234 If you are re-running the code, (i.e. modifying one slit) you *must* have the precise SPAT_ID index. -``sortroot`` str .. .. A filename given to output the details of the sorted files. If None, the default is the root name of the pypeit file. If off, no output is produced. -``spectrograph`` str .. .. Spectrograph that provided the data to be reduced. See :ref:`instruments` for valid options. -====================== ============== ======= ============================================ ========================================================================================================================================================================================================================================================================================================================================================================================================== +====================== ============== ======= ===================================== ========================================================================================================================================================================================================================================================================================================================================================================================================== +Key Type Options Default Description +====================== ============== ======= ===================================== ========================================================================================================================================================================================================================================================================================================================================================================================================== +``calwin`` int, float .. 0 The window of time in hours to search for calibration frames for a science frame +``chk_version`` bool .. True If True enforce strict PypeIt version checking to ensure that all files were created with the current version of PypeIt. If set to False, the code will attempt to read out-of-date files and keep going. Beware (!!) that this can lead to unforeseen bugs that either cause the code to crash or lead to erroneous results. I.e., you really need to know what you are doing if you set this to False! +``detnum`` int, list .. .. Restrict reduction to a list of detector indices. In case of mosaic reduction (currently only available for Gemini/GMOS and Keck/DEIMOS) ``detnum`` should be a list of tuples of the detector indices that are mosaiced together. E.g., for Gemini/GMOS ``detnum`` would be ``[(1,2,3)]`` and for Keck/DEIMOS it would be ``[(1, 5), (2, 6), (3, 7), (4, 8)]`` +``ignore_bad_headers`` bool .. False Ignore bad headers (NOT recommended unless you know it is safe). +``maskIDs`` str, int, list .. .. Restrict reduction to a set of slitmask IDs Example syntax -- ``maskIDs = 818006,818015`` This must be used with detnum (for now). +``qadir`` str .. ``QA`` Directory relative to calling directory to write quality assessment files. +``quicklook`` bool .. False Run a quick look reduction? This is usually good if you want to quickly reduce the data (usually at the telescope in real time) to get an initial estimate of the data quality. +``redux_path`` str .. ``/Users/rcooke/Software/PypeIt/doc`` Path to folder for performing reductions. Default is the current working directory. +``scidir`` str .. ``Science`` Directory relative to calling directory to write science files. +``slitspatnum`` str, list .. .. Restrict reduction to a set of slit DET:SPAT values (closest slit is used). Example syntax -- slitspatnum = DET01:175,DET01:205 or MSC02:2234 If you are re-running the code, (i.e. modifying one slit) you *must* have the precise SPAT_ID index. +``sortroot`` str .. .. A filename given to output the details of the sorted files. If None, the default is the root name of the pypeit file. If off, no output is produced. +``spectrograph`` str .. .. Spectrograph that provided the data to be reduced. See :ref:`instruments` for valid options. +====================== ============== ======= ===================================== ========================================================================================================================================================================================================================================================================================================================================================================================================== ---- @@ -874,45 +874,45 @@ ProcessImagesPar Keywords Class Instantiation: :class:`~pypeit.par.pypeitpar.ProcessImagesPar` -======================== ================================================ =================================================================== ============================= ======================================================================================================================================================================================================================================================================================================================================================================================== -Key Type Options Default Description -======================== ================================================ =================================================================== ============================= ======================================================================================================================================================================================================================================================================================================================================================================================== -``apply_gain`` bool .. True Convert the ADUs to electrons using the detector gain -``clip`` bool .. True Perform sigma clipping when combining. Only used with combine=mean -``comb_sigrej`` float .. .. Sigma-clipping level for when clip=True; Use None for automatic limit (recommended). -``combine`` str ``median``, ``mean`` ``mean`` Method used to combine multiple frames. Options are: median, mean -``correct_nonlinear`` list .. .. Correct for non-linear response of the detector. If None, no correction is performed. If a list, then the list should be the non-linear correction parameter (alpha), where the functional form is given by Ct = Cm (1 + alpha x Cm), with Ct and Cm the true and measured counts. This parameter is usually hard-coded for a given spectrograph, and should otherwise be left as None. -``dark_expscale`` bool .. False If designated dark frames are used and have a different exposure time than the science frames, scale the counts by the by the ratio in the exposure times to adjust the dark counts for the difference in exposure time. WARNING: You should always take dark frames that have the same exposure time as your science frames, so use this option with care! -``empirical_rn`` bool .. False If True, use the standard deviation in the overscan region to measure an empirical readnoise to use in the noise model. -``grow`` int, float .. 1.5 Factor by which to expand regions with cosmic rays detected by the LA cosmics routine. -``lamaxiter`` int .. 1 Maximum number of iterations for LA cosmics routine. -``mask_cr`` bool .. False Identify CRs and mask them -``n_lohi`` list .. 0, 0 Number of pixels to reject at the lowest and highest ends of the distribution; i.e., n_lohi = low, high. Use None for no limit. -``noise_floor`` float .. 0.0 Impose a noise floor by adding the provided fraction of the bias- and dark-subtracted electron counts to the error budget. E.g., a value of 0.01 means that the S/N of the counts in the image will never be greater than 100. -``objlim`` int, float .. 3.0 Object detection limit in LA cosmics routine -``orient`` bool .. True Orient the raw image into the PypeIt frame -``overscan_method`` str ``chebyshev``, ``polynomial``, ``savgol``, ``median``, ``odd_even`` ``savgol`` Method used to fit the overscan. Options are: chebyshev, polynomial, savgol, median, odd_even Note: Method "polynomial" is identical to "chebyshev"; the former is deprecated and will be removed. -``overscan_par`` int, list .. 5, 65 Parameters for the overscan subtraction. For 'chebyshev' or 'polynomial', set overcan_par = order; for 'savgol', set overscan_par = order, window size ; for 'median', set overscan_par = None or omit the keyword. -``rmcompact`` bool .. True Remove compact detections in LA cosmics routine -``satpix`` str ``reject``, ``force``, ``nothing`` ``reject`` Handling of saturated pixels. Options are: reject, force, nothing -``scale_to_mean`` bool .. False If True, scale the input images to have the same mean before combining. -``scattlight`` :class:`~pypeit.par.pypeitpar.ScatteredLightPar` .. `ScatteredLightPar Keywords`_ Scattered light subtraction parameters. -``shot_noise`` bool .. True Use the bias- and dark-subtracted image to calculate and include electron count shot noise in the image processing error budget -``sigclip`` int, float .. 4.5 Sigma level for rejection in LA cosmics routine -``sigfrac`` int, float .. 0.3 Fraction for the lower clipping threshold in LA cosmics routine. -``spat_flexure_correct`` str ``none``, ``detector``, ``slit``, ``edge`` ``none`` Correct slits, illumination flat, etc. for spatial flexure. Options are: none, detector, slit, edge"none" means no correction is performed. "detector" means that a single shift is applied to all slits. "slit" means that each slit is shifted independently."edge" means that each slit edge is shifted independently. -``spat_flexure_maxlag`` int .. 20 Maximum of possible spatial flexure correction, in pixels -``subtract_continuum`` bool .. False Subtract off the continuum level from an image. This parameter should only be set to True to combine arcs with multiple different lamps. For all other cases, this parameter should probably be False. -``subtract_scattlight`` bool .. False Subtract off the scattered light from an image. This parameter should only be set to True for spectrographs that have dedicated methods to subtract scattered light. For all other cases, this parameter should be False. -``trim`` bool .. True Trim the image to the detector supplied region -``use_biasimage`` bool .. True Use a bias image. If True, one or more must be supplied in the PypeIt file. -``use_darkimage`` bool .. False Subtract off a dark image. If True, one or more darks must be provided. -``use_illumflat`` bool .. True Use the illumination flat to correct for the illumination profile of each slit. -``use_overscan`` bool .. True Subtract off the overscan. Detector *must* have one or code will crash. -``use_pattern`` bool .. False Subtract off a detector pattern. This pattern is assumed to be sinusoidal along one direction, with a frequency that is constant across the detector. -``use_pixelflat`` bool .. True Use the pixel flat to make pixel-level corrections. A pixelflat image must be provied. -``use_specillum`` bool .. False Use the relative spectral illumination profiles to correct the spectral illumination profile of each slit. This is primarily used for slicer IFUs. To use this, you must set ``slit_illum_relative=True`` in the ``flatfield`` parameter set! -======================== ================================================ =================================================================== ============================= ======================================================================================================================================================================================================================================================================================================================================================================================== +======================= ================================================ =================================================================== ============================= ======================================================================================================================================================================================================================================================================================================================================================================================== +Key Type Options Default Description +======================= ================================================ =================================================================== ============================= ======================================================================================================================================================================================================================================================================================================================================================================================== +``apply_gain`` bool .. True Convert the ADUs to electrons using the detector gain +``clip`` bool .. True Perform sigma clipping when combining. Only used with combine=mean +``comb_sigrej`` float .. .. Sigma-clipping level for when clip=True; Use None for automatic limit (recommended). +``combine`` str ``median``, ``mean`` ``mean`` Method used to combine multiple frames. Options are: median, mean +``correct_nonlinear`` list .. .. Correct for non-linear response of the detector. If None, no correction is performed. If a list, then the list should be the non-linear correction parameter (alpha), where the functional form is given by Ct = Cm (1 + alpha x Cm), with Ct and Cm the true and measured counts. This parameter is usually hard-coded for a given spectrograph, and should otherwise be left as None. +``dark_expscale`` bool .. False If designated dark frames are used and have a different exposure time than the science frames, scale the counts by the by the ratio in the exposure times to adjust the dark counts for the difference in exposure time. WARNING: You should always take dark frames that have the same exposure time as your science frames, so use this option with care! +``empirical_rn`` bool .. False If True, use the standard deviation in the overscan region to measure an empirical readnoise to use in the noise model. +``grow`` int, float .. 1.5 Factor by which to expand regions with cosmic rays detected by the LA cosmics routine. +``lamaxiter`` int .. 1 Maximum number of iterations for LA cosmics routine. +``mask_cr`` bool .. False Identify CRs and mask them +``n_lohi`` list .. 0, 0 Number of pixels to reject at the lowest and highest ends of the distribution; i.e., n_lohi = low, high. Use None for no limit. +``noise_floor`` float .. 0.0 Impose a noise floor by adding the provided fraction of the bias- and dark-subtracted electron counts to the error budget. E.g., a value of 0.01 means that the S/N of the counts in the image will never be greater than 100. +``objlim`` int, float .. 3.0 Object detection limit in LA cosmics routine +``orient`` bool .. True Orient the raw image into the PypeIt frame +``overscan_method`` str ``chebyshev``, ``polynomial``, ``savgol``, ``median``, ``odd_even`` ``savgol`` Method used to fit the overscan. Options are: chebyshev, polynomial, savgol, median, odd_even Note: Method "polynomial" is identical to "chebyshev"; the former is deprecated and will be removed. +``overscan_par`` int, list .. 5, 65 Parameters for the overscan subtraction. For 'chebyshev' or 'polynomial', set overcan_par = order; for 'savgol', set overscan_par = order, window size ; for 'median', set overscan_par = None or omit the keyword. +``rmcompact`` bool .. True Remove compact detections in LA cosmics routine +``satpix`` str ``reject``, ``force``, ``nothing`` ``reject`` Handling of saturated pixels. Options are: reject, force, nothing +``scale_to_mean`` bool .. False If True, scale the input images to have the same mean before combining. +``scattlight`` :class:`~pypeit.par.pypeitpar.ScatteredLightPar` .. `ScatteredLightPar Keywords`_ Scattered light subtraction parameters. +``shot_noise`` bool .. True Use the bias- and dark-subtracted image to calculate and include electron count shot noise in the image processing error budget +``sigclip`` int, float .. 4.5 Sigma level for rejection in LA cosmics routine +``sigfrac`` int, float .. 0.3 Fraction for the lower clipping threshold in LA cosmics routine. +``spat_flexure_maxlag`` int .. 20 Maximum of possible spatial flexure correction, in pixels +``spat_flexure_method`` str ``skip``, ``detector``, ``slit``, ``edge`` ``skip`` Correct slits, illumination flat, etc. for spatial flexure. Options are: skip, detector, slit, edge"skip" means no correction is performed. "detector" means that a single shift is applied to all slits. "slit" means that each slit is shifted independently."edge" means that each slit edge is shifted independently. +``subtract_continuum`` bool .. False Subtract off the continuum level from an image. This parameter should only be set to True to combine arcs with multiple different lamps. For all other cases, this parameter should probably be False. +``subtract_scattlight`` bool .. False Subtract off the scattered light from an image. This parameter should only be set to True for spectrographs that have dedicated methods to subtract scattered light. For all other cases, this parameter should be False. +``trim`` bool .. True Trim the image to the detector supplied region +``use_biasimage`` bool .. True Use a bias image. If True, one or more must be supplied in the PypeIt file. +``use_darkimage`` bool .. False Subtract off a dark image. If True, one or more darks must be provided. +``use_illumflat`` bool .. True Use the illumination flat to correct for the illumination profile of each slit. +``use_overscan`` bool .. True Subtract off the overscan. Detector *must* have one or code will crash. +``use_pattern`` bool .. False Subtract off a detector pattern. This pattern is assumed to be sinusoidal along one direction, with a frequency that is constant across the detector. +``use_pixelflat`` bool .. True Use the pixel flat to make pixel-level corrections. A pixelflat image must be provied. +``use_specillum`` bool .. False Use the relative spectral illumination profiles to correct the spectral illumination profile of each slit. This is primarily used for slicer IFUs. To use this, you must set ``slit_illum_relative=True`` in the ``flatfield`` parameter set! +======================= ================================================ =================================================================== ============================= ======================================================================================================================================================================================================================================================================================================================================================================================== ---- @@ -3497,7 +3497,7 @@ Alterations to the default parameters are: [[[process]]] mask_cr = True noise_floor = 0.01 - spat_flexure_correct = detector + spat_flexure_method = detector [[flatfield]] slit_illum_finecorr = False [[wavelengths]] @@ -3518,7 +3518,7 @@ Alterations to the default parameters are: [[process]] mask_cr = True noise_floor = 0.01 - spat_flexure_correct = detector + spat_flexure_method = detector [flexure] spec_method = boxcar [sensfunc] @@ -3609,7 +3609,7 @@ Alterations to the default parameters are: [[[process]]] mask_cr = True noise_floor = 0.01 - spat_flexure_correct = detector + spat_flexure_method = detector [[flatfield]] slit_illum_finecorr = False [[wavelengths]] @@ -3630,7 +3630,7 @@ Alterations to the default parameters are: [[process]] mask_cr = True noise_floor = 0.01 - spat_flexure_correct = detector + spat_flexure_method = detector [flexure] spec_method = boxcar [sensfunc] @@ -3721,7 +3721,7 @@ Alterations to the default parameters are: [[[process]]] mask_cr = True noise_floor = 0.01 - spat_flexure_correct = detector + spat_flexure_method = detector [[flatfield]] slit_illum_finecorr = False [[wavelengths]] @@ -3748,7 +3748,7 @@ Alterations to the default parameters are: sigclip = 5.0 objlim = 5.0 noise_floor = 0.01 - spat_flexure_correct = detector + spat_flexure_method = detector [reduce] [[skysub]] bspline_spacing = 0.8 @@ -3844,7 +3844,7 @@ Alterations to the default parameters are: [[[process]]] mask_cr = True noise_floor = 0.01 - spat_flexure_correct = detector + spat_flexure_method = detector [[flatfield]] slit_illum_finecorr = False [[wavelengths]] @@ -3871,7 +3871,7 @@ Alterations to the default parameters are: sigclip = 5.0 objlim = 5.0 noise_floor = 0.01 - spat_flexure_correct = detector + spat_flexure_method = detector [reduce] [[skysub]] bspline_spacing = 0.8 @@ -3967,7 +3967,7 @@ Alterations to the default parameters are: [[[process]]] mask_cr = True noise_floor = 0.01 - spat_flexure_correct = detector + spat_flexure_method = detector [[flatfield]] slit_illum_finecorr = False [[wavelengths]] @@ -3994,7 +3994,7 @@ Alterations to the default parameters are: sigclip = 5.0 objlim = 5.0 noise_floor = 0.01 - spat_flexure_correct = detector + spat_flexure_method = detector [reduce] [[skysub]] bspline_spacing = 0.8 diff --git a/doc/scripts/build_imgproc_defaults.py b/doc/scripts/build_imgproc_defaults.py index 7d43f365e8..a4c5eadcf2 100644 --- a/doc/scripts/build_imgproc_defaults.py +++ b/doc/scripts/build_imgproc_defaults.py @@ -25,7 +25,7 @@ def write_imgproc_def_table(ofile, spec=None): 'orient', 'use_biasimage', 'use_darkimage', - 'spat_flexure_correct', + 'spat_flexure_method', 'use_pixelflat', 'use_illumflat', 'use_specillum',