T1+T2 calculation now always iterates over all args that can be from data

This commit is contained in:
Dominik Demuth 2023-09-11 19:50:58 +02:00
parent dee1271fe1
commit d8e5de6b7a

View File

@ -1176,21 +1176,23 @@ class UpperManagement(QtCore.QObject):
_x = x1 = self.data[params[0]].x _x = x1 = self.data[params[0]].x
x2 = opts['val2'] x2 = opts['val2']
sd = opts['spec_dens'] sd = opts['spec_dens']
sd_param = [self.data[p].y.real if isinstance(p, str) else p for p in opts['sd_param'][0]] sd_param = list(zip(*[self.data[p].y.real if isinstance(p, str) else [p]*len(_x) for p in opts['sd_param'][0]]))
sd.convert(_x, *sd_param, from_=opts['tau_type'], to_='raw')
relax = Relaxation() relax = Relaxation()
relax.set_distribution(sd, parameter=sd_param, keywords=opts['sd_param'][1]) relax.set_distribution(sd, keywords=opts['sd_param'][1])
cp_param = [self.data[p].y.real if isinstance(p, str) else p for p in opts['cp_param'][0]] cp_param = list(zip(*[self.data[p].y.real if isinstance(p, str) else [p]*len(_x) for p in opts['cp_param'][0]]))
relax.set_coupling(opts['coup'], parameter=cp_param, keywords=opts['cp_param'][1]) # relax.set_coupling(opts['coup'], parameter=cp_param, keywords=opts['cp_param'][1])
if opts['out'] == 't1': relax_func = relax.t1 if opts['out'] == 't1' else relax.t2
y = relax.t1(x2, _x) y = np.zeros(_x.size)
else:
y = relax.t2(x2, _x) for i in range(_x.size):
_x[i] = sd.convert(_x[i], *sd_param[i], from_=opts['tau_type'], to_='raw')
relax.dist_parameter = sd_param[i]
relax.set_coupling(opts['coup'], parameter=cp_param[i], keywords=opts['cp_param'][1])
y[i] = relax_func(x2, _x[i])
pts = Points(x1, y, name=sd.name) pts = Points(x1, y, name=sd.name)
pts.meta.update(opts) pts.meta.update(opts)