['g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g'] [[(58584.0, 10)], [(61144.0, 10)], [(63213.0, 10)], [(65301.0, 10)], [(65564.0, 10)], [(66386.0, 10)], [(67026.0, 10)], [(67191.0, 10)], [(67400.0, 10)], [(67976.0, 10)], [(69279.0, 10)]] [7030234, 37110063, 6675731, 8611088, 12539195, 64660137, 8064182, 5709396, 56927064, 142038459, 273571071] [[(0, 100)], [(0, 100)], [(0, 100)], [(0, 100)], [(0, 100)], [(0, 100)], [(0, 100)], [(0, 100)], [(0, 100)], [(0, 100)], [(0, 100)]] [None, None, None, None, None, None, None, None, None, None, None] [(58584.0,), (61144.0,), (63213.0,), (65301.0,), (65564.0,), (66386.0,), (67026.0,), (67191.0,), (67400.0,), (67976.0,), (69279.0,)] [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] (200,)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-5-11c5e854b34a> in <module>() 19 print(rIDs) 20 print(box_width) ---> 21 a1,a2,a3,a4,a5 = ng.analysis.linesh.fit_spectrum(data,lsh,params,amps,bounds,ampbounds,centers,rIDs,box_width,0) /Users/kbr/anaconda/lib/python2.7/site-packages/nmrglue/analysis/linesh.pyc in fit_spectrum(spectrum, lineshapes, params, amps, bounds, ampbounds, centers, rIDs, box_width, error_flag, verb, **kw) 271 ecbounds = [[zip(*[ls.add_edge(b, (mn, mx)) for b in zip(*db)]) 272 for ls, mn, mx, db in zip(ls_classes, rmin, rmax, pb)] --> 273 for pb in cbounds] 274 275 # fit the region
Hi,
I'm reworking this tread since I have come about the same problem. This is my first experience with python so forgive me if I ask trivial questions.
Below is some code which reads in a processed spectrum, peak picks it and the tries to deconvolute. The deconvolution fails andfiddling around with the debugger it seems it is the command zip(*db) which fails since db is (0,100) and cannot be unzipped.
This must relate to format of the passed parameters but I cannot find the error. Please Help
import nmrglue as ngimport numpy as np
dic, data = ng.bruker.read_pdata('./Data Files/P31_1D/10/pdata/1')SF=dic['procs']['SF']SW_p=dic['procs']['SW_p']SI=dic['procs']['SI']OFFSET=dic['procs']['OFFSET']AX=np.linspace(OFFSET,OFFSET-SW_p/SF,SI)
peaktab = ng.analysis.peakpick.pick(data,np.max(data)*0.02)# Prepare the inputs for deconvolutionlsh= list('g' for x in range(np.size(peaktab['X_AXIS'])))
params=[]for idx,peak in enumerate(peaktab['X_AXIS']):params.append([tuple((peak,10))])amps=list(data[[int(x) for x in peaktab['X_AXIS']]])bounds=[[(0,100)] for x in range(np.size(peaktab['X_AXIS']))]
ampbounds =[None for x in range(np.size(peaktab['X_AXIS']))]centers = list([(peaktab['X_AXIS'][x],) for x in range(np.size(peaktab['X_AXIS']))])
--
You received this message because you are subscribed to the Google Groups "nmrglue-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nmrglue-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.