Skip to content

Commit

Permalink
Merge pull request #1821 from pypeit/lris_jun24
Browse files Browse the repository at this point in the history
Minor improvements to quicklook, coadd2d as well as a bug fix
  • Loading branch information
debora-pe authored Sep 20, 2024
2 parents 3d26a0b + 0c27950 commit 2b53647
Show file tree
Hide file tree
Showing 20 changed files with 358 additions and 229 deletions.
2 changes: 1 addition & 1 deletion doc/coadd1d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ This tool is developed by Michael Murphy and is available at
`this link <https://github.com/MTMurphy77/UVES_popler/>`__.
Here is an example of a coadded spectrum using UVES_popler:

.. image:: ../figures/uves_popler.png
.. image:: figures/uves_popler.png
:scale: 60%

UVES_popler was originally written to coadd ESO/UVES echelle spectra
Expand Down
10 changes: 0 additions & 10 deletions doc/help/pypeit_coadd_2dspec.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
$ pypeit_coadd_2dspec -h
usage: pypeit_coadd_2dspec [-h] [--show] [--debug_offsets] [--peaks]
[--basename BASENAME] [--debug] [-v VERBOSITY]
[--spec_samp_fact SPEC_SAMP_FACT]
[--spat_samp_fact SPAT_SAMP_FACT]
coadd2d_file
Coadd 2D spectra produced by PypeIt
Expand All @@ -27,12 +25,4 @@
Verbosity level between 0 [none] and 2 [all]. Default:
1. Level 2 writes a log with filename
coadd_2dspec_YYYYMMDD-HHMM.log (default: 1)
--spec_samp_fact SPEC_SAMP_FACT
Make the wavelength grid finer (spec_samp_fact < 1.0) or
coarser (spec_samp_fact > 1.0) by this sampling factor,
i.e. units of spec_samp_fact are pixels. (default: 1.0)
--spat_samp_fact SPAT_SAMP_FACT
Make the spatial grid finer (spat_samp_fact < 1.0) or
coarser (spat_samp_fact > 1.0) by this sampling factor,
i.e. units of spat_samp_fact are pixels. (default: 1.0)
40 changes: 22 additions & 18 deletions doc/help/pypeit_ql.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
[--calibs_only] [--overwrite_calibs] [--det DET [DET ...]]
[--slitspatnum SLITSPATNUM] [--maskID MASKID]
[--boxcar_radius BOXCAR_RADIUS] [--snr_thresh SNR_THRESH]
[--ignore_std] [--skip_display] [--coadd2d]
[--only_slits ONLY_SLITS [ONLY_SLITS ...]] [--offsets OFFSETS]
[--weights WEIGHTS] [--spec_samp_fact SPEC_SAMP_FACT]
[--spat_samp_fact SPAT_SAMP_FACT] [--try_old]
[--ignore_std] [--skip_display] [--removetrace] [--coadd2d]
[--spec_samp_fact SPEC_SAMP_FACT]
[--spat_samp_fact SPAT_SAMP_FACT] [--offsets OFFSETS]
[--weights WEIGHTS] [--only_slits ONLY_SLITS [ONLY_SLITS ...]]
[--try_old]
spectrograph
Script to produce quick-look PypeIt reductions
Expand Down Expand Up @@ -110,13 +111,20 @@
detected, ignore those frames. Otherwise, they are
included with the reduction of the science frames.
(default: False)
--skip_display Run the quicklook without displaying any results.
(default: True)
--skip_display Run the quicklook without displaying any results. The
default skip_display=False will show the results.
(default: False)
--removetrace When the image is shown, do not overplot traces in the
skysub, sky_resid, and resid channels (default: False)
--coadd2d Perform default 2D coadding. (default: False)
--only_slits ONLY_SLITS [ONLY_SLITS ...]
If coadding, only coadd this space-separated set of
slits. If not provided, all slits are coadded. (default:
None)
--spec_samp_fact SPEC_SAMP_FACT
If coadding, adjust the wavelength grid sampling by this
factor. For a finer grid, set value to <1.0; for coarser
sampling, set value to >1.0). (default: 1.0)
--spat_samp_fact SPAT_SAMP_FACT
If coadding, adjust the spatial grid sampling by this
factor. For a finer grid, set value to <1.0; for coarser
sampling, set value to >1.0). (default: 1.0)
--offsets OFFSETS If coadding, spatial offsets to apply to each image; see
the [coadd2d][offsets] parameter. Options are restricted
here to either maskdef_offsets or auto. If not
Expand All @@ -126,14 +134,10 @@
[coadd2d][weights] parameter. Options are restricted
here to either uniform or auto. If not specified, the
(spectrograph-specific) default is used. (default: None)
--spec_samp_fact SPEC_SAMP_FACT
If coadding, adjust the wavelength grid sampling by this
factor. For a finer grid, set value to <1.0; for coarser
sampling, set value to >1.0). (default: 1.0)
--spat_samp_fact SPAT_SAMP_FACT
If coadding, adjust the spatial grid sampling by this
factor. For a finer grid, set value to <1.0; for coarser
sampling, set value to >1.0). (default: 1.0)
--only_slits ONLY_SLITS [ONLY_SLITS ...]
If coadding, only coadd this space-separated set of
slits. If not provided, all slits are coadded. (default:
None)
--try_old Attempt to load old datamodel versions. A crash may
ensue.. (default: False)
26 changes: 13 additions & 13 deletions doc/help/pypeit_sensfunc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$ pypeit_sensfunc -h
usage: pypeit_sensfunc [-h] [--extr {OPT,BOX}] [--algorithm {UVIS,IR}]
[--multi MULTI] [-o OUTFILE] [-s SENS_FILE] [-f FLATFILE]
[--multi MULTI] [-o OUTFILE] [-s SENS_FILE] [-f]
[--debug] [--par_outfile PAR_OUTFILE] [-v VERBOSITY]
spec1dfile
Expand Down Expand Up @@ -71,20 +71,20 @@
in the filename.
-s SENS_FILE, --sens_file SENS_FILE
Configuration file with sensitivity function parameters
-f FLATFILE, --flatfile FLATFILE
Use a flat calibration file to compute the blaze
function when generating the sensitivity function. This
is helpful to account for small scale undulations in the
sensitivity function. Note that it is not possible to
set --flatfile and simultaneously use a .sens file with
the --sens_file option. If you are using a .sens file,
set the flatfile there via e.g.:
-f, --use_flat Use the extracted spectrum of the flatfield calibration
to estimate the blaze function when generating the
sensitivity function. This is helpful to account for
small scale undulations in the sensitivity function. The
spec1dfile must contain the extracted flatfield response
in order to use this option. This spectrum is extracted
by default, unless you did not compute a pixelflat
frame. Note that it is not possible to set --use_flat
and simultaneously use a .sens file with the --sens_file
option. If you are using a .sens file, set the use_flat
flag with the argument:
[sensfunc]
flatfile = Calibrations/Flat_A_0_DET01.fits
Where Flat_A_0_DET01.fits is the flat file in your
Calibrations directory
use_flat = True
--debug show debug plots?
--par_outfile PAR_OUTFILE
Name of output file to save the parameters used by the
Expand Down
10 changes: 10 additions & 0 deletions doc/help/pypeit_setup_coadd2d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
[--exclude_slits EXCLUDE_SLITS [EXCLUDE_SLITS ...]]
[--spat_toler SPAT_TOLER] [--offsets OFFSETS]
[--weights WEIGHTS]
[--spec_samp_fact SPEC_SAMP_FACT]
[--spat_samp_fact SPAT_SAMP_FACT]
Prepare a configuration file for performing 2D coadds
Expand Down Expand Up @@ -68,4 +70,12 @@
or auto. If not specified, the (spectrograph-specific)
default is used. Other options exist but must be entered
by directly editing the coadd2d file. (default: None)
--spec_samp_fact SPEC_SAMP_FACT
Make the wavelength grid finer (spec_samp_fact < 1.0) or
coarser (spec_samp_fact > 1.0) by this sampling factor,
i.e. units of spec_samp_fact are pixels. (default: 1.0)
--spat_samp_fact SPAT_SAMP_FACT
Make the spatial grid finer (spat_samp_fact < 1.0) or
coarser (spat_samp_fact > 1.0) by this sampling factor,
i.e. units of spat_samp_fact are pixels. (default: 1.0)
3 changes: 2 additions & 1 deletion doc/help/pypeit_show_2dspec.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
constructed assuming the reduction is for a single
detector. If a string, it must match the name of the
detector object (e.g., DET01 for a detector, MSC01 for a
mosaic). (default: 1)
mosaic). If not set, the first available detectorin the
spec2d file will be shown (default: None)
--spat_id SPAT_ID Restrict plotting to this slit (PypeIt ID notation)
(default: None)
--maskID MASKID Restrict plotting to this maskID (default: None)
Expand Down
4 changes: 3 additions & 1 deletion doc/include/class_datamodel_specobj.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

