Skip to content

Commit d5f8d74

Browse files
authored
Merge pull request #2089 from kbwestfall/spec1d_docs
Move key-binding descriptions from class docstring to `pypeit_show_1dspec` description
2 parents f693897 + ee978b7 commit d5f8d74

File tree

12 files changed

+139
-80
lines changed

12 files changed

+139
-80
lines changed

doc/help/pypeit_show_1dspec.rst

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
33
$ pypeit_show_1dspec -h
44
usage: pypeit_show_1dspec [-h] [-v VERBOSITY] [--log_file LOG_FILE]
5-
[--log_level LOG_LEVEL] [--list] [--exten EXTEN]
6-
[--obj OBJ] [--extract EXTRACT] [--flux] [-m]
5+
[--log_level LOG_LEVEL] [--list] [--exten EXTEN |
6+
--obj OBJ] [--extract {BOX,OPT}] [--flux] [-m]
77
file
88
99
Show a 1D spectrum
1010
1111
positional arguments:
12-
file Spectral file
12+
file PypeIt spec1d file (this script does not work with
13+
coadd_1dspec output spectra).
1314
1415
options:
1516
-h, --help show this help message and exit
@@ -25,12 +26,13 @@
2526
Verbosity level for the log file. If a log file is
2627
produce and this is None, the file log will match the
2728
console stream log. (default: None)
28-
--list List the extensions only? (default: False)
29-
--exten EXTEN FITS extension (default: 1)
30-
--obj OBJ Object name in lieu of extension, e.g.
29+
--list Instead of plotting any spectra, simply list the
30+
extensions with spectra (default: False)
31+
--exten EXTEN Number of the extension to plot (default: 1)
32+
--obj OBJ Extension (object) name to plot, e.g.
3133
SPAT0424-SLIT0000-DET01 (default: None)
32-
--extract EXTRACT Extraction method. Default is OPT. ['BOX', 'OPT']
33-
(default: OPT)
34-
--flux Show fluxed spectrum? (default: False)
35-
-m, --unmasked Only show unmasked data. (default: True)
34+
--extract {BOX,OPT} Method used to extract the spectrum (default: OPT)
35+
--flux Show the flux-calibrated spectrum (if available)
36+
(default: False)
37+
-m, --unmasked Only show the unmasked data. (default: True)
3638

doc/help/run_pypeit.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
pypeit_file
77
88
PypeIt: The Python Spectroscopic Data Reduction Pipeline
9-
Version 1.18.2.dev643+g76c0191d0
9+
Version 2.0.1.dev23+g72bf91080.d20260323
1010
1111
Available spectrographs include:
1212
aat_uhrf, apf_levy, bok_bc, gemini_flamingos1, gemini_flamingos2,

doc/include/gemini_gnirs_echelle_A.pypeit.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. code-block:: console
22
3-
# Auto-generated PypeIt input file using PypeIt version: 1.18.1
4-
# UTC 2025-09-29T12:51:17
3+
# Auto-generated PypeIt input file using PypeIt version: 2.0.0
4+
# UTC 2026-02-10T07:57:06
55
66
# User-defined execution parameters
77
[rdx]

doc/include/keck_deimos_A.pypeit.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. code-block:: console
22
3-
# Auto-generated PypeIt input file using PypeIt version: 1.18.1
4-
# UTC 2025-09-29T12:51:17
3+
# Auto-generated PypeIt input file using PypeIt version: 2.0.0
4+
# UTC 2026-02-10T07:57:06
55
66
# User-defined execution parameters
77
[rdx]

doc/include/keck_nires_A.pypeit.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. code-block:: console
22
3-
# Auto-generated PypeIt input file using PypeIt version: 1.18.1
4-
# UTC 2025-09-29T12:51:17
3+
# Auto-generated PypeIt input file using PypeIt version: 2.0.0
4+
# UTC 2026-02-10T07:57:06
55
66
# User-defined execution parameters
77
[rdx]

doc/include/shane_kast_blue_A.pypeit.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. code-block:: console
22
3-
# Auto-generated PypeIt input file using PypeIt version: 1.18.1
4-
# UTC 2025-09-29T12:51:17
3+
# Auto-generated PypeIt input file using PypeIt version: 2.0.0
4+
# UTC 2026-02-10T07:57:06
55
66
# User-defined execution parameters
77
[rdx]

doc/out_spec1D.rst

Lines changed: 69 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -112,54 +112,77 @@ Here is a typical call:
112112
file is typically written to the ``VERSPYP`` header keyword) or re-reduce
113113
the data with the new PypeIt version.
114114

