Skip to content

Commit

Permalink
Logspace Error fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
smalex-z committed Jun 29, 2023
1 parent 4c5df1e commit 0bc6f32
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sas/qtgui/Calculators/GenericScatteringCalculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import logging
import time
import timeit
import math

from scipy.spatial.transform import Rotation

Expand Down Expand Up @@ -1190,11 +1191,10 @@ def _create_default_1d_data(self):
# Default values
xmax = self.qmax_x
xmin = self.qmin_x
print("Written Min: " + str(self.txtQxMax.text()) + " Written Max" + str(self.txtQxMax.text()) )
print("Min: " + str(xmin) + " Max" + str(xmax) )
qstep = self.npts_x
x = numpy.logspace(start=xmin, stop=xmax, num=qstep, endpoint=True) if self.checkboxLogSpace.isChecked() else numpy.linspace(start=xmin, stop=xmax, num=qstep, endpoint=True)
x = numpy.logspace(start=math.log(xmin,10), stop=math.log(xmax,10), num=qstep, endpoint=True) if self.checkboxLogSpace.isChecked() else numpy.linspace(start=xmin, stop=xmax, num=qstep, endpoint=True)
# store x and y bin centers in q space
print(x)
y = numpy.ones(len(x))
dy = numpy.zeros(len(x))
dx = numpy.zeros(len(x))
Expand Down

0 comments on commit 0bc6f32

Please sign in to comment.