MRG: refactor of time slice routines #308

Merged
merged 12 commits into from Apr 1, 2014

Projects

None yet

2 participants

Owner

I hadn't really thought through selecting the slice axis for time-slice
routine utilties or for the diagnostic screening utilities.

Refactor the nipy_tsdiffana and nipy_diagnose command line utilties to
use a common interface for selecting slice and time axes. Put command
logic in a commands module and test more. Generalize diagnostic
screening utilities to any time axis rather than assuming time is the
last axis (the pca module explicitly allows this). Deprecate guess at
slice axis for screening function (but continue to guess for Nifti-like
images from the command line).

matthew-brett added some commits Feb 6, 2014
@matthew-brett matthew-brett NF: error if time diff slice axis is time axis
Running time_slice_diff on an array allowed the slice and the time axes
to be the same.  Test that they aren't.
7224b61
@matthew-brett matthew-brett NF: function giving time difference for images
New function that accepts an image as input and returns time series
difference analysis on the image.
4f1a61f
@matthew-brett matthew-brett WIP: refactor tsdiffana script to select slice axis 27cf49c
@matthew-brett matthew-brett WIP: refactoring diagnostics commands into modules def0732
@matthew-brett matthew-brett RF: refuse to load / convert MINC for now
Nibabel can load MINC, but now we need an API to get the axis names for
MINC, otherwise, the axes can be anywhere, but are most likely to be in
the opposite order to the ones the NIfTI needs.  Raise an error until we
have worked out how to do this right.
9aecb4a
@matthew-brett matthew-brett TST: skip test for non-analyze types for now
In fact it turns out we can't sensibly load the non-analyze types, so
skip this test.
3f7a8b5
@matthew-brett matthew-brett TST: develop tests for tsdiffana command function
Use command function to test the tsdiffana interface.
144497a
@matthew-brett matthew-brett TST: extend tests for nipy_tsdiffana script
Smoke test for time and slice axis command line options.
fde2c71
@matthew-brett matthew-brett NF: tsdiffana option to save results volumes
Add option for tsdiffana to be able to save the results volumes created
during the analysis.
4eca2c3
@matthew-brett matthew-brett BF+TST: test+fix bugs for PCA on reordered images
The `screen` and `write_screen_res` functions were assuming time-last
ordering in a couple of places.  Test and fix.
9027633
@matthew-brett matthew-brett RF+TST: refactor nipy_diagnose into module, test
Put logic for nipy_diagnose into commands module.

Use time and slice axis testing function developed for tsdiffana.

Extend tests of diagnose outputs.
188bd29
@matthew-brett matthew-brett RF: deprecate guessed slice axis for screens func
The command line utilities nipy_tsdiffana and nipy_diagnose guess the
slice axis for Analyze-like files (like Nifti) - so the `screens`
function doesn't need to do that, and it doesn't match the API for --
say -- `pca_image`.  So deprecate the slice axis guess in `screens` and
test.
3625690
Owner

Any comments here?

Contributor
bthirion commented Apr 1, 2014

LGTM. Nice coverage by tests. Works like a charm on my data.

Owner

Thanks for the review - merging then.

@matthew-brett matthew-brett merged commit 788674f into nipy:master Apr 1, 2014

1 check passed

default The Travis CI build passed
Details
@matthew-brett matthew-brett deleted the matthew-brett:refactor-image-time-diff branch Apr 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment