PyLith Parameter Viewer

The PyLith Parameter Viewer provides a graphical user interface for viewing the parameters associated with a PyLith simulation and the version information for PyLith and its dependencies. This viewer is an updated and interactive interface to the information generated by the pylithinfo script. It displays the hiearchy of components and the parameters for each one, including default values.

Loading Parameters

The steps to run the parameter viewer are:

  1. Generate the parameter JSON file.
  2. Start the web server (if not already running).
  3. Load the parameter JSON file.

Generate the parameter JSON file

The parameter viewer uses a JSON file with all of the parameters collected from .cfg files, command line arguments, etc as input. This file can be generated using pylithinfo and, by default, it will be generated whenever a pylith simulation is run. When using pylithinfo, the name of the parameter file can be set via a command line argument. When using pylith, the DumpParametersJSON component contains a property for the name of the file. You can set the filename on the command line


$$ pylith --dump_parameters.filename=FILENAME.json
    

or within a .cfg file


[pylithapp.dump_parameters]
filename = FILENAME.json
    

Currently, the JSON parameter file cannot be used in place of a .cfg file to run a PyLith simulation. This feature will be added in an upcoming release.

Load the application

Online version

Point your web browser to https://geodynamics.github.io/pylith_parameters.

Local (offline) version

Change to the directory containing the pylith_paramviewer script (usually the parametersgui directory under the top-level pylith directory), and run the pylith_paramviewer script. This will start a simple Python-based web server on your local computer.


$$ cd parametersgui
$$ ./pylith_paramviewer
    

The script will instruct you to point your web browswer to a local port on your computer. The default is http://localhost:9000. You can change the default port using the --port command line argument to the pylith_paramviewer script.

Using the Parameter Viewer

When you point your web browser to the correct port, you should see the PyLith Parameter Viewer as shown below: Screenshot of application at startup

Click the Choose File button and navigate to the desired JSON parameter file. The viewer tarball includes a sample parameter file sample_parameters.json.

Click the Reload button to reload the same JSON parameter file if you regenerate it. To select a new JSON parameter file, click the Choose File button and navigate to the desired file.

Version Information

Click on the Version tab to examine the version information. This tab displays the same version information shown with the --version command line argument to pylith in an easy to read layout. This includes information about the platform on which pylith or pylithinfo was run, the PyLith version, and versions of the dependencies, as shown below: Screenshot of Version tab

Parameter Information

Click on the Parameters tab to examine the hiearchy of components and the parameters for each. You can expand/collapse the Component Hierarchy tree in the left panel by clicking on the triangles or facility name in blue to the left of the equals sign as shown below Screenshot of Parameters tab before selecting a
      facility in the left panel

Clicking on the component in red to the right of the equals sign will show its parameters in the right panel as shown below: Screenshot of Parameters tab with the <tt>z_neg</tt>
      facility selected

The selected facility in the left panel whose parameters are shown in the right panel will be highlighted via a gray background.