-
Notifications
You must be signed in to change notification settings - Fork 262
ENH: PAR/REC data ordering and b-vector normalization #278
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
Closed
Closed
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
256d0d9
docstring/typo fix and allow scaling=None
grlee77 85ae8dc
add option to normalize b-vectors and b-values
grlee77 f5ef5fd
add sorted_labels function to PARRECHeader and corresponding info to …
grlee77 b223a89
add sorted_labels property to FakeHeader in test_parrec.py
grlee77 994fc58
bugfix to replace np.unique() with _unique_rows() for 2D inputs neede…
grlee77 23acded
clarify/streamline code based on feedback
68743ed
bugfix to newly refactored code
28f19a3
bugfix to newly refactored code
bb64b08
parrec: test_header_dimension_labels() added
816f558
slight revision to test
9933117
expand test_diffusion_parameters to test normalization case
c8d946e
fix comment test_diffusion_parameters
7b04b22
added normalize_bvecs option to get_q_vectors
ef45763
test bugfix: assert_equal to asssert_array_equal in new test
4cb0f0b
trim dynamic_keys via list comprehension
0cbec64
fix numpy1.5 compatibility of tests
466ec30
x**2 -> x*x
a23d976
remove another instance of np.linalg.norm for numpy 1.5
grlee77 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we allow a scaling of 'None'? What does it mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was not a feature I intended to add, but was to fix the behavior to match what is described in parrec2nii help text for the scaling option where the documentation states:
scaling can be disabled completely ('off')
and later in the script:
scaling = None if opts.scaling == 'off' else opts.scaling
If I set scaling to None this caused an error. Looking at parrec.py, I saw that the function
_data_from_rec
did support scalings=None, but the PARRECArrayProxy did not so I added it there as well.Setting scaling to None just means leave the data as whatever the original values stored in the .REC file were (the floating point values from image reconstruction where scaled into a range appropriate for uint storage). I don't know of a case when one would prefer the unscaled values.