Compare commits

...

3 Commits

  1. 15
      antab_editor_lib/edit_widget.py
  2. 10
      antab_editor_lib/meta_data.py
  3. 2
      setup.py

15
antab_editor_lib/edit_widget.py

@ -75,6 +75,21 @@ class FillWidget(QWidget):
continue
if method == "interpolating":
valid_series = data.loc[data[target].notna(), target]
if len(valid_series.index) > \
len(set(valid_series.index)):
seen = set()
# set.add return None, the "or" just lets us add and check
# in the same loop
duplicates = [x for x in valid_series.index
if x in seen or seen.add(x)]
QMessageBox.warning(
self, f"Interpolation failed for {target}",
f"Double timestamps for channel {target}:\n" +
"\n".join(d.strftime("%j %H:%M:%S")
for d in duplicates))
# it is quite likely that other channels have this same
# problem, so go back to the user immediately
break
valid_values = valid_series.to_numpy()
# interpolation method copied from Benito's antabfs_interpolate

10
antab_editor_lib/meta_data.py

@ -310,8 +310,14 @@ class MetaData:
try:
self.fits_cache = pickle.load(f)
if check_cached_experiments(self.fits_cache):
print("Using FITS cache.")
use_cache = True
if (isinstance(self.fits_cache, SpectralFitsData)
!= read_spectral):
print("Cached spectral mode differs from "
"requested spectral mode, "
"refreshing cache")
else:
print("Using FITS cache.")
use_cache = True
else:
print("FITS cache exists, but does not contain the "
"requested experiments.")

2
setup.py

@ -4,7 +4,7 @@ import setuptools
setuptools.setup(
name="antab_editor",
version="0.11.2",
version="0.11.3",
author="Bob Eldering",
author_email="eldering@jive.eu",
description="Antab editor",

Loading…
Cancel
Save