numina.instrument — Instrument description

numina.instrument.assembly.assembly_element(comp_store, etype, tmpl, date, dest=None, by_key='name')
Parameters:
  • comp_store (dict) –

  • etype

  • tmpl

  • date (str or datetime) –

  • dest

  • by_key (str, optional) –

Return type:

ComponentGeneric or InstrumentGeneric or SetupGeneric or PropertiesGeneric

Raises:

ValueError is there is a problem during element construction

numina.instrument.assembly.assembly_instrument(comp_store, keyval, date, by_key='name')

Assembly an instrument configuration object.

Create an instrument object from a store of configurations using either the UUID of the configuration or the date of the configuration

Parameters:
  • comp_store (dict) –

  • keyval (str) –

  • date (str or datetime) –

  • by_key (str, optional) –

Returns:

a instrument configuration

Return type:

InstrumentGeneric

numina.instrument.assembly.find_element(comp_store, etype, keyval, date, by_key='name')

Find component in the component collection

Raises:

ValueError – If there is no component

numina.instrument.assembly.find_instrument(comp_store, name, date)

Find instrument in the component collection

Raises:

ValueError – If there is no instrument

numina.instrument.assembly.get_default_class(etype)

Transform the name of the component into its class

Parameters:

etype ({'instrument', 'component', 'setup'. 'properties'}) – Named type of component

Return type:

ComponentGeneric or InstrumentGeneric or SetupGeneric or PropertiesGeneric

numina.instrument.assembly.load_comp_store(comp_collection: ComponentCollection) dict
Parameters:

comp_collection (ComponentCollection) –

Return type:

dict

numina.instrument.assembly.load_paths_store(pkg_paths=None, file_paths=None) dict
Parameters:
  • pkg_paths

  • file_paths

Return type:

dict

numina.instrument.assembly.load_resources_pkg(pkgname: str, configs: str) ComponentCollection

Gather the path of the components

Parameters:
  • pkgname (str) –

  • configs (str) –

Returns:

Description of the instrument components

Return type:

ComponentCollection

Description of the origin of different configurations

class numina.instrument.configorigin.ElementOrigin(name, uuid, date_start=None, date_end=None, description='')

Description of the origin of a particular configuration

is_valid_date(cdate)

Check if the element if valid for a given date

class numina.instrument.configorigin.UndefinedOrigin

Origin not defined

A representation of the different devices of an instrument

class numina.instrument.generic.ComponentGeneric(name, properties=None, origin=None, parent=None)

Class representing a device component

depends_on()

Compute the dependencies for me and my children

my_depends()

Compute the dependencies for me

class numina.instrument.generic.ElementBase(name, origin=None)

Base class for objects in component collection

class numina.instrument.generic.InstrumentGeneric(name, properties=None, origin=None, parent=None)

Class representing a instrument component

class numina.instrument.generic.PropertiesGeneric(name, properties=None, origin=None)

Class representing a properties component

class numina.instrument.generic.SetupGeneric(name, origin=None)

Class representing a setup component

A representation of the a hardware device