T1+T2 calculation now always iterates over all args that can be from data
This commit is contained in:
parent
dee1271fe1
commit
d8e5de6b7a
@ -1176,21 +1176,23 @@ class UpperManagement(QtCore.QObject):
|
||||
_x = x1 = self.data[params[0]].x
|
||||
|
||||
x2 = opts['val2']
|
||||
|
||||
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.convert(_x, *sd_param, from_=opts['tau_type'], to_='raw')
|
||||
sd_param = list(zip(*[self.data[p].y.real if isinstance(p, str) else [p]*len(_x) for p in opts['sd_param'][0]]))
|
||||
|
||||
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]]
|
||||
relax.set_coupling(opts['coup'], parameter=cp_param, keywords=opts['cp_param'][1])
|
||||
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])
|
||||
|
||||
if opts['out'] == 't1':
|
||||
y = relax.t1(x2, _x)
|
||||
else:
|
||||
y = relax.t2(x2, _x)
|
||||
relax_func = relax.t1 if opts['out'] == 't1' else relax.t2
|
||||
y = np.zeros(_x.size)
|
||||
|
||||
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.meta.update(opts)
|
||||
|
Loading…
Reference in New Issue
Block a user