115-
Options
116-
-------
117-
118-
Here are the typical options you will use:
119-
120-
--list
121-
++++++
122-
123-
This prints a list to the screen of all the objects extracted. An example:
124-
125-
.. code-block:: console
126-
127-
EXT0000001 = SPAT0351-SLIT0000-DET01
128-
EXT0000002 = SPAT0392-SLIT0001-DET01
129-
EXT0000003 = SPAT0463-SLIT0003-DET01
130-
EXT0000004 = SPAT0556-SLIT0004-DET01
131-
EXT0000005 = SPAT0621-SLIT0005-DET01
132-
EXT0000006 = SPAT0731-SLIT0006-DET01
133-
EXT0000007 = SPAT0824-SLIT0007-DET01
134-
EXT0000008 = SPAT0865-SLIT0007-DET01
135-
EXT0000009 = SPAT0910-SLIT0008-DET01
136-
EXT0000010 = SPAT0962-SLIT0009-DET01
137-
EXT0000011 = SPAT0073-SLIT0000-DET02
138-
EXT0000012 = SPAT0093-SLIT0000-DET02
139-
EXT0000013 = SPAT0130-SLIT0001-DET02
140-
141-
This indicates the extension of the object with this :ref:`spec1d-naming`.
142-
143-
--exten
115+
.. _pypeit_show_1dspec_interact:
116+
117+
Interacting with the display
118+
----------------------------
119+
120+
The spec1d mode is a mode enabled by ginga to interact with the spectrum plot.
121+
**To get a listing of the key-bindings in the ginga window, type 'h'.** If that
122+
doesn't work, or if the key bindings themselves don't seem to work, you may have
123+
exited the mode. To restart the mode, hit the space-bar and then the 1 key. If
124+
you're still having trouble, please submit an issue via GitHub or post a
125+
question to the Users Slack.
126+
127+
The key-bindings below are copied from the relevant docstring; if anything is
128+
different from the dialog you get when pressing 'h' in ginga, you should defer
129+
to what is shown there. The key-bindigs are as follows:
130+
131+
Enter the mode
132+
++++++++++++++
133+
* Space, then "1"
134+
135+
Exit the mode
136+
+++++++++++++
137+
* Esc
138+
139+
Mouse/trackpad bindings in mode
140+
+++++++++++++++++++++++++++++++
141+
* Shift + left click : set pan position
142+
* middle click : set pan position
143+
* scroll : zoom in/out
144+
* ctrl + scroll : zoom in/out X axis only
145+
* shift + scroll : zoom in/out Y axis only (On MacOS, trackpad only)
146+
* alt + scroll(mouse) : zoom in/out Y axis only (Option key on Macs)
147+
* alt + scroll : zoom in/out at cursor
148+
149+
Zooming
144150
+++++++
151+
* equals : zoom in one zoom level
152+
* ctrl + equals : zoom in X axis one zoom level
153+
* plus (shift + equals) : zoom in Y axis one zoom level
154+
* minus : zoom out one zoom level
155+
* ctrl + minus : zoom out X axis one zoom level
156+
* underscore (shift + minus): zoom out Y axis one zoom level
157+
* 9 : zoom out maintaining cursor position
158+
* ctrl + 9 : zoom out X axis maintaining cursor position
159+
* left paren (shift + 9): zoom out Y axis maintaining cursor position
160+
* 0 : zoom in maintaining cursor position
161+
* ctrl + 0 : zoom in X axis maintaining cursor position
162+
* right paren (shift + 0): zoom in Y axis maintaining cursor position
163+
* backquote : zoom X and Y axes to fit window
164+
* 1 : zoom X axis only to fit window
165+
* 2 : zoom Y axis only to fit window
166+
* k : set lower X range to X value at cursor
167+
* l : set upper X range to X value at cursor
168+
* K : set lower Y range to Y value at cursor
169+
* L : set upper Y range to Y value at cursor
170+
171+
Panning
172+
+++++++
173+
* left arrow : pan left
174+
* right arrow : pan right
175+
* up arrow : pan up
176+
* down arrow : pan down
145177

146-
This is a short-cut of sorts to pull the object you want without
147-
typing in its name.
148-
149-
--obj
150-
+++++
151-
152-
Plot this object.
153-
154-
--extract
155-
+++++++++
156-
157-
Choice of :ref:`spec1d-extraction` method.
158-
159-
--flux
160-
++++++
161-
162-
Show the fluxed spectrum (only if it has been fluxed!)
178+
Regions
179+
+++++++
180+
* [ : mark lower X boundary of region
181+
* ] : mark upper X boundary of region
182+
* backslash : clear region
183+
* singlequote : (zoom) set X range to region
184+
* f : fit a Gaussian to the region and show result
185+
* c : clear fit result
163186

164187
----
165188

doc/pypeit_par.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1265,7 +1265,6 @@ Alterations to the default parameters are:
12651265
[[flatfield]]
12661266
spat_samp = 0.7
12671267
tweak_slits = False
1268-
slit_trim = 0
12691268
slit_illum_finecorr = False
12701269
[[wavelengths]]
12711270
method = reidentify
@@ -1299,6 +1298,7 @@ Alterations to the default parameters are:
12991298
[[skysub]]
13001299
global_sky_std = False
13011300
mask_by_boxcar = True
1301+
no_local_sky = True
13021302
[[extraction]]
13031303
boxcar_radius = 1.728
13041304

doc/releases/2.0.1.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
Version 2.0.1
3+
=============
4+
5+
- Add key-binding documentation from ``pypeit/display/pypeit_modes.py`` to the
6+
main documentation page, :ref:`pypeit_show_1dspec`.
7+
8+
- Small changes to default parameter values for the APF/Levy spectrograph
9+
10+
- Change an exception raised when a coding-level check failed that was meant to
11+
ensure consistency between calibration groups and science frames. This was
12+
causing unintended faults for APF/Levy data.
13+

doc/whatsnew.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ What's New in PypeIt
1111

1212
----
1313

14+
.. include:: releases/2.0.1.rst
15+
16+
----
17+
1418
.. include:: releases/2.0.0.rst
1519

1620
----

0 commit comments

Comments
 (0)