**Version**: 1.1.10
**Version**: 1.1.11

======================= =================================================================================================== ===================== ====================================================================================================================================================================================
Attribute Type Array Type Description
Expand All @@ -14,6 +14,7 @@ Attribute Type
``BOX_FLAM`` `numpy.ndarray`_ float Boxcar flux (erg/s/cm^2/Ang)
``BOX_FLAM_IVAR`` `numpy.ndarray`_ float Boxcar flux inverse variance (1e-17 erg/s/cm^2/Ang)^-2
``BOX_FLAM_SIG`` `numpy.ndarray`_ float Boxcar flux uncertainty (1e-17 erg/s/cm^2/Ang)
``BOX_FLAT`` `numpy.ndarray`_ float Boxcar extracted flatfield spectrum, normalized to the peak value.
``BOX_FRAC_USE`` `numpy.ndarray`_ float Fraction of pixels in the object profile subimage used for this extraction
``BOX_FWHM`` `numpy.ndarray`_ float Spectral FWHM (in Angstroms) at every pixel of the boxcar extracted flux.
``BOX_MASK`` `numpy.ndarray`_ `numpy.bool`_ Mask for boxcar extracted flux. True=good
Expand Down Expand Up @@ -51,6 +52,7 @@ Attribute Type
``OPT_FLAM`` `numpy.ndarray`_ float Optimal flux (1e-17 erg/s/cm^2/Ang)
``OPT_FLAM_IVAR`` `numpy.ndarray`_ float Optimal flux inverse variance (1e-17 erg/s/cm^2/Ang)^-2
``OPT_FLAM_SIG`` `numpy.ndarray`_ float Optimal flux uncertainty (1e-17 erg/s/cm^2/Ang)
``OPT_FLAT`` `numpy.ndarray`_ float Optimally extracted flatfield spectrum, normalised to the peak value.
``OPT_FRAC_USE`` `numpy.ndarray`_ float Fraction of pixels in the object profile subimage used for this extraction
``OPT_FWHM`` `numpy.ndarray`_ float Spectral FWHM (in Angstroms) at every pixel of the optimally extracted flux.
``OPT_MASK`` `numpy.ndarray`_ `numpy.bool`_ Mask for optimally extracted flux. True=good
Expand Down
4 changes: 3 additions & 1 deletion doc/include/datamodel_specobj.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


