Capture

Attributes

NameTypeDescription
analog_dataDict[str, BaseAnalogData]
digital_dataDict[str, BaseDigitalData]
configCaptureConfig
analog_start_timefloatReturns the start time of the capture.
analog_sample_ratefloatReturns the sample rate of the capture.
analog_channel_namesList[str]Returns a list of analog channel names in the capture. Returns: List of channel names (e.g., ['ch1_volts', 'ch2_volts', ...]) Returns an empty list if no analog data is available.
analog_time_seriesNDArray[np.float64]Returns the time array for analog data.
analog_stop_timefloatReturns the end time of the capture.
num_analog_samplesintReturns the number of analog samples in the capture.

Methods

__init__(analog_data: Dict[str, BaseAnalogData], digital_data: Dict[str, BaseDigitalData], config: CaptureConfig, _analog_start_time: Optional[float] = None, _stored_path: Optional[Path] = None) -> None
classmethod from_dir(dir_path: Path) -> Capture

Create a Capture from a directory containing analog_<n>.bin files.

Args: dir_path: Path to directory containing analog_<n>.bin files

Returns: Capture object with analog data loaded from files

classmethod from_config(config: CaptureConfig, dir_path: Path) -> Capture

Create a Capture from a CaptureConfig by reading the files in it's save directory

delete()

Delete the capture files from the disk

AI/LLM users: see llms-mso-api.txt for machine-readable documentation.