-
Notifications
You must be signed in to change notification settings - Fork 10
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
phasing #8
Comments
Hi Reiner, Yes this is possible using the |
Hi Johann,
It works! :-) Thanks a lot for your help.
I do have another question now: I have two fid_arrays (from 2 pseudo 2D spectra) - how can I fuse them ?
I tried this, unsuccessfully:
fid_array1 = nmrpy.from_path(t1rho_data_folder1)
fid_array2 = nmrpy.from_path(t1rho_data_folder2)
fid_array1.add_fids(fid_array2.get_fids())
… On 12 Jan 2024, at 09:55, Johann Rohwer ***@***.***> wrote:
Hi Reiner,
Yes this is possible using the .ps_fids() method of FidArray. See here:
https://nmrpy.readthedocs.io/en/latest/quickstart.html#phase-correction <https://nmrpy.readthedocs.io/en/latest/quickstart.html#phase-correction>
https://nmrpy.readthedocs.io/en/latest/data_objects.html#nmrpy.data_objects.FidArray.ps_fids <https://nmrpy.readthedocs.io/en/latest/data_objects.html#nmrpy.data_objects.FidArray.ps_fids>
—
Reply to this email directly, view it on GitHub <#8 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACS4FAPQP25A34KSVOOAU5TYOD26TAVCNFSM6AAAAABBXYTEASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBYGY4DIOJUGA>.
You are receiving this because you authored the thread.
|
This has to do with the way The way to solve this is to first create a new list containing all the fids from both arrays, then create a new empty FidArray, and add the combined list to that array. When the new FidArray is populated, the IDs are recreated starting from zero. combined = fid_array1.get_fids() + fid_array2.get_fids()
new_fa = nmrpy.data_objects.FidArray()
new_fa.add_fids(combined) |
Works, till the next step:
new_fa.emhz_fids(lb=10)
new_fa.ft_fids()
#Fourier-transformation completed
# but:
new_fa.plot_array()
# fails with a TypeError since new_fa._params is None
# I could get around that with
new_fa._params=fid_array1._params
# but now it still fails with:
… On 23 Jan 2024, at 14:26, Johann Rohwer ***@***.***> wrote:
This has to do with the way add_fids works, and with the uniqueness of the Fid IDs (fid.id). This ID starts at zero and is incremented automatically when the FidArray is instantiated. This means your FIDs inside fid_array1 and fid_array2 have the same IDs, both starting from zero (try it1!). So the call fid_array1.add_fids(fid_array2.get_fids()) will just replace the FIDs in array1 with those from array2 because it works on the IDs and the ID has to be unique.
The way to solve this is to first create a new list containing all the fids from both arrays, then create a new empty FidArray, and add the combined list to that array. When the new FidArray is populated, the IDs are recreated starting from zero.
combined = fid_array1.get_fids() + fid_array2.get_fids()
new_fa = nmrpy.data_objects.FidArray()
new_fa.add_fids(combined)
—
Reply to this email directly, view it on GitHub <#8 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACS4FAKLD7JCLD6QVVDNTXTYP626VAVCNFSM6AAAAABBXYTEASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBWGA2TINBYG4>.
You are receiving this because you authored the thread.
|
Ok I got around that hurdle with
new_fa._params=fid_array1._params
new_fa._params['acqtime']=np.concatenate((new_fa._params['acqtime'],fid_array2._params['acqtime']))
… On 23 Jan 2024, at 14:26, Johann Rohwer ***@***.***> wrote:
This has to do with the way add_fids works, and with the uniqueness of the Fid IDs (fid.id). This ID starts at zero and is incremented automatically when the FidArray is instantiated. This means your FIDs inside fid_array1 and fid_array2 have the same IDs, both starting from zero (try it1!). So the call fid_array1.add_fids(fid_array2.get_fids()) will just replace the FIDs in array1 with those from array2 because it works on the IDs and the ID has to be unique.
The way to solve this is to first create a new list containing all the fids from both arrays, then create a new empty FidArray, and add the combined list to that array. When the new FidArray is populated, the IDs are recreated starting from zero.
combined = fid_array1.get_fids() + fid_array2.get_fids()
new_fa = nmrpy.data_objects.FidArray()
new_fa.add_fids(combined)
—
Reply to this email directly, view it on GitHub <#8 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACS4FAKLD7JCLD6QVVDNTXTYP626VAVCNFSM6AAAAABBXYTEASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBWGA2TINBYG4>.
You are receiving this because you authored the thread.
|
Hello, I'm trying to use nmrpy to handle an array of solid state T1rho data. While the original data has been phased using topspin, I'm struggling to get the spectra phased using the module. Is there a way to set the phc0 and phc1 parameters (known from the topspin procs) directly?
The text was updated successfully, but these errors were encountered: