42 Commits

Author SHA1 Message Date
d1c2632e81 Merge branch '302-wideline-discontinuous-x' into dev 2024-12-09 14:43:15 +01:00
e19795b51c wide-line spectra handle missing x values better 2024-12-09 12:28:38 +01:00
9c56171524 Merge branch 'master' into dev 2024-11-14 17:20:04 +00:00
6980df1599 import future for type hints 2024-11-14 18:06:06 +01:00
f6b7ebec07 selecting x value as label for point selection should work 2024-10-22 18:54:44 +02:00
8d1ccd22fa change ptstab widgets 2024-10-21 19:52:23 +02:00
0b52fef549 additional parameter for weight factor for increase or decrease 2024-10-16 17:32:20 +02:00
b6b98d292a clicking outside axes no longer emits signal 2024-10-13 18:29:04 +02:00
d90959c6b6 fix typo 2024-10-13 17:28:59 +02:00
e459bd5e54 Merge branch 'master' into dev 2024-10-13 17:21:26 +02:00
24f20f8850 Merge branch 'master' into dev 2024-09-29 17:21:14 +00:00
fc91bf83fe Merge branch 'script-editor' into dev 2024-09-29 19:19:15 +02:00
86f285fba5 randomize 2024-09-29 19:13:26 +02:00
fa84b0382e select type/generation and sorting enabled did not go well together 2024-09-29 16:03:13 +02:00
4b75aa9267 add disclaimer 2024-09-29 15:50:50 +02:00
f185b24967 fix problem with namespaces 2024-09-29 14:33:28 +02:00
d07b85ae27 mvp for script runner 2024-09-26 18:39:55 +02:00
7ad1e4b843 use of properties did not work properly 2024-09-25 18:09:10 +02:00
ff2ff01da7 update internal fit infos after function removal 2024-09-25 17:21:46 +02:00
d9f1c0b8c2 use correct attribute name 2024-09-25 17:20:20 +02:00
9039c44ce7 Merge remote-tracking branch 'origin/dev' into dev 2024-09-23 16:41:19 +02:00
ac6b734f81 only skip points if wanted 2024-09-23 16:38:28 +02:00
9babb73f3a Merge branch 'master' into dev 2024-09-11 15:32:53 +00:00
4f0a7827ba Add standard deviation to averaging methods of pick points 2024-09-11 17:31:58 +02:00
05862730a0 Merge branch 'gga_relaxation' into dev 2024-09-07 19:22:05 +02:00
7fe89eff7f Merge remote-tracking branch 'origin/gga_relaxation' into gga_relaxation 2024-09-07 19:21:01 +02:00
f94f78893c add basic Generalized Gamma for alpha relaxation 2024-09-07 19:20:32 +02:00
fda3257424 plot sub-functions; fixes #282 2024-09-07 19:19:02 +02:00
f30ff3b758 Merge remote-tracking branch 'origin/master' into gga_relaxation 2024-09-05 18:16:27 +02:00
7b61c1244d Merge branch 'master' into dev 2024-07-16 17:00:27 +00:00
e0c287d8a9 plot sub-functions; fixes #282 2024-07-16 18:58:31 +02:00
a8fcd658d9 set fit toolbar a name; fixes #281 2024-07-15 17:42:28 +02:00
dd471ae294 Merge branch 'refs/heads/267-cut-y-range' into dev 2024-06-24 17:55:48 +02:00
ab586ac39a Merge branch 'refs/heads/256-fc-persistence' into dev
# Conflicts:
#	src/gui_qt/main/mainwindow.py
2024-06-24 17:55:13 +02:00
b355aab99d Merge remote-tracking branch 'refs/remotes/origin/255-persisitence-interpolation-dialog' into dev 2024-06-24 17:54:24 +02:00
03cdc225ca add sinc function 2024-06-24 17:53:45 +02:00
e87c6bf2c1 retain settings in interpolation dialog 2024-05-27 18:05:43 +02:00
cc7572fe14 retain settings in FC reader dialog 2024-05-15 17:15:09 +02:00
ef66cf584a increase precision 2024-05-06 18:52:20 +02:00
f0448fac0f cut data at x and y 2024-05-06 18:46:27 +02:00
749a78b550 add to clib 2024-01-13 16:21:19 +01:00
50a811b7ec calculate t1 for generalized gamma 2024-01-09 14:20:20 +01:00
5 changed files with 9 additions and 35 deletions

View File

@ -133,7 +133,7 @@ class QAsciiReader(QtWidgets.QDialog, Ui_ascii_reader):
if self.column_checkBox.isChecked() and self.line_spinBox.isEnabled():
header_line = self.reader.header[self.line_spinBox.value()-1]
header_line = header_line.strip('\n\t\r, ')
header_line = re.sub(r'[\t, ;]+(?!\w*})', ';', header_line)
header_line = re.sub(r'[\t ;,]+', ';', header_line)
self.ascii_table.setHorizontalHeaderLabels(header_line.split(';'))

