stats - Methods to extract dataset statistics¶
calculate statistics off of datasets
-
neural.stats.mask_average(dset, mask)[source]¶ Returns average of voxels in
dsetwithin non-zero voxels ofmask
-
neural.stats.max(dset)[source]¶ max value of dataset
Calculated by reading the dataset. If it’s in the header, you can also read this from dset_info
-
neural.stats.sphere_average(dset, x, y, z, radius=1)[source]¶ returns a list of average values (one for each subbrick/time point) within the coordinate
(x,y,z)(in RAI order) using a sphere of radiusradiusindset
-
neural.stats.voxel_count(dset, p=None, positive_only=False, mask=None, ROI=None)[source]¶ returns the number of non-zero voxels
P: threshold the dataset at the given p-value, then count Positive_only: only count positive values Mask: count within the given mask ROI: only use the ROI with the given value (or list of values) within the mask if ROI is ‘all’ then return the voxel count of each ROI as a dictionary