Skip to content

data_collector

borealis.data_collector

DataCollector(orchestrator)

Bases: DataComponent

Data collector with HDF5 file handler.

DataCollector constructor

Parameters:

Name Type Description Default
orchestrator

Session orchestrator

required
Source code in borealis/data_collector.py
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
def __init__(self, orchestrator):
    """
    DataCollector constructor

    Parameters
    ----------
    orchestrator: Orchestrator
        Session orchestrator

    """
    super().__init__(orchestrator)
    self.h5file = None
    self.current_scan = None
    self.data_dir = Path.cwd() / 'data'
    self.filename_base = 'borealis_datafile_'
    self.current_sample = 'Unknown sample'
    self.instrument = 'Unknown instrument'
    self.experiment_id = 'Unknown ID'

__str__()

Custom str method for DataCollector class.

Source code in borealis/data_collector.py
35
36
37
def __str__(self):
    """Custom __str__ method for DataCollector class."""
    return f'{self.__class__.__name__}'