Closed magnetomeo closed 3 years ago
Hi, I was trying out the fitting script (python 4state_fit_v3.py) interpreted w/ python2.7.16 and I am receiving the following result/error message:
Number of floating variables = 14 Free variables ['pB', 'pC', 'pD', 'dwB', 'dwC', 'dwD', 'kexAB', 'kexCD', 'kexBC', 'kexAD', 'R1', 'R2', 'R2c', 'R2d'] Fixed variables [] Intensities used for fitting
Number of floating variables = 12 Free variables ['pB', 'pC', 'pD', 'dwC', 'kexAB', 'kexCD', 'kexBC', 'kexAD', 'R1', 'R2', 'R2c', 'R2d'] Fixed variables ['dwB', 'dwD'] Intensities used for fitting
Shared parameters ['pB', 'pC', 'pD', 'kexAB', 'kexCD', 'kexBC', 'kexAD'] Traceback (most recent call last): File "4state_fit_v3.py", line 1420, in shared_fit() File "4state_fit_v3.py", line 1318, in shared_fit [popt, pcov] = curve_fit(simulate_cest_sets, 'test', intensity_master, p0=initial_vals, sigma=intensity_master_error, bounds=(lower_bounds, upper_bounds), method='trf') File "C:\Users\Python\Python27\lib\site-packages\scipy\optimize\minpack.py", line 716, in curve_fit xdata = xdata.astype(float) AttributeError: 'str' object has no attribute 'astype'
Any idea how to solve this?
Many thanks in advance, and thank you for sharing the script!
Sure, this is likely due to the scipy package. Could you downgrade your scipy to version 1.2.1? This may solve the issue. Thanks for your report!
Thanks! It worked like a charm.
Hi, I was trying out the fitting script (python 4state_fit_v3.py) interpreted w/ python2.7.16 and I am receiving the following result/error message:
Number of floating variables = 14 Free variables ['pB', 'pC', 'pD', 'dwB', 'dwC', 'dwD', 'kexAB', 'kexCD', 'kexBC', 'kexAD', 'R1', 'R2', 'R2c', 'R2d'] Fixed variables [] Intensities used for fitting
Number of floating variables = 12 Free variables ['pB', 'pC', 'pD', 'dwC', 'kexAB', 'kexCD', 'kexBC', 'kexAD', 'R1', 'R2', 'R2c', 'R2d'] Fixed variables ['dwB', 'dwD'] Intensities used for fitting
Shared parameters ['pB', 'pC', 'pD', 'kexAB', 'kexCD', 'kexBC', 'kexAD'] Traceback (most recent call last): File "4state_fit_v3.py", line 1420, in
shared_fit()
File "4state_fit_v3.py", line 1318, in shared_fit
[popt, pcov] = curve_fit(simulate_cest_sets, 'test', intensity_master, p0=initial_vals, sigma=intensity_master_error, bounds=(lower_bounds, upper_bounds), method='trf')
File "C:\Users\Python\Python27\lib\site-packages\scipy\optimize\minpack.py", line 716, in curve_fit
xdata = xdata.astype(float)
AttributeError: 'str' object has no attribute 'astype'
Any idea how to solve this?
Many thanks in advance, and thank you for sharing the script!