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.
The steps to run the parameter viewer are:
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.
Point your web browser to https://geodynamics.github.io/pylith_parameters.
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.
When you point your web browser to the correct port, you should see
the PyLith Parameter Viewer as shown below:
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.
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:
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
Clicking on the component in red to the right of the equals sign will
show its parameters in the right panel as shown below:
The selected facility in the left panel whose parameters are shown in the right panel will be highlighted via a gray background.