detl.core

This page describes the data types that are returned by a detl.parse() call.

Specifies the base types for parsing and representing DASware data.

class detl.core.DASwareParser

Bases: object

Abstract type for parsers that read DASware CSV files.

Methods

parse(filepath)

Parses the provided DASware CSV file into a data object.

abstract parse(filepath: Path) DWData

Parses the provided DASware CSV file into a data object.

Args:

filepath (str or pathlib.Path): path pointing to the file of interest

class detl.core.DASwareVersion(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

V4 = 'v4'
V5 = 'v5'
class detl.core.DWData(version: DASwareVersion)

Bases: dict

Standardized data type for DASGIP data.

Attributes:
coreinfo

Information about DASWARE and timezone settings.

events

Table of events that happened during the process.

external_servers
external_values
fb_pro
info

Contains version numbers of software modules.

internal_values
modules
plant

Metadata of the hardware

procedure

Metadata of the experiment

profile_columns
projectinfo
sensors

Metadata of the connected sensors

tracks

Metadata about logging settings.

units

Metadata of the reactor units

version

Specifies which DASWARE version was used.

Methods

clear()

copy()

fromkeys(iterable[, value])

Create a new dictionary with keys from iterable and values set to value.

get(key[, default])

Return the value for key if key is in the dictionary, else default.

get_narrow_data([kdim])

Returns all data in a narrow DataFrame.

items()

keys()

pop(key[, default])

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem(/)

Remove and return a (key, value) pair as a 2-tuple.

setdefault(key[, default])

Insert key with a value of default if key is not in the dictionary.

update([E, ]**F)

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()

property coreinfo: DataFrame

Information about DASWARE and timezone settings.

property events: DataFrame

Table of events that happened during the process.

property external_servers: DataFrame
property external_values: DataFrame
property fb_pro: DataFrame
get_narrow_data(kdim: str = 'process_time')

Returns all data in a narrow DataFrame.

Args:
kdim (str): name of the time axis which will be the time axis in the new format.

Can be ‘timestamp’, ‘duration’, or ‘process_time’. ‘process_time’ will drop all data before valid time information is available. ‘duration’ and ‘process_time’ will drop the timestamp information to get a clean float-type value column.

Returns:

narrow_data: DataFrame containing all data in a narrow format

Raises:

KeyError: when the reference column is not in the DataFrame

property info: DataFrame

Contains version numbers of software modules.

property internal_values: DataFrame
property modules: DataFrame
property plant: DataFrame

Metadata of the hardware

property procedure: DataFrame

Metadata of the experiment

property profile_columns: DataFrame
property projectinfo: DataFrame
property sensors: DataFrame

Metadata of the connected sensors

property tracks: DataFrame

Metadata about logging settings.

property units: DataFrame

Metadata of the reactor units

property version: DASwareVersion

Specifies which DASWARE version was used.

class detl.core.ReactorData(id: int)

Bases: object

Data structure containing data from one reactor.

Attributes:
dataframe

Primary table of setpoint (SP) and actual (PV) control parameters.

device_channels
id

Number of the reactor.

profiles
requirements
sensor_elements

Table of connected sensors.

setup

Dataframe of overall process information.

trackdata

Contains timeseries of mass flows.

unit

Properties of the reactor.

Methods

get_closest_data(points[, reference])

Returns a subset of the reactor data at points closest to the given ones.

property dataframe: DataFrame

Primary table of setpoint (SP) and actual (PV) control parameters.

property device_channels: DataFrame
get_closest_data(points: array, reference: str = 'process_time') DataFrame

Returns a subset of the reactor data at points closest to the given ones.

Args:

points (numpy.array): the data from readings closest to these points will be returned reference (str): name of the column to look for points

Returns:

filtered_data: DataFrame containing data closest to the given points

Raises:

KeyError: when the reference column is not in the DataFrame

property id: int

Number of the reactor.

property profiles: DataFrame
property requirements: DataFrame
property sensor_elements: DataFrame

Table of connected sensors.

property setup: DataFrame

Dataframe of overall process information.

property trackdata: DataFrame

Contains timeseries of mass flows.

property unit: DataFrame

Properties of the reactor.