Skip to content

interpolation

Create files for interpolation of datasets.

https://github.com/allyhume/SBMLDataTools https://github.com/allyhume/SBMLDataTools.git

TODO: fix composition with existing models TODO: support coupling with existing models via comp The functionality is very useful, but only if this can be applied to existing models in a simple manner.

Interpolator

Interpolator(x, y, method=INTERPOLATION_CONSTANT)

Interpolator class handles the 2D interpolation of given data series.

Two data series and the type of interpolation are provided.

Initialize Interpolator.

xid property

xid

X id.

yid property

yid

Y id.

formula

formula()

Get formula string.

Interpolation

Interpolation(data, method='linear')

Create SBML model which interpolates the given data.

The second to last components are interpolated against the first component.

Initialize Interpolation.

validate_data

validate_data()

Validate the input data.

  • The data is expected to have at least 2 columns.
  • The data is expected to have at least three data rows.
  • The first column should be in ascending order.

:return: :rtype:

from_csv staticmethod

from_csv(csv_file, method='linear', sep=',')

Interpolation object from csv file.

from_tsv staticmethod

from_tsv(tsv_file, method='linear')

Interpolate object from tsv file.

write_sbml_to_file

write_sbml_to_file(sbml_out)

Write the SBML file.

:param sbml_out: Path to SBML file :return:

write_sbml_to_string

write_sbml_to_string()

Write the SBML file.

:return: SBML str

create_interpolators staticmethod

create_interpolators(data, method)

Create all interpolators for the given data set.

The columns 1, ... (Ncol-1) are interpolated against column 0.

add_interpolator_to_model staticmethod

add_interpolator_to_model(interpolator, model)

Add interpolator to model.

The parameters, formulas and rules have to be added to the SBML model.

:param interpolator: :param model: Model :return: