batch_tag2namekey
batch_tag2namekey#
- qx_utilities.general.utilities.batch_tag2namekey(filename=None, sessionid=None, bolds=None, output='number', prefix='BOLD_')#
batch_tag2namekey filename=<path to batch file> sessionid=<session id> bolds=<bold specification string> [output="number"] [prefix="BOLD_"]Extract the data for the specified session and return the list of bold numbers or names.
Parameters
- --filename (str):
Path to batch.txt file.
- --sessionid (str):
Session id to look up.
- --bolds (str):
Which bold images (as they are specified in the batch.txt file) to process. It can be a single type (e.g. 'task'), a pipe separated list (e.g. 'WM|Control|rest') or 'all' to process all.
- --output (str):
Whether to output numbers ('number') or bold names ('name'). In the latter case the name will be extracted from the 'filename' specification, if provided in the batch file, or '<prefix>[N]' if 'filename' is not specified. Default is 'number'.
- --prefix (str):
The default prefix to use if a filename is not specified in the batch file. Default is
BOLD_.
Notes
Reads the batch file, extracts the data for the specified session and returns the list of bold numbers or names that correspond to bolds specified using the bolds parameter.
