-
Notifications
You must be signed in to change notification settings - Fork 532
[ENH] Add afni.LocalStat and afni.ReHo, update afni.ROIStats inputs #2740
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
62d1155
add 3dLocalstat functionality to support ANATICOR
rciric 494e224
add regional homogeneity interface
rciric 05c056c
substantially expand functionality of 3dROIstats interface
rciric cca5eb2
fix Localstat interface
rciric b0c95e0
remove unnecessary dependency; formatting
rciric a8fa089
new/updated autotests
rciric 1aee771
remove unused dependency
rciric f66e414
update documentation
rciric c2e507f
remove escaped line breaks from example cmdline
rciric 5149267
desc format cleanup
rciric b7d6871
update convention; use object after all
rciric 426def1
examples fix
rciric 13d7229
conform to PEP8, add deprecated field for ROIStats interface
rciric 8c65b81
update deprecation
rciric 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT | ||
from __future__ import unicode_literals | ||
from ..utils import Localstat | ||
|
||
|
||
def test_Localstat_inputs(): | ||
input_map = dict( | ||
args=dict(argstr='%s', ), | ||
automask=dict(argstr='-automask', ), | ||
environ=dict( | ||
nohash=True, | ||
usedefault=True, | ||
), | ||
grid_rmode=dict( | ||
argstr='-grid_rmode %s', | ||
requires=['reduce_restore_grid'], | ||
), | ||
in_file=dict( | ||
argstr='%s', | ||
mandatory=True, | ||
position=-1, | ||
), | ||
mask_file=dict(argstr='-mask %s', ), | ||
neighborhood=dict( | ||
argstr="-nbhd '%s(%s)'", | ||
mandatory=True, | ||
), | ||
nonmask=dict(argstr='-use_nonmask', ), | ||
num_threads=dict( | ||
nohash=True, | ||
usedefault=True, | ||
), | ||
out_file=dict( | ||
argstr='-prefix %s', | ||
keep_extension=True, | ||
name_source='in_file', | ||
name_template='%s_localstat', | ||
position=0, | ||
), | ||
outputtype=dict(), | ||
overwrite=dict(argstr='-overwrite', ), | ||
quiet=dict(argstr='-quiet', ), | ||
reduce_grid=dict( | ||
argstr='-reduce_grid %s', | ||
xor=['reduce_restore_grid', 'reduce_max_vox'], | ||
), | ||
reduce_max_vox=dict( | ||
argstr='-reduce_max_vox %s', | ||
xor=['reduce_restore_grid', 'reduce_grid'], | ||
), | ||
reduce_restore_grid=dict( | ||
argstr='-reduce_restore_grid %s', | ||
xor=['reduce_max_vox', 'reduce_grid'], | ||
), | ||
stat=dict( | ||
argstr='-stat %s...', | ||
mandatory=True, | ||
), | ||
) | ||
inputs = Localstat.input_spec() | ||
|
||
for key, metadata in list(input_map.items()): | ||
for metakey, value in list(metadata.items()): | ||
assert getattr(inputs.traits()[key], metakey) == value | ||
def test_Localstat_outputs(): | ||
output_map = dict(out_file=dict(), ) | ||
outputs = Localstat.output_spec() | ||
|
||
for key, metadata in list(output_map.items()): | ||
for metakey, value in list(metadata.items()): | ||
assert getattr(outputs.traits()[key], metakey) == value |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT | ||
from __future__ import unicode_literals | ||
from ..utils import ReHo | ||
|
||
|
||
def test_ReHo_inputs(): | ||
input_map = dict( | ||
args=dict(argstr='%s', ), | ||
chi_sq=dict(argstr='-chi_sq', ), | ||
ellipsoid=dict( | ||
argstr='-neigh_X %s -neigh_Y %s -neigh_Z %s', | ||
xor=['sphere', 'neighborhood'], | ||
), | ||
environ=dict( | ||
nohash=True, | ||
usedefault=True, | ||
), | ||
in_file=dict( | ||
argstr='-inset %s', | ||
mandatory=True, | ||
position=1, | ||
), | ||
label_set=dict(argstr='-in_rois %s', ), | ||
mask_file=dict(argstr='-mask %s', ), | ||
neighborhood=dict( | ||
argstr='-nneigh %s', | ||
xor=['sphere', 'ellipsoid'], | ||
), | ||
out_file=dict( | ||
argstr='-prefix %s', | ||
keep_extension=True, | ||
name_source='in_file', | ||
name_template='%s_reho', | ||
position=0, | ||
), | ||
overwrite=dict(argstr='-overwrite', ), | ||
sphere=dict( | ||
argstr='-neigh_RAD %s', | ||
xor=['neighborhood', 'ellipsoid'], | ||
), | ||
) | ||
inputs = ReHo.input_spec() | ||
|
||
for key, metadata in list(input_map.items()): | ||
for metakey, value in list(metadata.items()): | ||
assert getattr(inputs.traits()[key], metakey) == value | ||
def test_ReHo_outputs(): | ||
output_map = dict( | ||
out_file=dict(), | ||
out_vals=dict(), | ||
) | ||
outputs = ReHo.output_spec() | ||
|
||
for key, metadata in list(output_map.items()): | ||
for metakey, value in list(metadata.items()): | ||
assert getattr(outputs.traits()[key], metakey) == value |
Oops, something went wrong.
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.
When renaming a field, you should use
deprecated
andnew_name
(see the developer guide) fields (in addition to the new trait).