Skip to content

Latest commit

 

History

History
78 lines (65 loc) · 2.19 KB

README.md

File metadata and controls

78 lines (65 loc) · 2.19 KB

Simple Focal Mechanism Generator based on PyGMT

Requirements

  • see pyproject.toml

Create Virtual Environment

  • make init

Run the Web Application

  • make run

Try the Web Application

Method

  • URL: POST /simplemeca

  • Header:

    Key Value Required
    Content-Type application/json Required
  • Body Json Parameters: (All Required)

    • strike
      float
    • dip
      float
    • rake
      float
    • color_r
      float
      R in RGB colors
    • color_g
      float
      G in RGB colors
    • color_b
      float
      B in RGB colors
    • title
      string
  • Response

{'image_url': 'http://127.0.0.1:5000/static/<sha256-format>.png'}

Examples

  • example_payload.json

TODO

#X Y depth mrr mtt mff mrt mrf mtf exp newX newY title
gmt meca -Rg -JN15c -Sm2c -png << EOF
-176.96 -29.25 47.8 7.680 0.090 -7.770 1.390 4.520 -3.260 26 0 0 title
EOF

Known Issues

  • Ghostscript does not support webp output, so only consider png or jpg format.
  • GMT 5/6 (PyGMT) realtime performance is worser than legacy GMT 4.x: GenericMappingTools/gmt#587

Credit

Resources