Version: 1.1.10
Version: 1.1.11

======================= ========================= ================= ====================================================================================================================================================================================
Obj Key Obj Type Array Type Description
Expand All @@ -15,6 +15,7 @@ Obj Key Obj Type Array Type Descripti
``BOX_FLAM`` ndarray float Boxcar flux (erg/s/cm^2/Ang)
``BOX_FLAM_IVAR`` ndarray float Boxcar flux inverse variance (1e-17 erg/s/cm^2/Ang)^-2
``BOX_FLAM_SIG`` ndarray float Boxcar flux uncertainty (1e-17 erg/s/cm^2/Ang)
``BOX_FLAT`` ndarray float Boxcar extracted flatfield spectrum, normalized to the peak value.
``BOX_FRAC_USE`` ndarray float Fraction of pixels in the object profile subimage used for this extraction
``BOX_FWHM`` ndarray float Spectral FWHM (in Angstroms) at every pixel of the boxcar extracted flux.
``BOX_MASK`` ndarray bool Mask for boxcar extracted flux. True=good
Expand Down Expand Up @@ -52,6 +53,7 @@ Obj Key Obj Type Array Type Descripti
``OPT_FLAM`` ndarray float Optimal flux (1e-17 erg/s/cm^2/Ang)
``OPT_FLAM_IVAR`` ndarray float Optimal flux inverse variance (1e-17 erg/s/cm^2/Ang)^-2
``OPT_FLAM_SIG`` ndarray float Optimal flux uncertainty (1e-17 erg/s/cm^2/Ang)
``OPT_FLAT`` ndarray float Optimally extracted flatfield spectrum, normalised to the peak value.
``OPT_FRAC_USE`` ndarray float Fraction of pixels in the object profile subimage used for this extraction
``OPT_FWHM`` ndarray float Spectral FWHM (in Angstroms) at every pixel of the optimally extracted flux.
``OPT_MASK`` ndarray bool Mask for optimally extracted flux. True=good
Expand Down
Loading

0 comments on commit 2b53647

Please sign in to comment.