datman.dashboard module
- datman.dashboard.filename_required(f)[source]
This decorator checks that the wrapped function has received a datman style file name as either a string or as a datman.scanid.Identifier instance with kwargs tag, series, and description set.
A DashboardException will be raised if the expected information is not given
- datman.dashboard.get_project(name=None, tag=None, site=None, create=False)[source]
Return a study from the dashboard database that either matches the study name (e.g. ‘SPINS’) or matches a study tag (e.g. ‘SPN01’) + an optional site code to help locate the correct study when the same code is reused for multiple sites or studies.
- datman.dashboard.get_scan(name, tag=None, series=None, description=None, source_id=None, create=False)[source]
- datman.dashboard.get_study_subjects(study, site=None, phantoms=False)[source]
Pulls a list of subjects from the dashboard from a specified study
- Parameters
study – Datman STUDY code
site – Optional argument to filter for a specific site
phantoms – Optional argument to return phantoms as well
- Returns
List of subject IDs within study with applied filtering criteria
- datman.dashboard.release_db(f)[source]
This decorator ensures that transactions are ended after exit.
Read operations on the database open a transaction. This transaction isnt terminated until a rollback or commit happens or until the script terminates. This decorator ensures that database connections don’t get stuck in the ‘idle in transaction’ state while waiting for long running work to be completed by a script.