Skip to main content

A collection of scripts for visualizing output from earthquake simulation software

Project description

Light Quake Visualizer

A collection of scripts for visualizing output from earthquake simulation software. Currently, it is designed to handle outputs from SeisSol and Tandem.

Features

  • Visualize SeisSol and Tandem output files in XDMF, HDF-VTK, and PVD formats
  • Support for plotting multiple datasets and variables simultaneously
  • Customizable color maps, color ranges, and scalar bar settings
  • Adjustable lighting and zoom for 3D visualization
  • Flexible slicing options
  • Contour plotting, e.g. for rupture time

For a full list of available options, run:

light_quake_visualizer --help

Simple Example

The following command plots a volume output file at time 10s, variable u, using a saved ParaView view (tpv5.pvcc):

light_quake_visualizer \
  output_tpv5_ref/tpv5_sym.xdmf \
  --var u \
  --time 10.0 \
  --cmap broc \
  --view output_tpv5_ref/tpv5.pvcc \
  --scalar_bar "0.9 0.1" \
  --color_range "-0.5 0.5" \
  --zoom 1.0 \
  --lighting 0.6 0.4 0.6 \
  --annotate_text "black 0.1 0.9 {time:.1f}"

Plotting Multiple Datasets

Example showing a sliced volume output (u) and an unsliced fault output (ASl):

light_quake_visualizer \
  "output_tpv5_ref/tpv5_sym.xdmf;output_tpv5_ref/tpv5_sym-fault.xdmf" \
  --var "u;ASl" \
  --time 10.0 \
  --cmap "broc;viridis" \
  --view output_tpv5_ref/tpv5.pvcc \
  --scalar_bar "0.8 0.1" \
  --color_range "-0.5 0.5;0 5" \
  --zoom 1.0 \
  --light 0.5 0.5 0.5 \
  --slice "0 0 -2000 0 0 1" "1;0"

Plotting Rupture Time Contours

Plot fault slip (ASl) with rupture time (RT) contour lines:

light_quake_visualizer \
  --variable ASl \
  --cmap davos_r0 \
  --color_range "0 3.0" \
  --contour \
    "file_index=0 var=RT contour=grey,2,0,max,1 contour=black,4,0,max,5" \
  --zoom 2.0 \
  --window 1200 600 \
  --output ASl \
  --time "i-1" \
  --view normal \
  output_tpv5_ref/tpv5_sym.xdmf

Support for the New VTKHDF Format

Example usage with the new VTKHDF format:

light_quake_visualizer \
  output_tpv5_new_format/tpv5_sym-wavefield-2.hdf \
  --var u \
  --time "i0" \
  --cmap broc \
  --view output_tpv5_ref/tpv5.pvcc \
  --scalar_bar "0.9 0.1" \
  --color_range "-0.5 0.5" \
  --zoom 1.0 \
  --lighting 0.6 0.4 0.6

Tandem Fault Output Example

Example usage for a 3D Tandem fault output:

light_quake_visualizer \
  --time "i::5" \
  --var slip-rate \
  --cmap turbo \
  output/fault.pvd \
  --view xz \
  --log_scale 0 \
  --scalar_bar "0.1 0.3" \
  --annotate_text "black 0.1 0.9 {long_time}" \
  --zoom 1.5 \
  --color_range "1e-7 1e0"

Generate Vector Graphic Color Bars

You can generate standalone vector graphic color bars using generate_color_bar. An example usage is provided below:

generate_color_bar vik --crange -2 2 --labelfont 8 --height 1.2 3.6 --nticks 3

Combining Snapshots with Partial Overlap

You can combine multiple snapshots with adjustable overlap using image_combiner. An example usage is provided below:

image_combiner \
  --i image1.png image2.png \
  --o combined_image.png \
  --col 2 \
  --rel 0.5 1.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lightquakevisualizer-0.3.8.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lightquakevisualizer-0.3.8-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file lightquakevisualizer-0.3.8.tar.gz.

File metadata

  • Download URL: lightquakevisualizer-0.3.8.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.8

File hashes

Hashes for lightquakevisualizer-0.3.8.tar.gz
Algorithm Hash digest
SHA256 ed553709bef898a3a198d89c86eba308696abf19062934ef321d197868bd6ca0
MD5 e6ce2987f65cdedd1f755fa5b7ccc22c
BLAKE2b-256 9d84ea39ade27a4d1d15a17a25853f63879316b7db353c884c5785d177e55f82

See more details on using hashes here.

File details

Details for the file lightquakevisualizer-0.3.8-py3-none-any.whl.

File metadata

File hashes

Hashes for lightquakevisualizer-0.3.8-py3-none-any.whl
Algorithm Hash digest
SHA256 3f4cd0f7a283756af41667b7a767339f80114084ff6215e8576d7cb717f6386e
MD5 cf122467f5651af0da05298ef1c4fbe3
BLAKE2b-256 9e7e48bdb10b235fe6ee2dddf7b3c86d4c16bda212361e110d56aefd5c961ad1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page