Session Module

Example configuration file: session.xml

Session hardware object.

Contains information regarding the current session and methods to access and manipulate this information.

class HardwareObjects.Session.Session(name)

Bases: HardwareRepository.BaseHardwareObjects.HardwareObject

get_base_data_directory()

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:str
get_base_image_directory()
Returns:The base path for images.
Return type:str
get_base_process_directory()
Returns:The base path for procesed data.
Return type:str
get_default_prefix(sample_data_node)

Returns the default prefix, using sample data such as the acronym as parts in the prefix.

Parameters:sample_data_node (Sample) – The data node to get additional information from, (which will be added to the prefix).
Returns:The default prefix.
Return type:str
get_image_directory(sub_dir)

Returns the full path to images, using the name of each of data_nodes parents as sub directories.

Parameters:data_node (TaskNode) – The data node to get additional information from, (which will be added to the path).
Returns:The full path to images.
Return type:str
get_inhouse_user()
Returns:The current inhouse user.
Return type:tuple (<proposal_code>, <proposal_number>)
get_process_directory(sub_dir=None)

Returns the full path to processed data, using the name of each of data_nodes parents as sub directories.

Parameters:data_node (TaskNode) – The data node to get additional information from, (which will be added to the path).
Returns:The full path to images.
get_proposal()
Returns:The proposal, ‘local-user’ if no proposal is available
Return type:str
init()
is_inhouse(proposal_code=None, proposal_number=None)

Determines if a given proposal is considered to be inhouse.

Parameters:
  • proposal_code – Proposal code
  • proposal_number (str) – Proposal number
Returns:

True if the proposal is inhouse, otherwise False.

Return type:

bool

Project Versions

Previous topic

QueueModel Module

Next topic

ShapeHistory Module

This Page