PyNOT-redux 2.2.4__tar.gz → 2.2.5__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 (117) hide show
  1. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/PKG-INFO +1 -1
  2. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/PyNOT_redux.egg-info/PKG-INFO +1 -1
  3. pynot_redux-2.2.5/pynot/VERSION +1 -0
  4. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calibs.py +8 -1
  5. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/main.py +14 -7
  6. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/viewer/viewer.py +6 -9
  7. pynot_redux-2.2.4/pynot/VERSION +0 -1
  8. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/.gitattributes +0 -0
  9. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/.github/dependabot.yml +0 -0
  10. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/.gitignore +0 -0
  11. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/LICENSE +0 -0
  12. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/MANIFEST.in +0 -0
  13. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/PyNOT_redux.egg-info/SOURCES.txt +0 -0
  14. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/PyNOT_redux.egg-info/dependency_links.txt +0 -0
  15. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/PyNOT_redux.egg-info/entry_points.txt +0 -0
  16. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/PyNOT_redux.egg-info/requires.txt +0 -0
  17. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/PyNOT_redux.egg-info/top_level.txt +0 -0
  18. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/README.md +0 -0
  19. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/.extract_msg +0 -0
  20. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/.identify_msg +0 -0
  21. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/.instrument.cfg +0 -0
  22. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/.response_msg +0 -0
  23. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/__init__.py +0 -0
  24. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/alfosc.py +0 -0
  25. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/HeAr_linelist.dat +0 -0
  26. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/HeNe_linelist.dat +0 -0
  27. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/ThAr_linelist.dat +0 -0
  28. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/al-gr18_pixeltable.dat +0 -0
  29. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/al-gr19_pixeltable.dat +0 -0
  30. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/al-gr4_pixeltable.dat +0 -0
  31. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/al-gr7_pixeltable.dat +0 -0
  32. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/alfosc_filters.dat +0 -0
  33. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/default_options.yml +0 -0
  34. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/default_options_img.yml +0 -0
  35. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/ef-gr13_pixeltable.dat +0 -0
  36. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/ef-gr14_pixeltable.dat +0 -0
  37. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/ef-gr1_pixeltable.dat +0 -0
  38. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/ef-gr3_pixeltable.dat +0 -0
  39. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/efosc_filters.dat +0 -0
  40. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/lapalma.ext +0 -0
  41. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/lasilla.ext +0 -0
  42. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/paranal.ext +0 -0
  43. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/std/bd174708.dat +0 -0
  44. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/std/bd262606.dat +0 -0
  45. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/std/bd332642.dat +0 -0
  46. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/std/bd75325.dat +0 -0
  47. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/std/eg21.dat +0 -0
  48. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/std/feige110.dat +0 -0
  49. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/std/feige34.dat +0 -0
  50. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/std/gd153.dat +0 -0
  51. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/std/gd50.dat +0 -0
  52. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/std/gd71.dat +0 -0
  53. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/std/hd19445.dat +0 -0
  54. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/std/hd84937.dat +0 -0
  55. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/std/hd93521.dat +0 -0
  56. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/std/he3.dat +0 -0
  57. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/std/hiltner600.dat +0 -0
  58. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/std/ltt3864.dat +0 -0
  59. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/std/tcs_namelist.txt +0 -0
  60. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/calib/std/wolf1346.dat +0 -0
  61. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/data/__init__.py +0 -0
  62. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/data/alfosc.rules +0 -0
  63. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/data/efosc.rules +0 -0
  64. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/data/help/welcome_msg_extract.html +0 -0
  65. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/data/help/welcome_msg_identify.html +0 -0
  66. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/data/help/welcome_msg_response.html +0 -0
  67. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/data/io.py +0 -0
  68. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/data/obs.py +0 -0
  69. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/data/organizer.py +0 -0
  70. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/efosc.py +0 -0
  71. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/extract_gui.py +0 -0
  72. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/extraction.py +0 -0
  73. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/fitsio.py +0 -0
  74. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/functions.py +0 -0
  75. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/identify_gui.py +0 -0
  76. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/images.py +0 -0
  77. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/insconfig.py +0 -0
  78. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/logging.py +0 -0
  79. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/operations.py +0 -0
  80. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/phot.py +0 -0
  81. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/phot_redux.py +0 -0
  82. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/redux.py +0 -0
  83. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/reports.py +0 -0
  84. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/response.py +0 -0
  85. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/response_gui.py +0 -0
  86. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/scired.py +0 -0
  87. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/scombine.py +0 -0
  88. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/skysub.py +0 -0
  89. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/tasks.py +0 -0
  90. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/transients.py +0 -0
  91. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/txtio.py +0 -0
  92. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/viewer/__init__.py +0 -0
  93. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/viewer/containers.py +0 -0
  94. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/viewer/default_linelists.json +0 -0
  95. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/viewer/dust.py +0 -0
  96. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/viewer/linelists.py +0 -0
  97. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/viewer/messages.py +0 -0
  98. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/viewer/models.py +0 -0
  99. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/viewer/notes.py +0 -0
  100. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/viewer/spectrum.py +0 -0
  101. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/viewer/tablemodels.py +0 -0
  102. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/viewer/targets.py +0 -0
  103. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/viewer/templates/Assef_2010.dat +0 -0
  104. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/viewer/templates/FeII.Vestergaard.dat +0 -0
  105. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/viewer/templates/FeIII.Vestergaard.dat +0 -0
  106. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/viewer/templates/Hernan_Caballero_quasar_NIR_template.txt +0 -0
  107. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/viewer/templates/QSO_selsing.dat +0 -0
  108. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/viewer/templates/QSO_template.Krawczyk_all.dat +0 -0
  109. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/viewer/templates/QSO_template.Krawczyk_high.dat +0 -0
  110. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/viewer/templates/QSO_template.Krawczyk_low.dat +0 -0
  111. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/wavecal.py +0 -0
  112. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/wcs.py +0 -0
  113. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pynot/welcome.py +0 -0
  114. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/pyproject.toml +0 -0
  115. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/requirements.txt +0 -0
  116. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/setup.cfg +0 -0
  117. {pynot_redux-2.2.4 → pynot_redux-2.2.5}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyNOT-redux
