mrrc_dbupdate

Find MRRC organized study acquisitions directories newer than what’s in the DB and update them.

Functions

find_first_dicoms(session_root)

Find a representative dicom for each acquisition in session_root.

is_project(pdir)

Is input a MR project dir? should have subfolder like 2024.06.27-09.19.11/

update_mrrc_db([project_dir_list])

Use DB dates to find projects with new sessions.

mrrc_dbupdate.find_first_dicoms(session_root)[source]

Find a representative dicom for each acquisition in session_root.

Parameters:

session_root (str) – path to session root directory. likely like .../ProjectName/yyyy.mm.dd-hh.mm.ss

Returns:

list of first dicoms like sessroot/subjid/acquisitonname/MR*

Return type:

list[str]

mrrc_dbupdate.is_project(pdir)[source]

Is input a MR project dir? should have subfolder like 2024.06.27-09.19.11/

Parameters:

pdir (str) – directory to test

Returns:

True if is a project directory

Return type:

bool

#>>> is_project(‘/disk/mace2/scan_data/WPC-8620/’) #True #>>> is_project(‘/disk/mace2/scan_data/7T/’) #False

mrrc_dbupdate.update_mrrc_db(project_dir_list=None)[source]

Use DB dates to find projects with new sessions. Add acquisitions. Dicoms in structure like Project/yyyy.mm.dd-*/SessionId/AcqustionName-FOV.num/MR*

Parameters:

project_dir_list (list[str] | None) – list of project dirs. Default is glob("/disk/mace2/scan_data/*").