Skip to content

Reference

datalab-app-plugin-oms.

Attributes:

Name Type Description
__version__

__version__

__version__ = version('datalab_app_plugin_oms')

OMSBlock

Bases: DataBlock

Attributes:

Name Type Description
accepted_file_extensions tuple[str, ...]
block_db_model
blocktype
defaults
description
multi_file
name
plot_functions

accepted_file_extensions

accepted_file_extensions: tuple[str, ...] = ('.csv', '.dat', '.xlsm')

block_db_model

block_db_model = OMSModel

blocktype

blocktype = 'oms'

defaults

defaults = {'flow_rate': 1.0, 'temperature': 298.0, 'pressure': 100000.0, 'rate_t_start': 0.0, 'rate_t_end': 1800.0}

description

description = 'Block for plotting OMS time series data.'

multi_file

multi_file = True

name

name = 'OMS'

plot_functions

plot_functions

generate_oms_plot

generate_oms_plot()

Generate OMS plot from uploaded file(s).

Supports three OMS data formats: - .csv: Manual export with headers (standard format) - .dat: Binary live-updating format (46-byte records)

Optionally accepts a .xlsm calibration file alongside the OMS data file. When a .xlsm is present with a .csv, nmol/s conversion and integration are shown. Calibration is not supported for .dat files (no time axis).

reset_species_settings

reset_species_settings(**kwargs)

Clears both num_species and species_names from stored data.

Uses empty list / 0 rather than None because to_web() strips None values (exclude_none=True) and the frontend uses Object.assign which won't delete keys missing from the response.

set_flow_rate

set_flow_rate(flow_rate: str)

Set the carrier gas flow rate used for nmol/s calibration.

Parameters:

Name Type Description Default
flow_rate str

Flow rate in mL/min as a string. Must be a positive number.

required

set_num_species

set_num_species(num_species: str)

Updates self.data with the user-inputted number of species for .dat file parsing

Parameters:

Name Type Description Default
num_species str

positive integer as a string representing the number of species (excluding vacuum) in the .dat file

required

set_pressure

set_pressure(pressure: str)

Set the total pressure used for the ideal gas conversion.

Parameters:

Name Type Description Default
pressure str

Total pressure in Pa as a string. Must be a positive number.

required

set_rate_t_end

set_rate_t_end(rate_t_end: str)

Set the end of the time window for initial rate calculation.

Parameters:

Name Type Description Default
rate_t_end str

End time in seconds as a string. Must be positive.

required

set_rate_t_start

set_rate_t_start(rate_t_start: str)

Set the start of the time window for initial rate calculation.

Parameters:

Name Type Description Default
rate_t_start str

Start time in seconds as a string. Must be non-negative.

required

set_species_names

set_species_names(species_names: str)

Updates self.data with user-inputted species names for .dat file parsing.

Parameters:

Name Type Description Default
species_names str

comma-separated string of species names

required

set_temperature

set_temperature(temperature: str)

Set the temperature used for the ideal gas conversion.

Parameters:

Name Type Description Default
temperature str

Temperature in Kelvin as a string. Must be a positive number.

required