Laboratory#

laboratory

UATAQ Laboratory object.

get_site(SID)

Return site object from config file

Laboratory(config)

Factory class for creating site objects from config file.

Contents#

lair.uataq.laboratory = lair.uataq._laboratory.Laboratory()#

UATAQ Laboratory object.

Built from UATAQ configuration.

lair.uataq.get_site(SID: str) Site[source]#

Return site object from config file

Parameters:
SIDstr

The site ID.

Returns:
sites.Site

A site object.

class lair.uataq._laboratory.Laboratory(config: str | dict)[source]#

Factory class for creating site objects from config file.

This class provides methods for creating site objects from a configuration file. The configuration file should contain information about the sites and their instruments.

Attributes:

site_config (str): The path to the site configuration file.

Methods:

get_site(SID): Returns a site object for the specified site ID.

__init__(config: str | dict)[source]#

Initialize the Laboratory class.

Parameters:
configstr | dict

The path to the configuration file or a dictionary containing the configuration data.

Raises:
ValueError

If the configuration data is invalid.

get_site(SID: str) Site[source]#

Return site object from config file

Parameters:
SIDstr

The site ID.

Returns:
sites.Site

A site object.

Raises:
ValueError

If the site ID is not found in the configuration file.

ValueError

If no instruments are found for the specified site.