PyNOT-redux 2.2.2__tar.gz → 2.2.4__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.
Files changed (118) hide show
  1. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/PKG-INFO +1 -1
  2. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/PyNOT_redux.egg-info/PKG-INFO +1 -1
  3. pynot_redux-2.2.4/PyNOT_redux.egg-info/top_level.txt +5 -0
  4. pynot_redux-2.2.4/pynot/VERSION +1 -0
  5. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/data/io.py +5 -1
  6. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/data/obs.py +5 -1
  7. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/functions.py +5 -1
  8. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/identify_gui.py +8 -8
  9. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/main.py +8 -2
  10. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/viewer/notes.py +2 -2
  11. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/viewer/spectrum.py +2 -2
  12. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/viewer/viewer.py +35 -6
  13. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/setup.py +2 -2
  14. pynot_redux-2.2.2/PyNOT_redux.egg-info/top_level.txt +0 -1
  15. pynot_redux-2.2.2/pynot/VERSION +0 -1
  16. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/.gitattributes +0 -0
  17. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/.github/dependabot.yml +0 -0
  18. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/.gitignore +0 -0
  19. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/LICENSE +0 -0
  20. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/MANIFEST.in +0 -0
  21. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/PyNOT_redux.egg-info/SOURCES.txt +0 -0
  22. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/PyNOT_redux.egg-info/dependency_links.txt +0 -0
  23. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/PyNOT_redux.egg-info/entry_points.txt +0 -0
  24. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/PyNOT_redux.egg-info/requires.txt +0 -0
  25. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/README.md +0 -0
  26. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/.extract_msg +0 -0
  27. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/.identify_msg +0 -0
  28. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/.instrument.cfg +0 -0
  29. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/.response_msg +0 -0
  30. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/__init__.py +0 -0
  31. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/alfosc.py +0 -0
  32. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/HeAr_linelist.dat +0 -0
  33. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/HeNe_linelist.dat +0 -0
  34. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/ThAr_linelist.dat +0 -0
  35. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/al-gr18_pixeltable.dat +0 -0
  36. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/al-gr19_pixeltable.dat +0 -0
  37. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/al-gr4_pixeltable.dat +0 -0
  38. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/al-gr7_pixeltable.dat +0 -0
  39. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/alfosc_filters.dat +0 -0
  40. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/default_options.yml +0 -0
  41. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/default_options_img.yml +0 -0
  42. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/ef-gr13_pixeltable.dat +0 -0
  43. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/ef-gr14_pixeltable.dat +0 -0
  44. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/ef-gr1_pixeltable.dat +0 -0
  45. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/ef-gr3_pixeltable.dat +0 -0
  46. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/efosc_filters.dat +0 -0
  47. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/lapalma.ext +0 -0
  48. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/lasilla.ext +0 -0
  49. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/paranal.ext +0 -0
  50. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/std/bd174708.dat +0 -0
  51. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/std/bd262606.dat +0 -0
  52. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/std/bd332642.dat +0 -0
  53. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/std/bd75325.dat +0 -0
  54. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/std/eg21.dat +0 -0
  55. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/std/feige110.dat +0 -0
  56. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/std/feige34.dat +0 -0
  57. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/std/gd153.dat +0 -0
  58. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/std/gd50.dat +0 -0
  59. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/std/gd71.dat +0 -0
  60. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/std/hd19445.dat +0 -0
  61. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/std/hd84937.dat +0 -0
  62. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/std/hd93521.dat +0 -0
  63. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/std/he3.dat +0 -0
  64. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/std/hiltner600.dat +0 -0
  65. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/std/ltt3864.dat +0 -0
  66. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/std/tcs_namelist.txt +0 -0
  67. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calib/std/wolf1346.dat +0 -0
  68. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/calibs.py +0 -0
  69. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/data/__init__.py +0 -0
  70. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/data/alfosc.rules +0 -0
  71. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/data/efosc.rules +0 -0
  72. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/data/help/welcome_msg_extract.html +0 -0
  73. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/data/help/welcome_msg_identify.html +0 -0
  74. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/data/help/welcome_msg_response.html +0 -0
  75. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/data/organizer.py +0 -0
  76. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/efosc.py +0 -0
  77. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/extract_gui.py +0 -0
  78. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/extraction.py +0 -0
  79. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/fitsio.py +0 -0
  80. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/images.py +0 -0
  81. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/insconfig.py +0 -0
  82. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/logging.py +0 -0
  83. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/operations.py +0 -0
  84. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/phot.py +0 -0
  85. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/phot_redux.py +0 -0
  86. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/redux.py +0 -0
  87. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/reports.py +0 -0
  88. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/response.py +0 -0
  89. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/response_gui.py +0 -0
  90. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/scired.py +0 -0
  91. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/scombine.py +0 -0
  92. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/skysub.py +0 -0
  93. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/tasks.py +0 -0
  94. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/transients.py +0 -0
  95. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/txtio.py +0 -0
  96. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/viewer/__init__.py +0 -0
  97. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/viewer/containers.py +0 -0
  98. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/viewer/default_linelists.json +0 -0
  99. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/viewer/dust.py +0 -0
  100. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/viewer/linelists.py +0 -0
  101. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/viewer/messages.py +0 -0
  102. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/viewer/models.py +0 -0
  103. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/viewer/tablemodels.py +0 -0
  104. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/viewer/targets.py +0 -0
  105. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/viewer/templates/Assef_2010.dat +0 -0
  106. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/viewer/templates/FeII.Vestergaard.dat +0 -0
  107. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/viewer/templates/FeIII.Vestergaard.dat +0 -0
  108. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/viewer/templates/Hernan_Caballero_quasar_NIR_template.txt +0 -0
  109. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/viewer/templates/QSO_selsing.dat +0 -0
  110. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/viewer/templates/QSO_template.Krawczyk_all.dat +0 -0
  111. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/viewer/templates/QSO_template.Krawczyk_high.dat +0 -0
  112. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/viewer/templates/QSO_template.Krawczyk_low.dat +0 -0
  113. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/wavecal.py +0 -0
  114. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/wcs.py +0 -0
  115. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pynot/welcome.py +0 -0
  116. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/pyproject.toml +0 -0
  117. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/requirements.txt +0 -0
  118. {pynot_redux-2.2.2 → pynot_redux-2.2.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyNOT-redux
3
- Version: 2.2.2
3
+ Version: 2.2.4
4
4
  Summary: Data Reduction Pipeline for NOT/ALFOSC
5
5
  Home-page: https://github.com/jkrogager/PyNOT
6
6
  Author: Jens-Kristian Krogager
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyNOT-redux
3
- Version: 2.2.2
3
+ Version: 2.2.4
4
4
  Summary: Data Reduction Pipeline for NOT/ALFOSC
5
5
  Home-page: https://github.com/jkrogager/PyNOT
6
6
  Author: Jens-Kristian Krogager
@@ -0,0 +1,5 @@
1
+ build
2
+ dist
3
+ docs
4
+ pynot
5
+ tests
@@ -0,0 +1 @@
1
+ 2.2.4
@@ -6,6 +6,7 @@ Input / Output functions for the DataSet class.
6
6
 
7
7
  from astropy.io import fits
8
8
  import numpy as np
9
+ import warnings
9
10
 
10
11
  from pynot.data.organizer import TagDatabase
11
12
  from pynot import instrument
@@ -77,7 +78,10 @@ def save_database(database, output_fname):
77
78
 
78
79
  def load_database(input_fname):
79
80
  """Load file database from file."""
80
- all_lines = np.loadtxt(input_fname, dtype=str, usecols=(0, 1), comments='##')
81
+ with warnings.catch_warnings():
82
+ # Suppress empty line warning from numpy 1.23+
83
+ warnings.simplefilter('ignore', UserWarning)
84
+ all_lines = np.loadtxt(input_fname, dtype=str, usecols=(0, 1), comments='##')
81
85
  # file_database = {key: val for key, val in all_lines}
82
86
  # inactive_files = {key: val for key, val in all_lines}
83
87
  file_database = {}
@@ -2,6 +2,7 @@
2
2
  from collections import defaultdict
3
3
  import numpy as np
4
4
  import os
5
+ import warnings
5
6
 
6
7
  from pynot.data import io
7
8
  from pynot.data import organizer as do
@@ -12,7 +13,10 @@ output_base_spec = 'spectra'
12
13
  class OBDatabase:
13
14
  def __init__(self, fname):
14
15
  if os.path.exists(fname):
15
- data = np.loadtxt(fname, dtype=str, delimiter=':')
16
+ with warnings.catch_warnings():
17
+ # Suppress empty line warning from numpy 1.23+
18
+ warnings.simplefilter('ignore', UserWarning)
19
+ data = np.loadtxt(fname, dtype=str, delimiter=':')
16
20
  if len(data.shape) == 1:
17
21
  data = np.array([data])
18
22
  self.data = {obid.strip(): status.strip() for obid, status in data}
@@ -3,6 +3,7 @@ import numpy as np
3
3
  import yaml
4
4
  import os
5
5
  import glob
6
+ import warnings
6
7
 
7
8
  from pynot import instrument
8
9
 
@@ -15,7 +16,10 @@ standard_stars = [fname.strip('.dat') for fname in _standard_star_files]
15
16
  # Look-up table from target-names -> star names
16
17
  # (mostly used for ALFOSC where TCSTGT is different)
17
18
  std_fname = os.path.join(path, 'calib/std/tcs_namelist.txt')
18
- calib_names = np.loadtxt(std_fname, dtype=str, delimiter=':')
19
+ with warnings.catch_warnings():
20
+ # Suppress warning about empty rows not counting towards max_rows
21
+ warnings.simplefilter('ignore', UserWarning)
22
+ calib_names = np.loadtxt(std_fname, dtype=str, delimiter=':')
19
23
  tcs_standard_stars = {row[1].strip(): row[0].strip() for row in calib_names}
20
24
 
21
25
 
@@ -188,20 +188,20 @@ class ResidualView(object):
188
188
  line.set_visible(visible)
189
189
 
190
190
  def set_scatter(self, sig):
191
- self.u68_line.set_ydata(self.mean + sig)
192
- self.l68_line.set_ydata(self.mean - sig)
191
+ self.u68_line.set_ydata([self.mean + sig])
192
+ self.l68_line.set_ydata([self.mean - sig])
193
193
  self.scatter = sig
194
194
 
195
195
  def set_mean(self, mean):
196
- self.u68_line.set_ydata(mean + self.scatter)
197
- self.l68_line.set_ydata(mean - self.scatter)
196
+ self.u68_line.set_ydata([mean + self.scatter])
197
+ self.l68_line.set_ydata([mean - self.scatter])
198
198
  self.mean = mean
199
199
 
200
200
  def set_values(self, mean, scatter):
201
201
  self.mean = mean
202
202
  self.scatter = scatter
203
- self.u68_line.set_ydata(mean + scatter)
204
- self.l68_line.set_ydata(mean - scatter)
203
+ self.u68_line.set_ydata([mean + scatter])
204
+ self.l68_line.set_ydata([mean - scatter])
205
205
 
206
206
 
207
207
  def load_linelist(fname):
@@ -912,7 +912,7 @@ class GraphicInterface(QtWidgets.QMainWindow):
912
912
  item.setBackground(QtGui.QColor('lightgray'))
913
913
  self.linetable.setItem(idx, 0, item)
914
914
  self.pixel_list[idx] = x_cen
915
- self.vlines[idx].set_xdata(x_cen)
915
+ self.vlines[idx].set_xdata([x_cen])
916
916
  self.update_plot()
917
917
 
918
918
  def refit_all(self):
@@ -1304,7 +1304,7 @@ class Image2DWindow(QtWidgets.QDialog):
1304
1304
  def update_loc(self):
1305
1305
  new_loc = int(self.loc_editor.text())
1306
1306
  self.loc = new_loc
1307
- self.loc_line.set_xdata(new_loc)
1307
+ self.loc_line.set_xdata([new_loc])
1308
1308
  self.canvas.draw()
1309
1309
 
1310
1310
  def update_info(self):
@@ -15,7 +15,6 @@ import os
15
15
  import sys
16
16
  import numpy as np
17
17
  import warnings
18
- import distutils
19
18
 
20
19
  from pynot.functions import get_options, get_option_descr, get_version_number
21
20
 
@@ -38,6 +37,13 @@ def print_credits():
38
37
  print(" version %s\n" % __version__)
39
38
  print("")
40
39
 
40
+ def _strtobool(val: str) -> bool:
41
+ val = val.lower()
42
+ if val in ('y', 'yes', 't', 'true', 'on', '1'):
43
+ return True
44
+ if val in ('n', 'no', 'f', 'false', 'off', '0'):
45
+ return False
46
+ raise ValueError(f"Invalid truth value {val!r}")
41
47
 
42
48
  def set_default_pars(parser, *, section, default_type, ignore_pars=[], mode='spec'):
43
49
  if mode == 'spec':
@@ -56,7 +62,7 @@ def set_default_pars(parser, *, section, default_type, ignore_pars=[], mode='spe
56
62
  if val is None:
57
63
  value_type = default_type
58
64
  if isinstance(val, bool):
59
- value_type = lambda x: bool(distutils.util.strtobool(x))
65
+ value_type = lambda x: bool(_strtobool(x))
60
66
  else:
61
67
  value_type = type(val)
62
68
 
@@ -62,7 +62,7 @@ class TargetNote:
62
62
 
63
63
 
64
64
  REDSHIFT_NAMES = ['REDSHIFT', 'Z_SPEC', 'ZBEST', 'Z_PIPE', 'ZSPEC', 'Z', 'ZFIT', 'Z_VI']
65
- ID_NAMES = ['OBJ_NME', 'OBJ_UID', 'SPECUID', 'NAME', 'OBJECT', 'TARGET', 'TARGETID', 'ID', 'UID', 'FILENAME']
65
+ ID_NAMES = ['SPECUID', 'FILENAME', 'PROV', 'OBJ_NME', 'OBJ_UID', 'NAME', 'OBJECT', 'TARGET', 'TARGETID', 'ID', 'UID']
66
66
  CLASS_NAMES = ['TYPE', 'ZBESTTYPE', 'SPECTYPE', 'CLASS', 'CLASSIFICATION', 'OBJ_CLS']
67
67
 
68
68
 
@@ -162,7 +162,7 @@ def redshift_table_lookup(redshift_table, spectrum):
162
162
  """
163
163
  name_column = redshift_table.meta['NAME_COLUMN']
164
164
 
165
- if name_column.upper() == 'FILENAME':
165
+ if name_column.upper() == 'FILENAME' or name_column.upper() == 'PROV':
166
166
  name = spectrum.filename
167
167
 
168
168
  else:
@@ -83,9 +83,9 @@ class Spectrum:
83
83
  plot_graph.setLabel("bottom", f"Spectral Axis [{self.wavelength.unit}]")
84
84
  self.plot_line = line
85
85
  if yerr is not None:
86
- err_color = QtGui.QColor(color)
86
+ err_color = QtGui.QColor('red')
87
87
  h, s, l, a = err_color.getHsl()
88
- err_color.setHsl(h, int(s*0.5), 192, 128)
88
+ err_color.setHsl(h, int(s*0.8), l, 200)
89
89
  err_pen = pg.mkPen(color=err_color, style=ls)
90
90
  error_line = plot_graph.plot(self.wavelength, yerr, pen=err_pen,
91
91
  name=f"{self.parent.name} {self.name} 1σ")
@@ -46,11 +46,11 @@ from pynot.viewer.linelists import LineManagerDialog
46
46
 
47
47
 
48
48
  color_list = cycle([
49
- "#3949AB",
50
- "#D81B60",
51
- "#009688",
52
- "#8E24AA",
53
- "#CCA000",
49
+ # "#3949AB",
50
+ # "#D81B60",
51
+ # "#009688",
52
+ # "#8E24AA",
53
+ # "#CCA000",
54
54
  "#202020",
55
55
  ])
56
56
 
@@ -81,7 +81,7 @@ class MainWindow(QtWidgets.QMainWindow):
81
81
  self.linelists["All"] = superset
82
82
  self.line_objects = []
83
83
  self.active_lines = []
84
- self.linePen = pg.mkPen(color=(100, 100, 100, 150))
84
+ self.linePen = pg.mkPen(color='RoyalBlue')
85
85
 
86
86
  self.all_targets = TableModel([])
87
87
  self.active_targets = ActiveTableModel([])
@@ -706,6 +706,13 @@ class MainWindow(QtWidgets.QMainWindow):
706
706
  self.slider_scale = 100_000
707
707
  self.slider.setRange(int(-0.1*self.slider_scale), int(7*self.slider_scale))
708
708
 
709
+ self.z_plus_btn = QtWidgets.QPushButton("+")
710
+ self.z_minus_btn = QtWidgets.QPushButton("-")
711
+ self.z_plus_btn.clicked.connect(self.z_increment)
712
+ self.z_minus_btn.clicked.connect(self.z_decrement)
713
+ self.z_reset_btn = QtWidgets.QPushButton("Reset z")
714
+ self.z_reset_btn.clicked.connect(self.reset_table_redshift)
715
+
709
716
  self.z_input = QtWidgets.QLineEdit("0.0")
710
717
  self.z_input.setFixedWidth(60)
711
718
 
@@ -713,7 +720,10 @@ class MainWindow(QtWidgets.QMainWindow):
713
720
  lines_toolbar.addWidget(self.linelist_edit_btn)
714
721
  lines_toolbar.addWidget(QtWidgets.QLabel("Redshift: "))
715
722
  lines_toolbar.addWidget(self.slider)
723
+ lines_toolbar.addWidget(self.z_plus_btn)
724
+ lines_toolbar.addWidget(self.z_minus_btn)
716
725
  lines_toolbar.addWidget(self.z_input)
726
+ lines_toolbar.addWidget(self.z_reset_btn)
717
727
  self.slider.valueChanged.connect(self.update_from_slider)
718
728
  self.z_input.editingFinished.connect(self.update_from_text)
719
729
  self.addToolBar(lines_toolbar)
@@ -787,6 +797,24 @@ class MainWindow(QtWidgets.QMainWindow):
787
797
  except (ValueError, TypeError):
788
798
  logging.error("Invalid redshift input: {z}. Must be a numeral")
789
799
 
800
+ def z_increment(self):
801
+ z = float(self.z_input.text())
802
+ self.update_redshift(z + 0.0001)
803
+
804
+ def z_decrement(self):
805
+ z = float(self.z_input.text())
806
+ self.update_redshift(z - 0.0001)
807
+
808
+ def reset_table_redshift(self):
809
+ targets = self.get_real_active_targets()
810
+ if len(targets) != 1:
811
+ return
812
+
813
+ target = targets[0]
814
+ if self.redshift_table and len(target.spectra) > 0:
815
+ z, spectype = redshift_table_lookup(self.redshift_table, target.spectra[0])
816
+ self.update_redshift(z)
817
+
790
818
  def toggle_gridlines(self):
791
819
  show_grid = self.grid_radio_button.isChecked()
792
820
  self.plot_graph.showGrid(x=show_grid, y=show_grid)
@@ -899,6 +927,7 @@ class MainWindow(QtWidgets.QMainWindow):
899
927
  def resample_target(self):
900
928
  current = self.active_table.selectedIndexes()
901
929
  logging.info(f"Currently selected target(s): {current}")
930
+ logging.info("Resampling is not implemented yet")
902
931
 
903
932
  def show_log_window(self, event):
904
933
  self.log_dialog.show()
@@ -6,7 +6,7 @@ https://github.com/pypa/sampleproject
6
6
  """
7
7
 
8
8
  # Always prefer setuptools over distutils
9
- from setuptools import setup, find_packages
9
+ from setuptools import setup, find_namespace_packages
10
10
  # To use a consistent encoding
11
11
  from codecs import open
12
12
  from os import path
@@ -87,7 +87,7 @@ setup(
87
87
 
88
88
  # You can just specify the packages manually here if your project is
89
89
  # simple. Or you can use find_packages().
90
- packages=find_packages(exclude=['docs', 'tests']),
90
+ packages=find_namespace_packages(exclude=['docs', 'tests']),
91
91
 
92
92
  # Alternatively, if you want to distribute just a my_module.py, uncomment
93
93
  # this:
@@ -1 +0,0 @@
1
- pynot
@@ -1 +0,0 @@
1
- 2.2.2
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes