-
Notifications
You must be signed in to change notification settings - Fork 85
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
Echo anti-echo aquisition #149
Comments
If the data are arranged as "one fid per row", you can separate them using Numpy's array-slicing syntax: dataP, dataN = data[0::2], data[1::2] If you need to convert the data into a "one row per fid" format, you can reshape using the value of the number of points in the direct dimension. For Bruker datasets, this would look like this: dic, data = ng.bruker.read(filename)
data = data.reshape(-1, dic["acqus"]["TD"]) You should also look at the function given here: nmrgle/process/nmrtxt/rance_kay.py to see how to do the reshuffling. This function is currently not available directly from nmrglue. |
Thank you so much, this will be a lot of help! Just curious, my dataset is in the Varian format, so would it be different than this method with Bruker data or is it relatively the same? |
The splitting part should be identical. The reading part will be similar except for using the function in the dic, data = ng.agilent.read(filepath)
data = data.reshape(-1, dic["np"])
dataP, dataN = data[0::2], data[1::2] |
I think the P and N datasets should be added while setting Also, I think you are basing this on the function that is appropriate for the way Bruker stores the data. I think the way Varian does this is slightly different. I don't have a handy Varian dataset that I can check this against, but since you seem to have nmrpipe, I suggest looking up the |
Not quite sure what might be missing here, but if it is possible for you to share the dataset, I'll be happy to take a look. |
Here is the dataset. Thank you so much for your help once again. |
Your Echo-antiecho processing is correct, but the loop you are using to put fids in the summ, diff = data[0::2], data[1::2]
A = summ - diff
B = -1j * (summ + diff)
shuffled = np.empty(data.shape, data.dtype)
shuffled[0::2] = A
shuffled[1::2] = B
# use shuffled to process the 2d using the standard way |
Thank you so much! I suspected I was doing the interleaving wrong, I just had slightly better results from stacking the data. The only thing is that when I process and plot the data in exactly the same way, the scales of the axes are still off. For example, the 15N axis is on the order of 0.5-1.5 when it should be 105-135. Would this also be a problem with the conversion? Edit: I actually just figured the rest out, thank you so much for your help! |
I am trying to process data in which the echo anti-echo (or rance-kay) method needs to be applied, but I do not see that this is a feature of nmrglue. I am attempting to do this by manipulating the data manually. I have read that the data needs to be separated into the echo or N-type spectrum and the anti-echo or P-type spectrum, but how would I actually go about obtaining or separating these two spectra within the the numpy array in nmrglue? Any help is much appreciated.
The text was updated successfully, but these errors were encountered: