SF01M = 400.1324008 #Transmitter Frequency offset in MHz Although I have successfully converted it to a pandas dataframe for easy reading.ĭic, data = ng.bruker.read_pdata('JE-9-27-02/1/pdata/1/') #Import Data However, I have not been able to get the peaks plotted onto the ppm spectrum, or (in my case) more importantly, convert the resulting peak list into ppm. Before, I wasn't sure what it was using as an X axis before using the uc. Because the data is originally plotted by "collection points" or "size" of the spectrum, and not by Hz or ppm, this is why the uc function is needed for the data. For one, I now know that I cannot scale the picked peaks the same way that I scaled the data. Perhaps I am overcomplicating things.Īs a help, perhaps someone could supplement the Bruker processing codes that are used in examples? I've been trying to put together small elements that are scattered through all the examples, and have conquered may of my initial issues.Īfter struggling through this all day, I've discovered a few things that I think have pointed me in the correct direction, but I still have not resolved it. I seem to be uncovering a thousand questions as I go along with this, but I am getting closer to being able to automate. How is it that this conversion works with with plotting the spectra, but not the picked peaks?Īny advice would be greatly appreciated. However, I keep getting errors saying x and y must have same first dimension. So, as a remedy I attempted to change the "pkfrq" to the "frq" conversion factor that seemed to work to plot the spectrum. This would explain why it seems to be "skewed" in relation to the actual positioning of the peaks. I thought it might be because the overall size is only set to scale the length of the farthest peak, which is less than the collected Hz. `uc2 = ng.fileiobase.unit_conversion(data.size,True,sw,obs,car)Īx.plot(pkfrq,peaks,pkfrq,data.astype('int')], 'ro')Īny tips as to what I seem to be missing here? My initial thoughts are that it is incorrectly scaling the peak list that it is generating. However, when I actually attempt the section of code for #uc2 = ng.fileiobase.unit_conversion(peaks.size,True,sw,obs,car)Īx.invert_xaxis() #This makes it read like a standard spectraĪx.plot(peaks,data.astype('int')], 'ro') #This plots the picked peaks on the spectraĪx.axhline(y=28000, color='k', ls='-')#This shows the cutoff for the peak picking #Attempts at converting the peak list? (i have no idea if this is the correct way to go about it.) Peaks = ng.peakpick.pick(data,28000)# Currently, works when everything is in Hz. Uc = ng.fileiobase.unit_conversion(data.size,True,sw,obs,car)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |