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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyredshift
3
- Version: 1.12
3
+ Version: 1.13
4
4
  Summary: Interactive redshifting of 1D astronomical spectra (Python successor of pdlredshift / redshift.f)
5
5
  Home-page: https://github.com/karlglazebrook/pyredshift
6
6
  Author: Karl Glazebrook
@@ -75,10 +75,15 @@ def read_csv(fname):
75
75
  continue
76
76
  parts = line.split(",")
77
77
  try:
78
- wav.append(float(parts[0]))
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.12",
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.12"
98
+ __version__ = "1.13"
96
99
 
97
100
  C_LIGHT = 2.99792458e8 # m/s
98
101
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyredshift
3
- Version: 1.12
3
+ Version: 1.13
4
4
  Summary: Interactive redshifting of 1D astronomical spectra (Python successor of pdlredshift / redshift.f)
5
5
  Home-page: https://github.com/karlglazebrook/pyredshift
6
6
  Author: Karl Glazebrook
File without changes
File without changes
File without changes
File without changes