pietools¶
- pycorr.pietools.arr_slice(nii_file, _slice)[source]¶
slices indx from first dim from matrix, for parallelization
- pycorr.pietools.copy_nii_hdr(nii, data, save='')[source]¶
Returns a nifti object using another nifti’s header
Dimensions are changed to correspond with data shape
- pycorr.pietools.loadwith(subdir, path, func, **kwargs)[source]¶
For all subs in basedir, apply func to path, return list.
Parameteres: subdir – base directory to iterate through. If none, just glob path. path – path to search for in each dir in subdir func – function to apply to each path found
- pycorr.pietools.print_Blocks(dirname)[source]¶
Given subject dir, print number of TRs for each block
- pycorr.pietools.query_to_re_groups(query)[source]¶
For a string with with glob syntax, allow for named groups for wildcards
- E.g. “*/{sub_id}/file.txt” is converted to a regular expression where {sub_id} is a wildcard,
- and it’s match is a group named sub_id.
Supports multiple {bracketed_args}
- pycorr.pietools.searchr(dirname, matchme, verbose=True)[source]¶
Walk dir, return list of all matches. Use glob to match.