![]() |
pyLM
v1.1
A Python Problem Solving Environment for the simulation of stochastic biological systems
|
Functions | |
def | openLMFile |
Open a Lattice Microbes File for reading. More... | |
def | closeLMFile |
Close a Lattice Microbes File. More... | |
def | showTraceFromFile |
Show species trace from a particular replicate. More... | |
def | plotTraceFromFile |
Plot species from an output file. More... | |
def | showTrace |
Show a specific species trace. More... | |
def | plotTrace |
Plot a specific species trace. More... | |
def | showAvgVarFromFile |
Show species from an output file. More... | |
def | plotAvgVarFromFile |
Plot species from an output file. More... | |
def | showAvgVar |
Show a specific species average over time and variance. More... | |
def | plotAvgVar |
Plot a specific species average over time and variance. More... | |
def | getOccupancyKymograph |
Compute the specie density(occupancy) among a slice of the simulation domain as a function over time for the given direciton. More... | |
def | plotOccupancyKymograph |
Plot a specific specie density(occupancy) among a slice of the simulation domain as a function of a direction over time. More... | |
def | showOccupancyKymograph |
Show a specific specie density(occupancy) among a slice of the simulation domain as a function of a direction over time. More... | |
def | plotPhaseSpace |
Plot the 2D or 3D phase space associated with the given species over the replicates indicated. More... | |
def | getTimesteps |
Extract the timestep times. More... | |
def | getSpecieTrace |
Extract data for a particular specie for the specified replicate. More... | |
def | getAvgVarTrace |
Get the average and variance of the specie trace over time. More... | |
def | getHistogram |
Get the histogram for a specie. More... | |
def | getPhaseSpace |
Get the nD phase space associated with the traces of species. More... | |
def pySTDLM.PostProcessing.closeLMFile | ( | f | ) |
Close a Lattice Microbes File.
f | A previously opened lattice microbes file |
def pySTDLM.PostProcessing.getAvgVarTrace | ( | f, | |
specie, | |||
doublingTime = None |
|||
) |
Get the average and variance of the specie trace over time.
f | The HDF5 file handle to extract from or the name of a file to open |
specie | The specie to extract |
doublingTime | An optional doubling time parameter that will normalize average each trace by time in the cell cycle assuming exponentially growing cell (2log2 * x/2^(t/DT)), effectively normalizing against cell size. Default: no averaging is performed |
def pySTDLM.PostProcessing.getHistogram | ( | f, | |
species | |||
) |
Get the histogram for a specie.
f | The HDF5 file handle to extract from or the name of a file to open |
specie | An array of specie/s to extract. returns a nD histogram of the data. |
def pySTDLM.PostProcessing.getOccupancyKymograph | ( | f, | |
species = None , |
|||
replicate = 1 |
|||
) |
Compute the specie density(occupancy) among a slice of the simulation domain as a function over time for the given direciton.
filename | Name of file to extract data from |
specie | A particular specie to plot density for |
replicate | The replicate to show trace for |
def pySTDLM.PostProcessing.getPhaseSpace | ( | f, | |
species, | |||
replicate | |||
) |
Get the nD phase space associated with the traces of species.
If a single replicate is specified, a single trace will be returned, otherwise a 2/3D density matrix will be returned.
f | The HDF5 file handle to extract from or the name of a file to open |
specie | An iterable of 2 more specie names |
replicate | The replicate for which to extract the phase space |
def pySTDLM.PostProcessing.getSpecieTrace | ( | f, | |
specie, | |||
replicate = 1 , |
|||
doublingTime = None |
|||
) |
Extract data for a particular specie for the specified replicate.
f | The HDF5 file handle to extract from or the name of a file to open |
specie | The specie to extract data |
replicate | The number of the replicate to extract from (default: 1) |
doublingTime | An optional doubling time parameter that will normalize average each trace by time in the cell cycle assuming exponentially growing cell (2log2 * x/2^(t/DT)), effectively normalizing against cell size. Default: no averaging is performed |
def pySTDLM.PostProcessing.getTimesteps | ( | f | ) |
Extract the timestep times.
f | The HDF5 file handle to extract from or the name of a file to open |
def pySTDLM.PostProcessing.openLMFile | ( | filename | ) |
Open a Lattice Microbes File for reading.
filename | Name of the file |
def pySTDLM.PostProcessing.plotAvgVar | ( | f, | |
species = None , |
|||
filename = None , |
|||
kwargs | |||
) |
Plot a specific species average over time and variance.
f | An h5py object handle |
species | A list of species to show |
filename | A filename to print to (default None, gives the same behavior as showAvgVar(...)) |
kwargs | Additional arguments to be passed on to matplotlib.plot. These are any arguments that are valid with matplotlib.plot |
def pySTDLM.PostProcessing.plotAvgVarFromFile | ( | filename, | |
species, | |||
outfile, | |||
kwargs | |||
) |
Plot species from an output file.
filename | The name of an HDF5 output file generated by LatticeMicrobes |
species | A list of species to plot |
kwargs | Additional arguments to be passed on to matplotlib.plot. These are any arguments that are valid with matplotlib.plot |
outfile | A filename to plot to |
def pySTDLM.PostProcessing.plotOccupancyKymograph | ( | f, | |
species = None , |
|||
replicate = 1 , |
|||
filename = None |
|||
) |
Plot a specific specie density(occupancy) among a slice of the simulation domain as a function of a direction over time.
f | The name of the LM file |
specie | A particular specie to plot density for |
filename | A filename to print to (default None, gives the same behavior as showAvgVar(...)) |
replicate | The replicate to show trace for |
def pySTDLM.PostProcessing.plotPhaseSpace | ( | f, | |
species = None , |
|||
replicate = 1 , |
|||
withHistogram = False |
|||
) |
Plot the 2D or 3D phase space associated with the given species over the replicates indicated.
f | An h5py object handle |
specie | An iterable of 2 or 3 specie names indicating whether to plot in 2D or 3D space |
replicate | The replicate to show trace for |
withHistogram | If set to true, a heatmap of the phase space over all replicates will be plotted in the background. (NOTE: this only works in 2D.) |
def pySTDLM.PostProcessing.plotTrace | ( | f, | |
species = None , |
|||
replicate = 1 , |
|||
filename = None , |
|||
kwargs | |||
) |
Plot a specific species trace.
f | An h5py object handle |
species | A specie name or a list of species to show; can be a single string or a iterable list of species |
filename | A filename to print to (default None, gives the same behavior as showAvgVar(...)) |
replicate | The replicate to show trace for. Can be an integer or an iterable list of replicte numbers |
kwargs | Additional arguments to be passed on to matplotlib.plot. These are any arguments that are valid with matplotlib.plot |
def pySTDLM.PostProcessing.plotTraceFromFile | ( | filename, | |
species, | |||
replicate, | |||
outfile, | |||
kwargs | |||
) |
Plot species from an output file.
filename | The patch to an HDF5 output file generated by LatticeMicrobes |
species | A list of species to plot |
replicate | The replicate to show trace for |
kwargs | Additional arguments to be passed on to matplotlib.plot. These are any arguments that are valid with matplotlib.plot |
outfile | A filename to plot to |
def pySTDLM.PostProcessing.showAvgVar | ( | f, | |
species, | |||
kwargs | |||
) |
Show a specific species average over time and variance.
f | An h5py object handle |
species | A list of species to show |
kwargs | Additional arguments to be passed on to matplotlib.plot. These are any arguments that are valid with matplotlib.plot |
def pySTDLM.PostProcessing.showAvgVarFromFile | ( | filename, | |
species, | |||
kwargs | |||
) |
Show species from an output file.
filename | The name of an HDF5 output file generated by LatticeMicrobes |
species | A list of species to plot |
kwargs | Additional arguments to be passed on to matplotlib.plot. These are any arguments that are valid with matplotlib.plot |
def pySTDLM.PostProcessing.showOccupancyKymograph | ( | f, | |
species = None , |
|||
replicate = 1 |
|||
) |
Show a specific specie density(occupancy) among a slice of the simulation domain as a function of a direction over time.
f | An h5py object handle |
specie | A particular specie to plot density for |
replicate | The replicate to show trace for |
def pySTDLM.PostProcessing.showTrace | ( | f, | |
species, | |||
replicate, | |||
kwargs | |||
) |
Show a specific species trace.
f | An h5py object handle |
species | A list of species to show |
replicate | The replicate to show trace for |
kwargs | Additional arguments to be passed on to matplotlib.plot. These are any arguments that are valid with matplotlib.plot |
def pySTDLM.PostProcessing.showTraceFromFile | ( | filename, | |
species, | |||
replicate, | |||
kwargs | |||
) |
Show species trace from a particular replicate.
filename | The patch to an HDF5 output file generated by LatticeMicrobes |
species | A list of species to plot |
replicate | The replicate to show trace for |
kwargs | Additional arguments to be passed on to matplotlib.plot. These are any arguments that are valid with matplotlib.plot |