CoNNECT 0.1 documentation

Table of Contents

This Page

get_scan_id.py

This function is currently used by connect_create_raw_nii.py.

get_scan_id(inDir, basename)

Search the metadata accompanying a sourcedata NIfTI file (found in the accompanying JSON sidecar) using the Project’s scan_id JSON file within the Project’s ‘code’ directory (found Scan Identification).

get_scan_id(inDir, basename)

Parameters:
  • inDir (str) – Required fullpath to sourcedata sub-directory containing NIfTI file

  • basename (str) – Required basename of the sourcedata NIfTI file

Raises:

Error – Any error occurs.

Returns:

scan name created from get_bids_filename found in bids_commands.py, bids directory as identified in the Project’s scan_id JSON file within the Project’s ‘code’ directory

Return type:

str, str