:py:mod:`BioSANS2020.cli_functs.ssl_calls` ========================================== .. py:module:: BioSANS2020.cli_functs.ssl_calls .. autoapi-nested-parse:: 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 ~~~~~~~~~ .. autoapisummary:: BioSANS2020.cli_functs.ssl_calls.load_data_traj BioSANS2020.cli_functs.ssl_calls.calc_average_conc_at_tend BioSANS2020.cli_functs.ssl_calls.calc_covariance BioSANS2020.cli_functs.ssl_calls.calc_covariance_per_traj BioSANS2020.cli_functs.ssl_calls.calc_covariance_bootsrap BioSANS2020.cli_functs.ssl_calls.prob_density_calc_wtime BioSANS2020.cli_functs.ssl_calls.prob_density_calc_tslice BioSANS2020.cli_functs.ssl_calls.prob_density_calc .. py:function:: 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_name : name of trajectory file generated in BioSANS simulations (either deterministic or stochastic). Return: current_data : two 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 .. py:function:: 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: edata : two 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 .. py:function:: calc_covariance(edata, points=100) This function calculates the covariance of edata[0] and prints the result in a console. Args: edata : two 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 : last number of points considered in covariance calculation from -points to the end of array or equivalent to [-points:] slice. .. py:function:: 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: edata : two 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 : last 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* .. py:function:: 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: edata : two 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 : last 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* .. py:function:: 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: edata : two 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* .. py:function:: 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: edata : two 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 .. py:function:: prob_density_calc(edata, fname) This function calculates the probability density of edata[0] and returns a plot of the probability density. Args: edata : two 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]