Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: negative dimensions are not allowed when processing proton #77

Open
jproman opened this issue Feb 16, 2023 · 0 comments
Open

Comments

@jproman
Copy link

jproman commented Feb 16, 2023

Hi all

I am having issues at processing proton resonance files. Apparently, when it is trying to find the baseline signal, it ends up having an array with negative dimensions.

Traceback (most recent call last):
File "/lrlhps/users/ys10793/DP5/PyDP4.py", line 844, in
main(settings)
File "/lrlhps/users/ys10793/DP5/PyDP4.py", line 397, in main
NMRData = NMR.NMRData(settings)
File "/lrlhps/users/ys10793/DP5/NMR.py", line 74, in init
self.ProcessProton(settings,ind1)
File "/lrlhps/users/ys10793/DP5/NMR.py", line 214, in ProcessProton
= process_proton(NMR_file, settings,self.Type)
File "/lrlhps/users/ys10793/DP5/Proton_processing.py", line 24, in process_proton
total_spectral_ydata, spectral_xdata_ppm, corr_distance, uc, noise_std, peak_regions = spectral_processing(NMR_file,
File "/lrlhps/users/ys10793/DP5/Proton_processing.py", line 191, in spectral_processing
tydata = ACMEWLRhybrid(total_spectral_ydata, corr_distance)
File "/lrlhps/users/ys10793/DP5/Proton_processing.py", line 400, in ACMEWLRhybrid
classification, sigma = baseline_find_signal(y, corr_distance, True, 1)
File "/lrlhps/users/ys10793/DP5/Proton_processing.py", line 564, in baseline_find_signal
sd_set = _get_sd(sample, wd)
File "/lrlhps/users/ys10793/DP5/Proton_processing.py", line 621, in _get_sd
return np.std(_rolling_window(data, k), -1)
File "/lrlhps/users/ys10793/DP5/Proton_processing.py", line 617, in _rolling_window
return np.lib.stride_tricks.as_strided(a, shape=shape, strides=strides)
File "/lrlhps/users/ys10793/dp5env/lib/python3.8/site-packages/numpy/lib/stride_tricks.py", line 105, in as_strided
array = np.asarray(DummyArray(interface, base=x))
ValueError: negative dimensions are not allowed

Any idea what is going on?

Thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant