datman.dashboard module

datman.dashboard.add_scan(name, tag=None, series=None, description=None, source_id=None)[source]
datman.dashboard.add_session(name, date=None)[source]
datman.dashboard.add_subject(name)[source]
datman.dashboard.dashboard_required(f)[source]
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_bids_scan(name)[source]
datman.dashboard.get_bids_subject(bids_name, bids_session, study=None)[source]
datman.dashboard.get_default_user()[source]
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_session(name, create=False, date=None)[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.get_subject(name, create=False)[source]
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.

datman.dashboard.scanid_required(f)[source]

This decorator checks that the wrapped function’s first argument is an instance of datman.scanid.Identifier and attempts to convert it if not.

A DashboardException will be raised if an Identifier isn’t found or can’t be created

datman.dashboard.set_study_status(name, is_open)[source]