forked from IPKM/nmreval
assert that log scale is finite
This commit is contained in:
parent
a5216b1eed
commit
0eca306ebe
@ -4,7 +4,7 @@ import itertools
|
|||||||
import os
|
import os
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from math import isnan
|
from math import isfinite
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
@ -493,9 +493,9 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
|
|||||||
with errstate(all='ignore'):
|
with errstate(all='ignore'):
|
||||||
xy = [log10(val) for val in xy]
|
xy = [log10(val) for val in xy]
|
||||||
|
|
||||||
if isnan(xy[1]):
|
if not isfinite(xy[1]):
|
||||||
xy = [-1, 1]
|
xy = [-1, 1]
|
||||||
elif isnan(xy[0]):
|
elif not isfinite(xy[0]):
|
||||||
xy[0] = xy[1]-4
|
xy[0] = xy[1]-4
|
||||||
|
|
||||||
func(xy[0], xy[1], padding=0)
|
func(xy[0], xy[1], padding=0)
|
||||||
|
Loading…
Reference in New Issue
Block a user