3
- Version: 2.2.4
3
+ Version: 2.2.5
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.4
3
+ Version: 2.2.5
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 @@
1
+ 2.2.5
@@ -62,6 +62,9 @@ def combine_bias_frames(bias_frames, output='', kappa=15, method='mean', overwri
62
62
  """
63
63
  msg = list()
64
64
 
65
+ if len(bias_frames) == 1:
66
+ msg.append("[WARNING] - Only 1 frame provided! More than 1 frame is expected!!\n")
67
+
65
68
  bias = list()
66
69
  for frame in bias_frames:
67
70
  msg.append(" - Loaded bias frame: %s" % frame)
@@ -172,6 +175,10 @@ def combine_flat_frames(raw_frames, output, mbias='', mode='spec', dispaxis=None
172
175
  The log of the function steps and errors
173
176
  """
174
177
  msg = list()
178
+
179
+ if len(raw_frames) == 1:
180
+ msg.append("[WARNING] - Only 1 frame provided! More than 1 frame is expected!!\n")
181
+
175
182
  if mbias and exists(mbias):
176
183
  bias = fits.getdata(mbias)
177
184
  # bias_hdr = instrument.get_header(mbias)
@@ -380,7 +387,7 @@ def normalize_spectral_flat(fname, output='', fig_dir='', dispaxis=None, order=2
380
387
  if len(edges) != 2:
381
388
  msg.append("[WARNING] - Automatic edge detection failed. Using full frame!")
382
389
  edges = [0, len(x)]
383
- except:
390
+ except Exception:
384
391
  msg.append("[WARNING] - Automatic edge detection failed. Using full frame!")
385
392
  edges = [0, len(x)]
386
393
 
@@ -653,13 +653,13 @@ def main(inspect=False):
653
653
  elif task == 'bias':
654
654
  from pynot.calibs import combine_bias_frames
655
655
  print("Running task: Bias combination")
656
- input_list = np.loadtxt(args.input, dtype=str, usecols=(0,))
656
+ input_list = np.loadtxt(args.input, dtype=str, usecols=(0,), ndmin=1)
657
657
  _, log = combine_bias_frames(input_list, args.output, kappa=args.kappa, method=args.method)
658
658
 
659
659
  elif task == 'sflat':
660
660
  from pynot.calibs import combine_flat_frames, normalize_spectral_flat
661
661
  print("Running task: Spectral flat field combination and normalization")
662
- input_list = np.loadtxt(args.input, dtype=str, usecols=(0,))
662
+ input_list = np.loadtxt(args.input, dtype=str, usecols=(0,), ndmin=1)
663
663
  flatcombine, log = combine_flat_frames(input_list, output='', mbias=args.bias, mode='spec',
664
664
  dispaxis=args.axis, kappa=args.kappa, method=args.method)
665
665
 
@@ -783,10 +783,14 @@ def main(inspect=False):
783
783
  if '*' in input_arg or '?' in input_arg:
784
784
  filelist = glob(input_arg)
785
785
  else:
786
- filelist = np.loadtxt(input_arg, usecols=(0,), dtype=str)
786
+ filelist = np.loadtxt(input_arg, usecols=(0,), dtype=str, ndmin=1)
787
787
  else:
788
788
  filelist = args.input
789
789
 
790
+ if len(filelist) == 1:
791
+ print("Must provide more than one frame to combine!\n")
792
+ sys.exit()
793
+
790
794
  # Check if data are 1D or 2D:
791
795
  try:
792
796
  data = fits.getdata(filelist[0])
@@ -864,7 +868,7 @@ def main(inspect=False):
864
868
  elif task == 'imflat':
865
869
  print("Running task: Combination of Imaging Flat Fields")
866
870
  from pynot.calibs import combine_flat_frames
867
- input_list = np.loadtxt(args.input, dtype=str, usecols=(0,))
871
+ input_list = np.loadtxt(args.input, dtype=str, usecols=(0,), ndmin=1)
868
872
  _, log = combine_flat_frames(input_list, output=args.output, mbias=args.bias, mode='img',
869
873
  kappa=args.kappa, method=args.method)
870
874
 
@@ -884,7 +888,7 @@ def main(inspect=False):
884
888
  if args.input.endswith('.fits'):
885
889
  input_list = [args.input]
886
890
  else:
887
- input_list = np.loadtxt(args.input, dtype=str, usecols=(0,))
891
+ input_list = np.loadtxt(args.input, dtype=str, usecols=(0,), ndmin=1)
888
892
 
889
893
  for fname in input_list:
890
894
  print(" Trimming image: %s" % fname)
@@ -893,7 +897,10 @@ def main(inspect=False):
893
897
  elif task == 'imcombine':
894
898
  print("Running task: Image Combination")
895
899
  from pynot.phot import image_combine
896
- input_list = np.loadtxt(args.input, dtype=str, usecols=(0,))
900
+ input_list = np.loadtxt(args.input, dtype=str, usecols=(0,), ndmin=1)
901
+ if len(input_list) == 1:
902
+ print("Must provide more than one frame to combine!\n")
903
+ sys.exit()
897
904
  options = copy(vars(args))
898
905
  vars_to_remove = ['task', 'input', 'output', 'log', 'fringe']
899
906
  for varname in vars_to_remove:
@@ -903,7 +910,7 @@ def main(inspect=False):
903
910
  elif task == 'fringe':
904
911
  print("Running task: Creating Average Fringe Image")
905
912
  from pynot.phot import create_fringe_image
906
- input_list = np.loadtxt(args.input, dtype=str, usecols=(0,))
913
+ input_list = np.loadtxt(args.input, dtype=str, usecols=(0,), ndmin=1)
907
914
  log = create_fringe_image(input_list, output=args.output, fig_fname=args.fig, threshold=args.sigma)
908
915
 
909
916
  elif task == 'sep':
@@ -627,6 +627,7 @@ class MainWindow(QtWidgets.QMainWindow):
627
627
  if len(self.active_targets._data) != 1:
628
628
  logging.error("Cannot add flags to more than one target at a time. Remove other targets.")
629
629
  return
630
+
630
631
  target_flag = DataFlag(0)
631
632
  for checkbox, val in zip(self.flag_inputs, DataFlag):
632
633
  if checkbox.isChecked():
@@ -634,16 +635,12 @@ class MainWindow(QtWidgets.QMainWindow):
634
635
 
635
636
  target: Target = self.active_targets._data[0]
636
637
  self.target_flags[target.name] = target_flag
637
- target_note = self.target_notes.get(target.name, None)
638
-
639
- if DataFlag.Z_VI_CONFIRM in target_flag:
640
- if target.name not in self.target_notes:
641
- target_note = TargetNote.from_target(target, "Visually updated redshift")
638
+ if target.name not in self.target_notes:
639
+ target_note = TargetNote.from_target(target, "")
640
+ if DataFlag.Z_VI_CONFIRM in target_flag:
642
641
  target_note.redshift = float(self.z_input.text())
643
- self.target_notes[target.name] = target_note
644
- elif target_note and target_note.note == "Visually updated redshift":
645
- target_note.note = ""
646
- self.note_input.setText("")
642
+ target_note.note = "Visually updated redshift"
643
+ self.target_notes[target.name] = target_note
647
644
 
648
645
  def create_notes_toolbar(self):
649
646
  notes_toolbar = QtWidgets.QToolBar()
@@ -1 +0,0 @@
1
- 2.2.4
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