pyredshift 1.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyredshift/__init__.py +5 -0
- pyredshift/pyredshift-help.html +121 -0
- pyredshift/pyredshift.lines +79 -0
- pyredshift/redshift.py +1581 -0
- pyredshift-1.9.data/scripts/pyredshift +297 -0
- pyredshift-1.9.dist-info/METADATA +167 -0
- pyredshift-1.9.dist-info/RECORD +10 -0
- pyredshift-1.9.dist-info/WHEEL +5 -0
- pyredshift-1.9.dist-info/licenses/LICENSE +21 -0
- pyredshift-1.9.dist-info/top_level.txt +1 -0
pyredshift/__init__.py
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
<h1>pyredshift help</h1>
|
|
2
|
+
|
|
3
|
+
<input type="radio" name="tabs" id="tab-keys" checked>
|
|
4
|
+
<input type="radio" name="tabs" id="tab-lines">
|
|
5
|
+
<input type="radio" name="tabs" id="tab-guide">
|
|
6
|
+
<nav class="tabs">
|
|
7
|
+
<label for="tab-keys">Commands</label>
|
|
8
|
+
<label for="tab-lines">Line list</label>
|
|
9
|
+
<label for="tab-guide">Guide</label>
|
|
10
|
+
</nav>
|
|
11
|
+
|
|
12
|
+
<section class="tab" id="pane-keys">
|
|
13
|
+
|
|
14
|
+
<h2>Mouse</h2>
|
|
15
|
+
<table>
|
|
16
|
+
<tr><th>Input</th><th>Action</th></tr>
|
|
17
|
+
<tr><td>click (or SPC or A)</td><td>show wavelength at cursor</td></tr>
|
|
18
|
+
<tr><td>drag</td><td>rubber-band zoom, like <code>e</code> — a purely
|
|
19
|
+
horizontal drag zooms X only; purely vertical, Y only</td></tr>
|
|
20
|
+
<tr><td>right-click</td><td>quick line menu — pick a line to set the
|
|
21
|
+
redshift at that position (same as ESC + shortcut key)</td></tr>
|
|
22
|
+
</table>
|
|
23
|
+
|
|
24
|
+
<h2>Redshift</h2>
|
|
25
|
+
<table>
|
|
26
|
+
<tr><th>Key</th><th>Action</th></tr>
|
|
27
|
+
<tr><td>ESC key</td><td>mark known line at cursor via shortcut key
|
|
28
|
+
(see below; backquote works as ESC)</td></tr>
|
|
29
|
+
<tr><td>ESC ESC</td><td>refine redshift using nearest line</td></tr>
|
|
30
|
+
<tr><td>g</td><td>guess redshift (enter wavelength of probable line)</td></tr>
|
|
31
|
+
<tr><td>=</td><td>enter redshift directly</td></tr>
|
|
32
|
+
<tr><td>r</td><td>remove features from plot</td></tr>
|
|
33
|
+
</table>
|
|
34
|
+
|
|
35
|
+
<p>Shortcut keys after ESC:</p>
|
|
36
|
+
<table>
|
|
37
|
+
<tr><th>Key</th><th>Line</th><th>Key</th><th>Line</th></tr>
|
|
38
|
+
<tr><td>l</td><td>Lyα 1216</td><td>g</td><td>G 4304</td></tr>
|
|
39
|
+
<tr><td>c</td><td>CIV 1549</td><td>b</td><td>Hβ 4861</td></tr>
|
|
40
|
+
<tr><td>m</td><td>MgII 2800</td><td>O</td><td>[OIII] 5007</td></tr>
|
|
41
|
+
<tr><td>o</td><td>[OII] 3727</td><td>d</td><td>NaD 5892</td></tr>
|
|
42
|
+
<tr><td>k</td><td>K 3933</td><td>a</td><td>Hα 6563</td></tr>
|
|
43
|
+
<tr><td>h</td><td>H 3969</td><td></td><td></td></tr>
|
|
44
|
+
</table>
|
|
45
|
+
|
|
46
|
+
<h2>Pan / zoom</h2>
|
|
47
|
+
<table>
|
|
48
|
+
<tr><th>Key</th><th>Action</th></tr>
|
|
49
|
+
<tr><td>[ ]</td><td>pan left/right</td></tr>
|
|
50
|
+
<tr><td>z / u</td><td>zoom / unzoom X axis</td></tr>
|
|
51
|
+
<tr><td>i / o</td><td>zoom / unzoom Y axis ("in" / "out")</td></tr>
|
|
52
|
+
<tr><td>x / y</td><td>set X range / Y range (two cursor picks)</td></tr>
|
|
53
|
+
<tr><td>e</td><td>expand plot (two corner picks)</td></tr>
|
|
54
|
+
<tr><td>w</td><td>whole X range</td></tr>
|
|
55
|
+
<tr><td>a</td><td>autoscale Y axis</td></tr>
|
|
56
|
+
<tr><td>h</td><td>home — restore initial display range</td></tr>
|
|
57
|
+
<tr><td>d</td><td>display again</td></tr>
|
|
58
|
+
</table>
|
|
59
|
+
|
|
60
|
+
<h2>Analysis</h2>
|
|
61
|
+
<table>
|
|
62
|
+
<tr><th>Key</th><th>Action</th></tr>
|
|
63
|
+
<tr><td>_</td><td>continuum fit and estimate noise</td></tr>
|
|
64
|
+
<tr><td>m</td><td>measure EW/flux of line (define continuum first)</td></tr>
|
|
65
|
+
<tr><td>b</td><td>plot binned up spectrum</td></tr>
|
|
66
|
+
<tr><td>s</td><td>plot smoothed spectrum</td></tr>
|
|
67
|
+
<tr><td>t</td><td>overlay template spectrum (currently {template})</td></tr>
|
|
68
|
+
<tr><td>k</td><td>kill nearest line from list</td></tr>
|
|
69
|
+
<tr><td>B</td><td>bodge cosmic rays/sky by replacing with ZERO</td></tr>
|
|
70
|
+
</table>
|
|
71
|
+
|
|
72
|
+
<h2>Other</h2>
|
|
73
|
+
<table>
|
|
74
|
+
<tr><th>Key</th><th>Action</th></tr>
|
|
75
|
+
<tr><td>p</td><td>print to PDF (pyredshift.pdf)</td></tr>
|
|
76
|
+
<tr><td>?</td><td>this help</td></tr>
|
|
77
|
+
<tr><td>q</td><td>quit</td></tr>
|
|
78
|
+
</table>
|
|
79
|
+
|
|
80
|
+
</section>
|
|
81
|
+
|
|
82
|
+
<section class="tab" id="pane-lines">
|
|
83
|
+
|
|
84
|
+
<h2>Line list</h2>
|
|
85
|
+
<p>All wavelengths are VACUUM, in Ångstroms (from pyredshift.lines,
|
|
86
|
+
colours as plotted):</p>
|
|
87
|
+
{linelist}
|
|
88
|
+
|
|
89
|
+
</section>
|
|
90
|
+
|
|
91
|
+
<section class="tab" id="pane-guide">
|
|
92
|
+
|
|
93
|
+
<h2>Guide</h2>
|
|
94
|
+
<p>pyredshift is a tool for measuring the redshift of a galaxy or quasar
|
|
95
|
+
from a 1D spectrum, by eye. Run it as <code>pyredshift file</code> —
|
|
96
|
+
the format (FITS image or table, SDSS, JWST, XSHOOTER, OutThere, CSV,
|
|
97
|
+
2-column ascii) is auto-detected, with <code>-f</code> to force one,
|
|
98
|
+
<code>-z</code> to start from a known redshift and <code>--retro</code>
|
|
99
|
+
for a retro PGPLOT-style black background. It plots the spectrum histogram-style with a
|
|
100
|
+
crosshair cursor, and overlays rest-frame line identifications that
|
|
101
|
+
follow the trial redshift shown at top left.</p>
|
|
102
|
+
|
|
103
|
+
<p>The basic game: spot a feature you can identify, put the crosshair on
|
|
104
|
+
it and press <code>ESC</code> then the line's shortcut key (or
|
|
105
|
+
<code>g</code> to type any rest wavelength) — the line labels jump
|
|
106
|
+
to that redshift. Now check the other features line up, panning and
|
|
107
|
+
zooming (mouse drag works), binning (<code>b</code>) or smoothing
|
|
108
|
+
(<code>s</code>) to dig in the noise, and refining with
|
|
109
|
+
<code>ESC ESC</code> on the sharpest line. Along the way you can fit a
|
|
110
|
+
continuum (<code>_</code>) and measure equivalent widths and line fluxes
|
|
111
|
+
(<code>m</code>), and print to PDF (<code>p</code>). <code>q</code>
|
|
112
|
+
quits and reports the final redshift to the terminal. It is the Python
|
|
113
|
+
descendant of Karl's venerable <code>redshift.f</code> (Fortran, 1990s)
|
|
114
|
+
via <code>pdlredshift</code> (Perl/PDL).</p>
|
|
115
|
+
|
|
116
|
+
<p>From a Jupyter notebook, call
|
|
117
|
+
<code>pyredshift.redshift.redshift(wave, flux)</code> with numpy arrays:
|
|
118
|
+
the interactive window opens outside the notebook, and when you quit the
|
|
119
|
+
final view is embedded in the cell and the redshift returned.</p>
|
|
120
|
+
|
|
121
|
+
</section>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# pyredshift.lines - emission/absorption line list, VACUUM wavelengths
|
|
2
|
+
# Format: wavelength_Angstroms, name, label, colour, comment
|
|
3
|
+
# label defaults to name; colour is any matplotlib colour name (default red),
|
|
4
|
+
# or light/dark to give separate colours for white and --retro backgrounds
|
|
5
|
+
# goldenrod/yellow = strong/emission magenta = ISM absorption green/red = other
|
|
6
|
+
911.8 , LyLim , LyLim , goldenrod/yellow , LyLim from AstroPhys Quant ***ALL LINES VACUUM***
|
|
7
|
+
1025.72 , Lybeta , Lyβ , red , From AQ
|
|
8
|
+
1031.92 , OVI , OVI , red , From Morton 1991 ApJS, ditto all following unless stated
|
|
9
|
+
1215.67 , Lyalpha , Lyα , goldenrod/yellow , From AQ
|
|
10
|
+
1240.1 , NV , NV , red , Mean of doublet
|
|
11
|
+
1260.42 , SiII , SiII , magenta ,
|
|
12
|
+
1304.37 , SiII , SiII , magenta ,
|
|
13
|
+
1335.1 , CII , CII , magenta , Mean of doublet
|
|
14
|
+
1398.3 , SiIV , SiIV , magenta , Mean of doublet
|
|
15
|
+
1526.71 , SiII , SiII , green ,
|
|
16
|
+
1548.2 , CIV , CIV , goldenrod/yellow , doublet
|
|
17
|
+
1550.8 , CIV , CIV , goldenrod/yellow , doublet
|
|
18
|
+
1608.45 , FeII , FeII , green ,
|
|
19
|
+
1640 , HeII , HeII , red , Ref ???
|
|
20
|
+
1670.79 , AlII , AlII , green ,
|
|
21
|
+
1909 , CIII] , CIII] , goldenrod/yellow , ref??
|
|
22
|
+
2026.14 , ZnII , ZnII , red ,
|
|
23
|
+
2062.66 , ZnII , ZnII , red ,
|
|
24
|
+
2327.0 , CII , CII , goldenrod/yellow , Mean of quadruplet
|
|
25
|
+
2344.21 , FeII , FeII , magenta ,
|
|
26
|
+
2374.46 , FeII , FeII , magenta ,
|
|
27
|
+
2382.77 , FeII , FeII , magenta ,
|
|
28
|
+
2586.65 , FeII , FeII , magenta ,
|
|
29
|
+
2600.17 , FeII , FeII , magenta ,
|
|
30
|
+
2796.35 , MgII , MgII , magenta ,
|
|
31
|
+
2803.53 , MgII , MgII , magenta ,
|
|
32
|
+
2852.96 , MgI , MgI , magenta ,
|
|
33
|
+
2967.76 , FeI , FeI , red ,
|
|
34
|
+
2968.01 , FeI , FeI , red ,
|
|
35
|
+
2984.44 , FeI , FeI , red ,
|
|
36
|
+
3021.52 , FeI , FeI , red ,
|
|
37
|
+
3346.79 , [NeV] , [NeV] , red , See redshift-optical-air.lines for refs.
|
|
38
|
+
3426.85 , [NeV] , [NeV] , red , These have been converted to vacuum.
|
|
39
|
+
3727.09 , [OII] , [OII] , goldenrod/yellow ,
|
|
40
|
+
3729.88 , [OII] , [OII] , goldenrod/yellow ,
|
|
41
|
+
3798.89 , Htheta , Hθ , red ,
|
|
42
|
+
3836.44 , Heta , Hη , red ,
|
|
43
|
+
3869.86 , [NeIII] , [NeIII] , red ,
|
|
44
|
+
3890.15 , Hzeta , Hζ , red ,
|
|
45
|
+
3934.77 , K , K , magenta ,
|
|
46
|
+
3969.59 , H , H , magenta ,
|
|
47
|
+
4001.13 , 4000break , D4000 , magenta , 4000A break (vacuum)
|
|
48
|
+
4102.89 , Hdelta , Hδ , red ,
|
|
49
|
+
4305.57 , G , G , magenta ,
|
|
50
|
+
4341.68 , Hgamma , Hγ , red ,
|
|
51
|
+
4862.68 , Hbeta , Hβ , goldenrod/yellow ,
|
|
52
|
+
4960.30 , [OIII] , [OIII] , goldenrod/yellow ,
|
|
53
|
+
5008.25 , [OIII] , [OIII] , goldenrod/yellow ,
|
|
54
|
+
5175.44 , Mgb , Mgb , magenta ,
|
|
55
|
+
5270.07 , FeI , Fe5268 , magenta , FeI+CaI blend (Lick Fe5270); 5268 = classic air/centroid designation
|
|
56
|
+
5891.58 , NaD , NaD , magenta ,
|
|
57
|
+
5897.56 , NaD , NaD , magenta ,
|
|
58
|
+
6549.87 , [NII] , [NII] , red ,
|
|
59
|
+
6564.61 , Halpha , Hα , goldenrod/yellow ,
|
|
60
|
+
6585.21 , [NII] , [NII] , red ,
|
|
61
|
+
6718.27 , [SII] , [SII] , red ,
|
|
62
|
+
6732.64 , [SII] , [SII] , red ,
|
|
63
|
+
8500.36 , CaT , CaT , red ,
|
|
64
|
+
8544.44 , CaT , CaT , red ,
|
|
65
|
+
8664.52 , CaT , CaT , red ,
|
|
66
|
+
9071.11 , [SIII] , [SIII] , red ,
|
|
67
|
+
9533.23 , [SIII] , [SIII] , red ,
|
|
68
|
+
10052.13 , Pa-delta , Paδ , red ,
|
|
69
|
+
10833.31 , HeI , HeI , red ,
|
|
70
|
+
10941.09 , Pa-gama , Paγ , red ,
|
|
71
|
+
12570.21 , [FeII] , [FeII] , red ,
|
|
72
|
+
12821.58 , Pa-beta , Paβ , goldenrod/yellow ,
|
|
73
|
+
16440.02 , [FeII] , [FeII] , goldenrod/yellow ,
|
|
74
|
+
18179.07 , Br-epsilon , Brε , red ,
|
|
75
|
+
18756.13 , Pa-alpha , Paα , goldenrod/yellow ,
|
|
76
|
+
19450.86 , Br-delta , Brδ , red ,
|
|
77
|
+
19575.60 , H2_1-0_S(3) , H₂ , goldenrod/yellow ,
|
|
78
|
+
21218.31 , H2_1-0_S(1) , H₂ , goldenrod/yellow ,
|
|
79
|
+
21661.19 , Br-gamma , Brγ , goldenrod/yellow ,
|