View File

@ -49,7 +49,7 @@ class AsciiReader:
with self.fname.open('r') as f:
for i, line in enumerate(islice(f, len(self.header)+len(self.lines), num_lines)):
line = line.strip('\n\t\r, ')
line = re.sub(r'[\t, ;]+(?!\w*})', ';', line)
line = re.sub(r'[\t ;,]+', ';', line)
line = line.split(';')
try:
@ -146,11 +146,10 @@ class AsciiReader:
raw_data = raw_data.reshape((1, *raw_data.shape))
if len(x) == 0 or raw_data.shape[2] == 1:
raw_data = raw_data.reshape(raw_data.shape[0], raw_data.shape[2], raw_data.shape[1])
# _temp = np.zeros((raw_data.shape[0], raw_data.shape[2], raw_data.shape[1]))
# _temp[:, :, 0] = np.arange(raw_data.shape[1])
# _temp[:, :, 1:] = raw_data
# raw_data = _temp
_temp = np.zeros((raw_data.shape[0], raw_data.shape[1], raw_data.shape[2]+1))
_temp[:, :, 0] = np.arange(raw_data.shape[1])
_temp[:, :, 1:] = raw_data
raw_data = _temp
if y:
y = [i+1 for i in y]

View File

@ -203,31 +203,6 @@ class Sinc:
return c * np.sinc(((x-x0)/w)/np.pi)
class Sigmoid:
type = 'Basic'
name = 'Sigmoid'
equation = 'C / [1 + exp(-a * (x - x_{0})] + y_{0}'
params = ['C', 'a', 'x_{0}', 'y_{0}']
@staticmethod
def func(x, c, a, x0, y0):
"""
Sigmoid function
.. math::
y = C / [1 + exp(-a * (x - x_0))] + y_0
Args:
x (array_like): Input values
c (float): Prefactor
a (float): Steepness of the sigmoid
x0 (float): x position of the sigmoid's midpoint
y0 (float): y position of the sigmoid's midpoint
"""
return c / (1 + np.exp(-a * (x - x0))) + y0
class Sine:
"""
Wavy sine function

View File

@ -116,7 +116,7 @@ class Peschier:
name = 'Diffusion + Cross-Relaxation'
type = 'Diffusion'
equation = r'Diffusion with cross-relax f(ast) \rightarrow s(low)'
params = ['M_{0}', 'D', 'T_{1f}', 'T_{1s}', 'k', 'p_{f}', 't_{ev}', 'g']
params = ['M_{0}', 'D', 'T_{1,f}', 'T_{1,s}', 'k', 'p_{f}', 't_{ev}', 'g']
bounds = [(0, None), (0, None), (0, None), (0, None), (0, None), (0, None)]
choices = [(r'\gamma', 'nucleus', gamma)]

View File

@ -75,7 +75,7 @@ class TwoSatRecAbsolute:
type = 'Relaxation'
name = 'Two-step relaxation (abs. int)'
equation = r'M_{0} + \Sigma \DeltaM_{i}(1-exp(-(x/T_{1,i})^{\beta_{i}}))'
params = [r'\DeltaM_{1}', 'T_{11}', r'\beta_{1}', r'\DeltaM_{2}', 'T_{12}', r'\beta_{2}', 'M_{0}']
params = [r'\DeltaM_{1}', 'T_{1,1}', r'\beta_{1}', r'\DeltaM_{2}', 'T_{1,2}', r'\beta_{2}', 'M_{0}']
choices = [('Type', 'is_inv', {'Saturation': False, 'Inversion': True})]
bounds = [(0, None), (0, None), (0, 1), (0, None), (0, None), (0, 1), (None, None)]
@ -92,7 +92,7 @@ class TwoSatRecRelative:
name = 'Two-step relaxation (rel. int)'
equation = r'M_{0} + \DeltaM[R(1-exp(-(x/T_{1,1})^{\beta_{1}})) + \n'\
r'(1-R)(1-exp(-(x/T_{1,2})^{\beta_{2}}))]'
params = [r'\DeltaM', 'M_{0}', 'T_{11}', r'\beta_{1}', 'T_{12}', r'\beta_{2}', 'R']
params = [r'\DeltaM', 'M_{0}', 'T_{1,1}', r'\beta_{1}', 'T_{1,2}', r'\beta_{2}', 'R']
choices = [('Type', 'kind', {'Saturation': 'sat', 'Inversion': 'inv'})]
bounds = [(0, None), (None, None), (0, None), (0, 1), (0, None), (0, 1), (0, 1)]