Usage and Examples#
Getting Started#
Here’s a simple example to get you started with PathView:
Start the Application
After installation, launch PathView:
npm run start:both
Navigate to http://localhost:5173 in your browser.
Load Example Files
PathView includes several pre-built example graphs in the example_graphs/ directory that demonstrate different functionality:
harmonic_oscillator.json
- Simple oscillator simulationpid.json
- PID controller examplefestim_two_walls.json
- Two-wall diffusion modellinear_feedback.json
- Linear feedback systemspectrum.json
- Spectral analysis example
To load an example:
Use the file import functionality in the application
Select any
.json
file from the example_graphs/ directoryThe graph will load with pre-configured nodes and connections
Click the Run button to run the example
Create Your Own Graphs
Drag and drop nodes from the sidebar
Connect nodes by dragging from output handles to input handles
Configure node parameters in the properties panel
Use the simulation controls to run your model
Step by step guide#
Start the Application
After installation, launch PathView:
npm run start:both
Navigate to http://localhost:5173 in your browser.
PathView main interface after starting the application.#
Add nodes
In the left sidebar, drag and drop:
under Sources: Sinusoidal source
under Processing: Delay
under Output: Scope
Dragging nodes from the sidebar to the canvas.#
PathView interface after adding the three nodes.#
Connect Nodes
Connect the Sinusoidal source to the Delay
Connect the Sinusoidal source to the Scope
Connect the Delay to the Scope
PathView interface after connecting the nodes.#
Run and visualise results
Click the Run button
The graph will display the sinusoidal signal and its - slightly - delayed version
If you zoom in you can see the delay, but it is very small.#
Configure Nodes
Let’s change the parameters of the nodes to see how it affects the simulation
Select the Graph Editor tab
Select the Delay node and set the
tau
parameter to0.1
Select the Sinusoidal source and set the
frequency
to0.7 Hz
Click the Run button again to see the updated results
After changing the parameters, the delay is now clearly visible.#
Save Your Graph
Click the Save File button
Choose a location and filename for your graph
Click Save to export your graph as a JSON file
Export graph to python script
Click the Save to Python button
Choose a location and filename for your Python script
Click Save to export your graph as a Python script
Global variables#
Global variables can be defined in the Global Variables tab. These variables can be used across multiple nodes in your graph, allowing for easier management of common parameters.
Let’s take the [previous example](#step-by-step-guide).
Go to the Global Variables tab.
Click the “Add Variable” button to create a new global variable.
Name the variable
a
and set its value to0.1
.Note: you can remove a variable by clicking the red icon next to it.#
Go back to the Graph Editor tab.
Select the Delay node.
In the node panel, set the
amplitude
parameter to12 * a
and thefrequency
to7 * a
.Select the Delay node.
Set the
tau
parameter toa + 0.05
.Click the Run button to see the results.
Solver parameters#
The Solver Parameters tab allows you to configure the simulation parameters such as time step, maximum simulation time, and numerical solver settings.

Visualisation and post-processing#
In the Results tab, you can visualize the simulation results. Each scope node will have its own plot in the Results tab. You can toggle the visibility of each line by clicking on it in the legend.
Download CSV: You can download the simulation results as a CSV file for further analysis.
Download HTML: You can download the simulation results as an HTML file for easy sharing and viewing in a web browser.
Export to python#
For advanced users, PathView allows you to export your graph as a Python script. This feature is useful for integrating your simulation into larger Python projects or for further analysis using Python libraries.
This is useful for instance for performing parametric studies or sensitivity analysis, where you can easily modify parameters in the Python script and rerun the simulation.