first test using gmpe-smtk fails
funkes opened this issue · 1 comments
funkes commented
As a newbie I try to create a figure like fig.4.1 from https://github.com/GEMScienceTools/gmpe-smtk-docs/blob/master/gmpe_smtk_guide.pdf "Scaling of GMPEs with respect to magnitude". The installation of openquake and gmpe-smtk worked well, the python code fills the parameters for the plotting calls well, but one plotting call is finished immediately without result or error message.
Some data to my system:
- ubuntu 18.04
- python3.6
- openquake 3.7.1
- gmpe-smtk via git clone https://github.com/GEMScienceTools/gmpe-smtk (today)
here my tested code:
#!/usr/bin/env python
import smtk.trellis.trellis_plots as trpl
import numpy as np
import smtk.trellis.configure as rcfg
# Import the get_available_gsims function from OpenQuake
from openquake.hazardlib.gsim import get_available_gsims
# Show list of gsims
get_available_gsims()
gmpe_list = ["AkkarBommer2010", "AkkarCagnan2010", "AkkarEtAlRjb2014", "BooreAtkinson2008", "ChiouYoungs2008", "ZhaoEtAl2006Asc"]
imts = ["PGA", "SA(0.2)", "SA 1.0)", "SA(2.0)"]
rupt1 = rcfg.GSIMRupture(magnitude = 3.0, dip = 10.0, aspect = 1.5, rake = 90.0, ztor = 10.0, strike = 5.0, hypocentre_location = (0.5, 0.5))
sites_mesh = rupt1.get_target_sites_mesh(maximum_distance = 200.0, spacing =2.0, vs30 =800.0, vs30measured = True, z1pt0 = None, z2pt5=None)
rupt1.plot_distance_comparisons("rjb", "rrup", filename="rup_dist_plot.pdf", filetype="pdf")
trpl.DistanceIMTTrellis.from_rupture_model(rupt1, gmpe_list, imts, filename="distance_IMT_trellis.pdf", filetype="pdf")
File rup_dist_plot.pdf looks well, and a nice picture is popping up, but file distance_IMT_trellis.pdf is missing.
Should I add further info? Any suggestion is greatly appreciated.
funkes commented
Changing last line to
a = trpl.DistanceIMTTrellis(magnitude, distances, gmpe_list, imts, params, distance_type="rjb", plot_type="loglog", figure_size=(7,5), filename="/home/thomas/Documents/Forschungsseminar/trellis_test_distance_output", filetype="png")
a.plot()
solved this more formal problem.