pyredshift 1.12__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.12 → pyredshift-1.13}/PKG-INFO +1 -1
- {pyredshift-1.12 → pyredshift-1.13}/pyredshift +8 -3
- {pyredshift-1.12 → pyredshift-1.13}/setup.py +1 -1
- {pyredshift-1.12 → pyredshift-1.13}/src/pyredshift/redshift.py +4 -1
- {pyredshift-1.12 → pyredshift-1.13}/src/pyredshift.egg-info/PKG-INFO +1 -1
- {pyredshift-1.12 → pyredshift-1.13}/LICENSE +0 -0
- {pyredshift-1.12 → pyredshift-1.13}/README.md +0 -0
- {pyredshift-1.12 → pyredshift-1.13}/pyproject.toml +0 -0
- {pyredshift-1.12 → pyredshift-1.13}/setup.cfg +0 -0
- {pyredshift-1.12 → pyredshift-1.13}/src/pyredshift/__init__.py +0 -0
- {pyredshift-1.12 → pyredshift-1.13}/src/pyredshift/pyredshift-help.html +0 -0
- {pyredshift-1.12 → pyredshift-1.13}/src/pyredshift/pyredshift.lines +0 -0
- {pyredshift-1.12 → pyredshift-1.13}/src/pyredshift.egg-info/SOURCES.txt +0 -0
- {pyredshift-1.12 → pyredshift-1.13}/src/pyredshift.egg-info/dependency_links.txt +0 -0
- {pyredshift-1.12 → pyredshift-1.13}/src/pyredshift.egg-info/requires.txt +0 -0
- {pyredshift-1.12 → 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
|
|
|
@@ -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(),
|
|
@@ -53,6 +53,9 @@ 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
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.
|
|
56
59
|
"""
|
|
57
60
|
|
|
58
61
|
import ctypes
|
|
@@ -92,7 +95,7 @@ try:
|
|
|
92
95
|
except AttributeError:
|
|
93
96
|
pass
|
|
94
97
|
|
|
95
|
-
__version__ = "1.
|
|
98
|
+
__version__ = "1.13"
|
|
96
99
|
|
|
97
100
|
C_LIGHT = 2.99792458e8 # m/s
|
|
98
101
|
|
|
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
|
|
File without changes
|