dm.co2regression package

Submodules

dm.co2regression.AbstractRegression module

Abstract class for calculation of CO2 regression using various methods.

class dm.co2regression.AbstractRegression.AbstractRegression(co2_out)

Bases: abc.ABC

abstract compute_curve(x, y)

It computes values after exponential regression in given time points.

Parameters
  • x – list of time points

  • y – list of CO2 values in given time points

Returns

list of values after exponential regression calculated in given time points

abstract compute_parameter(x, y)

It computes air change rate and its error.

Parameters
  • x – list of time points

  • y – list of CO2 values in given time points

Returns

pair of air change rate and its error

dm.co2regression.ExpRegressionWithDelay module

Calculation of CO2 regression using outdoor CO2, room volume, window_size and threshold.

Calculates regression when the CO2 decrease is noticed using threshold in window.

class dm.co2regression.ExpRegressionWithDelay.ExpRegressionWithDelay(co2_out, volume, window_size, threshold)

Bases: dm.co2regression.SimpleExpRegression.SimpleExpRegression

compute_curve(x, y)

It computes values after exponential regression in given time points.

Parameters
  • x – list of time points

  • y – list of CO2 values in given time points

Returns

list of values after exponential regression calculated in given time points

compute_parameter(x, y)

It computes air change rate and its error.

The computation starts if a change in CO2 is higher than the threshold.

Parameters
  • x – list of time points

  • y – list of CO2 values in given time points

Returns

pair of air change rate and its error

dm.co2regression.SimpleExpRegression module

Calculation of CO2 regression using outdoor CO2, room volume.

Calculates regression when the window is open.

class dm.co2regression.SimpleExpRegression.SimpleExpRegression(co2_out, volume)

Bases: dm.co2regression.AbstractRegression.AbstractRegression

compute_curve(x, y)

It computes values after exponential regression in given time points.

Parameters
  • x – list of time points

  • y – list of CO2 values in given time points

Returns

list of values after exponential regression calculated in given time points

compute_parameter(x, y)

It computes air change rate and its error.

The computation requires room volume.

Parameters
  • x – list of time points

  • y – list of CO2 values in given time points

Returns

pair of air change rate and its error

static gen_f(co2_start, co2_out)

It generates a function.

Parameters
  • co2_start – initial CO2 concentration

  • co2_out – outdoor CO2 concentration

Returns

function that requires timestamp and air change rate

static gen_f_volume(co2_start, co2_out, volume)

It generates a function.

Parameters
  • co2_start – initial CO2 concentration

  • co2_out – outdoor CO2 concentration

  • volume – room volume

Returns

function that requires timestamp and air change rate

Module contents