mrqart.xnat_lookup

XNAT session lookup for MRQART HTML email. Provides clickable links to XNAT sessions for nonconforming sequences.

Functions

get_xnat_interface([cfg_path])

Return a pyxnat Interface or None if unavailable.

lookup_session_urls(project_subid_pairs[, xnat])

Look up XNAT session URLs for a list of (project, subid) pairs.

mrqart.xnat_lookup.get_xnat_interface(cfg_path=PosixPath('/home/runner/work/mrrc-hdr-qa/mrrc-hdr-qa/config/mrrc-xnat.cfg'))[source]

Return a pyxnat Interface or None if unavailable.

Parameters:

cfg_path (Path)

Return type:

Optional[‘Interface’]

mrqart.xnat_lookup.lookup_session_urls(project_subid_pairs, xnat=None)[source]

Look up XNAT session URLs for a list of (project, subid) pairs. Returns a dict mapping (project, subid) -> URL string. Missing sessions map to empty string.

Parameters:
  • project_subid_pairs (list[Tuple[str, str]]) – list of (project, subid) tuples

  • xnat (Optional['Interface']) – pyxnat Interface (will create one if None)

Return type:

Dict[Tuple[str, str], str]