mxcubecore.HardwareObjects.Session#
Session hardware object.
Contains information regarding the current session and methods to access and manipulate this information.
Classes
|
- class mxcubecore.HardwareObjects.Session.Session(name)[source]#
Bases:
HardwareObject
- get_base_data_directory()[source]#
Returns the base data directory taking the ‘contextual’ information into account, such as if the current user is inhouse.
- Returns:
The base data path.
- Return type:
- get_default_prefix(sample_data_node=None, generic_name=False)[source]#
Returns the default prefix, using sample data such as the acronym as parts in the prefix.
- get_default_subdir(sample_data: dict) str [source]#
Gets the default sub-directory based on sample information
- get_full_path(subdir: str = '', tag: str = '') Tuple[str, str] [source]#
Returns the full path to both image and processed data. The path(s) returned will follow the convention:
<base_directory>/<subdir>/run_<NUMBER>_<tag>
Where NUMBER is a automatically sequential number and base_directory the path returned by get_base_image/process_directory
- get_inhouse_user()[source]#
- Returns:
The current inhouse user.
- Return type:
tuple (<proposal_code>, <proposal_number>)
- get_path_with_proposal_as_root(path: str) str [source]#
Strips the beginning of the path so that it starts with the proposal folder as root
- get_proposal()[source]#
- Returns:
The proposal, ‘local-user’ if no proposal is available
- Return type:
- is_inhouse(proposal_code=None, proposal_number=None)[source]#
Determines if a given proposal is considered to be inhouse.