ploterr

usage:

ploterr [-h] [-r RCFILE] [--quiet | --verbose | --debug] [--version]
               {help,d.kinetics,d.probs,rw.probs,rw.kinetics,generic} ...

Plots error ranges for weighted ensemble datasets.

Command-line options

optional arguments:

-h, --help            show this help message and exit

general options:

-r RCFILE, --rcfile RCFILE
                      use RCFILE as the WEST run-time configuration file (default: west.cfg)
--quiet               emit only essential information
--verbose             emit extra information
--debug               enable extra checks and emit copious information
--version             show program's version number and exit

supported input formats:

{help,d.kinetics,d.probs,rw.probs,rw.kinetics,generic}
  help                print help for this command or individual subcommands
  d.kinetics          output of w_direct kinetics
  d.probs             output of w_direct probs
  rw.probs            output of w_reweight probs
  rw.kinetics         output of w_reweight kinetics
  generic             arbitrary HDF5 file and dataset

westpa.cli.tools.ploterr module

class westpa.cli.tools.ploterr.WESTMasterCommand

Bases: WESTTool

Base class for command-line tools that employ subcommands

subparsers_title = None
subcommands = None
include_help_command = True
add_args(parser)

Add arguments specific to this tool to the given argparse parser.

process_args(args)

Take argparse-processed arguments associated with this tool and deal with them appropriately (setting instance variables, etc)

go()

Perform the analysis associated with this tool.

class westpa.cli.tools.ploterr.WESTSubcommand(parent)

Bases: WESTToolComponent

Base class for command-line tool subcommands. A little sugar for making this more uniform.

subcommand = None
help_text = None
description = None
add_to_subparsers(subparsers)
go()
property work_manager

The work manager for this tool. Raises AttributeError if this is not a parallel tool.

class westpa.cli.tools.ploterr.ProgressIndicatorComponent

Bases: WESTToolComponent

add_args(parser)

Add arguments specific to this component to the given argparse parser.

process_args(args)

Take argparse-processed arguments associated with this component and deal with them appropriately (setting instance variables, etc)

class westpa.cli.tools.ploterr.Plotter(h5file, h5key, iteration=-1, interface='matplotlib')

Bases: object

This is a semi-generic plotting interface that has a built in curses based terminal plotter. It’s fairly specific to what we’re using it for here, but we could (and maybe should) build it out into a little library that we can use via the command line to plot things. Might be useful for looking at data later. That would also cut the size of this tool down by a good bit.

plot(i=0, j=1, tau=1, iteration=None, dim=0, interface=None)
class westpa.cli.tools.ploterr.CommonPloterrs(parent)

Bases: WESTSubcommand

add_args(parser)

Add arguments specific to this component to the given argparse parser.

process_args(args)

Take argparse-processed arguments associated with this component and deal with them appropriately (setting instance variables, etc)

parse_range(rangespec)
do_plot(data, output_filename, title=None, x_range=None, y_range=None, x_label=None, y_label=None)
class westpa.cli.tools.ploterr.GenericIntervalSubcommand(parent)

Bases: CommonPloterrs

description = 'Plots generic expectation/CI data. A path to the HDF5 file and the dataset\nwithin it must be provided. This path takes the form **FILENAME/PATH[SLICE]**.\nIf the dataset is not a vector (one dimensional) then a slice must be provided.\nFor example, to access the state 0 to state 1 rate evolution calculated by\n``w_kinavg``, one would use ``kinavg.h5/rate_evolution[:,0,1]``.\n\n\n-----------------------------------------------------------------------------\nCommand-line arguments\n-----------------------------------------------------------------------------\n'
subcommand = 'generic'
help_text = 'arbitrary HDF5 file and dataset'
add_args(parser)

Add arguments specific to this component to the given argparse parser.

process_args(args)

Take argparse-processed arguments associated with this component and deal with them appropriately (setting instance variables, etc)

