BioSANS2020.cli_functs.ssl_calls

This is the ssl_calls module

This module interacts with BioSSL.py by fulfilling its requests to pro- vide a console interface that supports some features of BioSANS.

The following is the list of function for this module:

  1. load_data_traj

  2. calc_average_conc_at_tend

  3. calc_covariance

  4. calc_covariance_per_traj

  5. calc_covariance_bootsrap

  6. prob_density_calc_wtime

  7. prob_density_calc_tslice

  8. prob_density_calc

Module Contents

Functions

load_data_traj(file_name)

This function loads trajectory data from a tab delimited file.

calc_average_conc_at_tend(edata, points=100)

This function calculates the average or mean of edata[0] using

calc_covariance(edata, points=100)

This function calculates the covariance of edata[0] and prints

calc_covariance_per_traj(edata, points=100, fname='', mname='')

This function calculates the covariance of edata[0] per rows,

calc_covariance_bootsrap(edata, points=100, msamp=1000, fname='', mname='')

This function calculates the covariance of edata[0] with sampling

prob_density_calc_wtime(edata, fname, mname)

This function calculates the probability density of edata[0] and

prob_density_calc_tslice(edata, bins=50, fname='')

This function calculates the probability density of edata[0] per

prob_density_calc(edata, fname)

This function calculates the probability density of edata[0] and

BioSANS2020.cli_functs.ssl_calls.load_data_traj(file_name)

This function loads trajectory data from a tab delimited file. The first column in the file is time, the remaining columns are species or components. All sampled trajectories are concatenated in the file. Args:

file_namename of trajectory file generated in BioSANS

simulations (either deterministic or stochastic).

Return:
current_datatwo dimensional array of [data, slabels].

slabels are the names in the header of file_name. data is a list of trajectory data w/o header

BioSANS2020.cli_functs.ssl_calls.calc_average_conc_at_tend(edata, points=100)

This function calculates the average or mean of edata[0] using the last number of points in the trajectory. If the simulation is long enought, this is the steady state mean concentration. Args:

edatatwo dimensional array of data & labels (data, label).

data is a 3D array where each row are the individual trajectories. Each trajectory is a 2D numpy array where the first column is time and the remaining columns are the corresponding components.

points : number of data points to slice at end of trajectory

BioSANS2020.cli_functs.ssl_calls.calc_covariance(edata, points=100)

This function calculates the covariance of edata[0] and prints the result in a console. Args:

edatatwo dimensional array of data & labels (data, label).

data is a 3D array where each row are the individual trajectories. Each trajectory is a 2D numpy array where the first column is time and the remaining columns are the corresponding components.

pointslast number of points considered in covariance

calculation from -points to the end of array or equivalent to [-points:] slice.

BioSANS2020.cli_functs.ssl_calls.calc_covariance_per_traj(edata, points=100, fname='', mname='')

This function calculates the covariance of edata[0] per rows, prints the result in a console, and plots data into image. Args:

edatatwo dimensional array of data & labels (data, label).

data is a 3D array where each row are the individual trajectories. Each trajectory is a 2D numpy array where the first column is time and the remaining columns are the corresponding components.

pointslast number of points considered in covariance

calculation from -points to the end of array ([-points:] slice)

fname : prepended name to plots fname_mname* mname : prepended name to plots fname_mname*

BioSANS2020.cli_functs.ssl_calls.calc_covariance_bootsrap(edata, points=100, msamp=1000, fname='', mname='')

This function calculates the covariance of edata[0] with sampling , prints the result in a console, and plots data into image. Args:

edatatwo dimensional array of data & labels (data, label).

data is a 3D array where each row are the individual trajectories. Each trajectory is a 2D numpy array where the first column is time and the remaining columns are the corresponding components.

pointslast number of points considered in covariance

calculation from -points to the end of array or equivalent to [-points:] slice.

msamp : number of randomly chosen trajectories fname : prepended name to plots fname_mname* mname : prepended name to plots fname_mname*

BioSANS2020.cli_functs.ssl_calls.prob_density_calc_wtime(edata, fname, mname)

This function calculates the probability density of edata[0] and returns a plot of the probability density with time. Args:

edatatwo dimensional array of data & labels (data, label).

data is a 3D array where each row are the individual trajectories. Each trajectory is a 2D numpy array where the first column is time and the remaining columns are the corresponding components.

fname : prepended name to plots fname_mname* mname : prepended name to plots fname_mname*

BioSANS2020.cli_functs.ssl_calls.prob_density_calc_tslice(edata, bins=50, fname='')

This function calculates the probability density of edata[0] per bins and returns a plot of the probability density. Args:

edatatwo dimensional array of data & labels (data, label).

data is a 3D array where each row are the individual trajectories. Each trajectory is a 2D numpy array where the first column is time and the remaining columns are the corresponding components.

bins : number of bins an entire trajectory will be discretized fname : name prepended to plot name

BioSANS2020.cli_functs.ssl_calls.prob_density_calc(edata, fname)

This function calculates the probability density of edata[0] and returns a plot of the probability density. Args:

edatatwo dimensional array of data & labels (data, label).

data is a 3D array where each row are the individual trajectories. Each trajectory is a 2D numpy array where the first column is time and the remaining columns are the corresponding components.

items : 3 item list of [canvas, scroll_x, scroll_y]