Python toolbox for analyzing imaging data
scipy.binom_test
-> scipy.binomtest
in code-base for compatibility with current scipy
versionspytest
fixtures that use numpy.random
to generate test data (avoids random test failures due to random data)deepdish
to h5py
for loading and saving hdf5 Brain_Data
and Adjacency
files, with backwards compatible support for hdf5 files created on older versions of nltoolsonsets_to_dm
as error-checking wasn't quite rightnilearn
warningsnibabel
.get_affine()
-> .affine
Brain_Data.similarity
should be dramatically faster and now supports rank correlation: https://github.com/cosanlab/nltools/issues/308 https://github.com/cosanlab/nltools/issues/316 https://github.com/cosanlab/nltools/issues/404
Design_Matrix.clean
will raise an error if there are duplicate column name.h5
objects in Brain_Data
now respects the mask
argument:# User loads h5 that contains mask so that mask is used instead of the default MNI mask
Brain_Data('brain.h5')
# User loads h5 that contains mask but also sets mask argument.
# Now mask value takes precedence over whatever mask is in h5
# so we issue a warning to the user letting them know on load
Brain_Data('brain.h5', mask='path/to/nifti/mask.nii.gz')
>>> UserWarning(...)
# User loads h5 that does NOT contain a mask and doesnt set the mask
# argument so the default MNI mask is used, similar to nifti files
# This is an implicit fallback just like with niftis
Brain_Data('brain_nomask.h5')
# User loads h5 that does NOT contain mask but also sets mask argument
# Mask value is used to learn transformation like niftis
# No need to warn them about anything
Brain_Data('brain_nomask.h5', mask='path/to/nifti/mask.nii.gz')
pandas
and deepdish
versionssklearn
mne
as a dependencyAdjacency.distance_to_similarity
to note we currently only support euclidean and correlation distancePath
objects now reliably work for Brain_Data
and Adjacency
classes with passing testsisps
where hilbert trasform was being applied to the wrong axisesgenerate_permutations
method which acts as python generator that can be used for iteration.cluster_summary
method to summarize with and between cluster distances.sum
method to add adjacency matrices.fisher_z_r
method to invert .fisher_r_z
align_states
function that implements the Hungarian Algorithmisps
gains a new pairwise
argumentThis is primarily a maintenance release that move ours testing, documentation, and deployment infrastructure to github actions and github-pages from travis CI and readthedocs. Our entire code base is now formatted using black
and will enforce checks for all new commits and PRs. Documentation and PyPi uploading have also been configured to deploy on new releases (starting from this one).
Our documentation site has now moved to: https://nltools.org.
stats.fdr
now checks that the inputted array is within the range 0-1int64
out-of-bounds test errors on WindowsBrain_Data
classes now support Path
objects in addition to string path namesSimulator
classes now accept a random_seed
for reproducibilitysix
Adjacency.isc
method is now set to only work with single matricesroi_plot_brain
to speed up image generation when using scalar values.Brain_Data.align
method, in which the transformation_matrix.data
needed to be transposed.temporal_resample
method to up and downsample timeseries