load_and_validate_data()
go()
class westpa.cli.tools.ploterr.DirectKinetics(parent)

Bases: CommonPloterrs

subcommand = 'd.kinetics'
help_text = 'output of w_direct kinetics'
input_filename = 'direct.h5'
flux_output_filename = 'flux_evolution_d_{state_label}.pdf'
rate_output_filename = 'rate_evolution_d_{istate_label}_{fstate_label}.pdf'
description = 'Plot evolution of state-to-state rates and total flux into states as generated\nby ``w_{direct/reweight} kinetics`` (when used with the ``--evolution-mode``\noption). Plots are generated for all rates/fluxes calculated. Output filenames\nrequire (and plot titles and axis labels support) substitution based on which\nflux/rate is being plotted:\n\n  istate_label, fstate_label\n    *(String, for rates)* Names of the initial and final states, as originally\n    given to ``w_assign``.\n\n  istate_index, fstate_index\n    *(Integer, for rates)* Indices of initial and final states.\n\n  state_label\n    *(String, for fluxes)* Name of state\n\n  state_index\n    *(Integer, for fluxes)* Index of state\n'
add_args(parser)

Add arguments specific to this component to the given argparse parser.

process_args(args)

Take argparse-processed arguments associated with this component and deal with them appropriately (setting instance variables, etc)

plot_flux(istate)
plot_rate(istate, jstate)
go()
class westpa.cli.tools.ploterr.DirectStateprobs(parent)

Bases: CommonPloterrs

subcommand = 'd.probs'
help_text = 'output of w_direct probs'
input_filename = 'direct.h5'
pop_output_filename = 'pop_evolution_d_{state_label}.pdf'
color_output_filename = 'color_evolution_d_{state_label}.pdf'
description = 'Plot evolution of macrostate populations and associated uncertainties. Plots\nare generated for all states calculated. Output filenames require (and plot\ntitles and axis labels support) substitution based on which state is being\nplotted:\n\n  state_label\n    *(String, for fluxes)* Name of state\n\n  state_index\n    *(Integer, for fluxes)* Index of state\n'
add_args(parser)

Add arguments specific to this component to the given argparse parser.

process_args(args)

Take argparse-processed arguments associated with this component and deal with them appropriately (setting instance variables, etc)

plot_pop(istate)
plot_color(istate)
go()
class westpa.cli.tools.ploterr.ReweightStateprobs(parent)

Bases: DirectStateprobs

subcommand = 'rw.probs'
help_text = 'output of w_reweight probs'
input_filename = 'reweight.h5'
pop_output_filename = 'pop_evolution_rw_{state_label}.pdf'
color_output_filename = 'color_evolution_rw_{state_label}.pdf'
class westpa.cli.tools.ploterr.ReweightKinetics(parent)

Bases: DirectKinetics

subcommand = 'rw.kinetics'
help_text = 'output of w_reweight kinetics'
input_filename = 'reweight.h5'
flux_output_filename = 'flux_evolution_rw_{state_label}.pdf'
rate_output_filename = 'rate_evolution_rw_{istate_label}_{fstate_label}.pdf'
class westpa.cli.tools.ploterr.PloterrsTool

Bases: WESTMasterCommand

prog = 'ploterrs'
subcommands = [<class 'westpa.cli.tools.ploterr.DirectKinetics'>, <class 'westpa.cli.tools.ploterr.DirectStateprobs'>, <class 'westpa.cli.tools.ploterr.ReweightStateprobs'>, <class 'westpa.cli.tools.ploterr.ReweightKinetics'>, <class 'westpa.cli.tools.ploterr.GenericIntervalSubcommand'>]
subparsers_title = 'supported input formats'
description = 'Plots error ranges for weighted ensemble datasets.\n\n\n-----------------------------------------------------------------------------\nCommand-line options\n-----------------------------------------------------------------------------\n'
westpa.cli.tools.ploterr.entry_point()