added first version of a backup system (#37)

Co-authored-by: Dominik Demuth <dominik.demuth@physik.tu-darmstadt.de>
Reviewed-on: #37
This commit is contained in:
2023-04-05 17:50:06 +00:00
parent 2fbaa94109
commit 43285b4bd5
3 changed files with 27 additions and 2 deletions

View File

@ -7,6 +7,7 @@ import uuid
from math import isnan
from pathlib import Path
import numpy as np
from numpy import errstate, floor, log10
from pyqtgraph import GraphicsObject, getConfigOption, mkColor
@ -137,7 +138,13 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
r = self.plotItem.getViewBox().viewRange()
for i in [0, 1]:
if self.log[i]:
r[i] = tuple([10**x for x in r[i]])
tmp = [np.nan, np.nan]
for j, x in enumerate(r[i]):
try:
tmp[j] = 10**x
except OverflowError:
pass
r[i] = tuple(tmp)
else:
r[i] = tuple(r[i])