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

Expanding NUS data #189

Merged
merged 6 commits into from
Nov 15, 2023
Merged

Expanding NUS data #189

merged 6 commits into from
Nov 15, 2023

Conversation

kaustubhmote
Copy link
Collaborator

@kaustubhmote kaustubhmote commented Jan 1, 2023

This PR adds some functionality to take care of NUS datasets, as discussed in #187 .

Two new functions are introduced:

  1. ng.bruker.read_nuslist: reads nuslist (in bruker format)

  2. ng.proc_base.expand_nus: expands nus into a full dataset with zeros at the missing fid locations. This allows arbitrary dimension of the dataset, but generating data > 4D is disallowed by default. It allows an arbitrary acquisition order of indirect dimensions, as well as an arbitrary order for the acquisition of quadrature points. The defaults are tested with data acquired on Bruker spectrometers.

The workflow would be something like this for the issue described in #187 :

dic, data = ng.bruker.read(".", shape=(-1, 1024)) # shape kwarg is not necessary, but this makes it explict
nuslist = ng.bruker.read_nuslist(".")
full_data = ng.proc_base.expand_nus(data=data, shape=(128, 128, 1024), nuslist=nuslist)

There are tests added to test these functions with synthetic data.

This is not ready to be merged yet, the documentation of these functions is not yet done. I'll get around to doing that soon, but I'll keep this PR to see if there is any feedback.

…order as well

move nus expansion function to proc_base and renamed it to expand_nus
cleanup bruker.py and moved tests from bruker to a new test file for test_proc_base
tests for different aqorder and quadrature order added + reformatted
@kaustubhmote kaustubhmote mentioned this pull request Sep 16, 2023
@jjhelmus
Copy link
Owner

@kaustubhmote Thanks for putting this together. Sorry for the long delay in getting this merged.

@jjhelmus jjhelmus merged commit 5f9d509 into jjhelmus:master Nov 15, 2023
@kaustubhmote kaustubhmote deleted the read_nus_bruker branch January 12, 2024 05:46
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

Successfully merging this pull request may close these issues.

2 participants