Lattice Microbes 2.5
This is for whole cell modeling
Loading...
Searching...
No Matches
pySTDLM.PostProcessing Namespace Reference

Functions

 openLMFile (filename)
 closeLMFile (f)
 showTraceFromFile (filename, species, replicate, **kwargs)
 plotTraceFromFile (filename, species, replicate, outfile, **kwargs)
 showTrace (f, species, replicate, **kwargs)
 plotTrace (f, species=None, replicate=1, filename=None, **kwargs)
 showAvgVarFromFile (filename, species, **kwargs)
 plotAvgVarFromFile (filename, species, outfile, **kwargs)
 showAvgVar (f, species, **kwargs)
 plotAvgVar (f, species=None, filename=None, **kwargs)
 getOccupancyKymograph (f, species=None, replicate=1)
 plotOccupancyKymograph (f, species=None, replicate=1, filename=None)
 showOccupancyKymograph (f, species=None, replicate=1)
 plotPhaseSpace (f, species=None, replicate=1, withHistogram=False)
 getSpecies (f)
 getTimesteps (f)
 getSpecieTrace (f, specie, replicate=1, doublingTime=None)
 getAvgVarTrace (f, specie, doublingTime=None)
 getHistogram (f, species)
 getPhaseSpace (f, species, replicate)

Function Documentation

◆ closeLMFile()

pySTDLM.PostProcessing.closeLMFile ( f)
Close a Lattice Microbes File

Args:
    f:
        A previously opened lattice microbes file
Here is the caller graph for this function:

◆ getAvgVarTrace()

pySTDLM.PostProcessing.getAvgVarTrace ( f,
specie,
doublingTime = None )
Get the average and variance of the specie trace over time

Args:
    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

Returns:
    avg, var, time
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHistogram()

pySTDLM.PostProcessing.getHistogram ( f,
species )
Get the histogram for a specie

Args:
    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.

Returns:
    bins, edges (len(bins)+1)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getOccupancyKymograph()

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

Args:
    filename:
        Name of file to extract data from
    specie:
        A particular specie to plot density for
    replicate:
        The replicate to show trace for
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPhaseSpace()

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.

Args:
    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

Returns:
    A numpy array of a trace from a single replicate (specie1, specie2, ...) 
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSpecies()

pySTDLM.PostProcessing.getSpecies ( f)
Exract the species names

Args:
    f:
        The HDF5 file handle to extract from or the name of a file to open
Here is the call graph for this function:

◆ getSpecieTrace()

pySTDLM.PostProcessing.getSpecieTrace ( f,
specie,
replicate = 1,
doublingTime = None )
Extract data for a particular specie for the specified replicate

Args:
    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

Returns:
    The species time trace in a numpy array
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTimesteps()

pySTDLM.PostProcessing.getTimesteps ( f)
Extract the timestep times

Args:
    f:
        The HDF5 file handle to extract from or the name of a file to open

Returns:
    The timestep times in a numpy array
Here is the call graph for this function:
Here is the caller graph for this function:

◆ openLMFile()

pySTDLM.PostProcessing.openLMFile ( filename)
Open a Lattice Microbes File for reading

Args:
    filename:
        Name of the file
Returns:
    a handle to the file
Here is the caller graph for this function:

◆ plotAvgVar()

pySTDLM.PostProcessing.plotAvgVar ( f,
species = None,
filename = None,
** kwargs )
Plot a specific species average over time and variance

Args:
    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

Returns:
    A handle to the figure object created which allows customization of plot attributes
Here is the call graph for this function:
Here is the caller graph for this function:

◆ plotAvgVarFromFile()

pySTDLM.PostProcessing.plotAvgVarFromFile ( filename,
species,
outfile,
** kwargs )
Plot species from an output file

Args:
    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
Here is the call graph for this function:

◆ plotOccupancyKymograph()

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

Args:
    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 the kymograph from the file
Here is the call graph for this function:
Here is the caller graph for this function:

◆ plotPhaseSpace()

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

Args:
    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.)
Here is the call graph for this function:

◆ plotTrace()

pySTDLM.PostProcessing.plotTrace ( f,
species = None,
replicate = 1,
filename = None,
** kwargs )
Plot a specific species trace

Args:
    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

Returns:
    A handle to the figure object created which allows customization of plot attributes
Here is the call graph for this function:
Here is the caller graph for this function:

◆ plotTraceFromFile()

pySTDLM.PostProcessing.plotTraceFromFile ( filename,
species,
replicate,
outfile,
** kwargs )
Plot species from an output file

Args:
    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
Here is the call graph for this function:

◆ showAvgVar()

pySTDLM.PostProcessing.showAvgVar ( f,
species,
** kwargs )
Show a specific species average over time and variance

Args:
    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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showAvgVarFromFile()

pySTDLM.PostProcessing.showAvgVarFromFile ( filename,
species,
** kwargs )
Show species from an output file
Args:
    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
Here is the call graph for this function:

◆ showOccupancyKymograph()

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

Args:
    f:
        An h5py object handle
    specie:
        A particular specie to plot density for
    replicate:
        The replicate to show trace for
Here is the call graph for this function:

◆ showTrace()

pySTDLM.PostProcessing.showTrace ( f,
species,
replicate,
** kwargs )
Show a specific species trace

Args:
    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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showTraceFromFile()

pySTDLM.PostProcessing.showTraceFromFile ( filename,
species,
replicate,
** kwargs )
Show species trace from a particular replicate

Args:
    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
Here is the call graph for this function: