pyredshift 1.11__tar.gz → 1.13__tar.gz
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-1.11 → pyredshift-1.13}/PKG-INFO +1 -1
- {pyredshift-1.11 → pyredshift-1.13}/pyredshift +10 -4
- {pyredshift-1.11 → pyredshift-1.13}/setup.py +1 -1
- {pyredshift-1.11 → pyredshift-1.13}/src/pyredshift/pyredshift-help.html +1 -1
- {pyredshift-1.11 → pyredshift-1.13}/src/pyredshift/redshift.py +7 -2
- {pyredshift-1.11 → pyredshift-1.13}/src/pyredshift.egg-info/PKG-INFO +1 -1
- {pyredshift-1.11 → pyredshift-1.13}/LICENSE +0 -0
- {pyredshift-1.11 → pyredshift-1.13}/README.md +0 -0
- {pyredshift-1.11 → pyredshift-1.13}/pyproject.toml +0 -0
- {pyredshift-1.11 → pyredshift-1.13}/setup.cfg +0 -0
- {pyredshift-1.11 → pyredshift-1.13}/src/pyredshift/__init__.py +0 -0
- {pyredshift-1.11 → pyredshift-1.13}/src/pyredshift/pyredshift.lines +0 -0
- {pyredshift-1.11 → pyredshift-1.13}/src/pyredshift.egg-info/SOURCES.txt +0 -0
- {pyredshift-1.11 → pyredshift-1.13}/src/pyredshift.egg-info/dependency_links.txt +0 -0
- {pyredshift-1.11 → pyredshift-1.13}/src/pyredshift.egg-info/requires.txt +0 -0
- {pyredshift-1.11 → pyredshift-1.13}/src/pyredshift.egg-info/top_level.txt +0 -0
|
@@ -75,10 +75,15 @@ def read_csv(fname):
|
|
|
75
75
|
continue
|
|
76
76
|
parts = line.split(",")
|
|
77
77
|
try:
|
|
78
|
-
|
|
79
|
-
spec.append(float(parts[1]))
|
|
78
|
+
x = float(parts[0])
|
|
80
79
|
except (IndexError, ValueError):
|
|
81
|
-
continue
|
|
80
|
+
continue # no wavelength - not a data row
|
|
81
|
+
try:
|
|
82
|
+
y = float(parts[1])
|
|
83
|
+
except (IndexError, ValueError):
|
|
84
|
+
y = np.nan # blank/bad flux cell -> bad pixel, plots as a gap
|
|
85
|
+
wav.append(x)
|
|
86
|
+
spec.append(y)
|
|
82
87
|
return np.array(wav), np.array(spec), True
|
|
83
88
|
|
|
84
89
|
|
|
@@ -266,7 +271,8 @@ def main():
|
|
|
266
271
|
prog="pyredshift",
|
|
267
272
|
usage="pyredshift [-help] [-f FORMAT] [-z REDSHIFT] [--retro] "
|
|
268
273
|
"[--microns] file",
|
|
269
|
-
description="Interactive redshifting of 1D spectra
|
|
274
|
+
description="Interactive redshifting of 1D spectra "
|
|
275
|
+
"(port of pdlredshift), v%s." % redshift_module.__version__,
|
|
270
276
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
271
277
|
# format documentation lives in the module (FORMAT_HELP) so the
|
|
272
278
|
# -h epilog and the '?' help page cannot drift apart
|
|
@@ -13,7 +13,7 @@ from setuptools import setup
|
|
|
13
13
|
|
|
14
14
|
setup(
|
|
15
15
|
name="pyredshift",
|
|
16
|
-
version="1.
|
|
16
|
+
version="1.13",
|
|
17
17
|
description="Interactive redshifting of 1D astronomical spectra "
|
|
18
18
|
"(Python successor of pdlredshift / redshift.f)",
|
|
19
19
|
long_description=open("README.md").read(),
|
|
@@ -52,6 +52,10 @@ V1.10 - The cursor works over the whole window, as PGPLOT's did: keys and
|
|
|
52
52
|
V1.11 - Proper file-format documentation: a per-format table in the
|
|
53
53
|
script's -h and a File formats section in the help page, both
|
|
54
54
|
generated from FORMAT_HELP here so they cannot drift apart.
|
|
55
|
+
V1.12 - The version number is shown by -h/-help and on the help page.
|
|
56
|
+
V1.13 - CSV reader: blank flux cells are bad pixels (NaN, plotted as
|
|
57
|
+
gaps) instead of desynchronising the wavelength and flux arrays;
|
|
58
|
+
rows with no wavelength are skipped.
|
|
55
59
|
"""
|
|
56
60
|
|
|
57
61
|
import ctypes
|
|
@@ -91,7 +95,7 @@ try:
|
|
|
91
95
|
except AttributeError:
|
|
92
96
|
pass
|
|
93
97
|
|
|
94
|
-
__version__ = "1.
|
|
98
|
+
__version__ = "1.13"
|
|
95
99
|
|
|
96
100
|
C_LIGHT = 2.99792458e8 # m/s
|
|
97
101
|
|
|
@@ -267,7 +271,7 @@ def help_html():
|
|
|
267
271
|
if HELP_RAW is None:
|
|
268
272
|
return None
|
|
269
273
|
return HELP_RAW.format(template=TEMPLATE_NAME, linelist=linelist_html(),
|
|
270
|
-
formats=formats_html())
|
|
274
|
+
formats=formats_html(), version=__version__)
|
|
271
275
|
|
|
272
276
|
|
|
273
277
|
# ---------------------------------------------------------------------------
|
|
@@ -974,6 +978,7 @@ body { font-family: -apple-system, "Helvetica Neue", sans-serif;
|
|
|
974
978
|
max-width: 46em; margin: 2em auto; padding: 0 1em;
|
|
975
979
|
color: %(fg)s; background: %(bg)s; line-height: 1.45; }
|
|
976
980
|
h1 { font-size: 1.5em; border-bottom: 2px solid %(rule)s; padding-bottom: 0.2em; }
|
|
981
|
+
h1 .ver { font-size: 0.6em; font-weight: normal; color: %(accent)s; }
|
|
977
982
|
h2 { font-size: 1.15em; color: %(accent)s; margin-top: 1.4em; }
|
|
978
983
|
table { border-collapse: collapse; margin: 0.5em 0; }
|
|
979
984
|
th, td { border: 1px solid %(rule)s; padding: 0.25em 0.7em; text-align: left; }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|