From 4e9fe983249f6bb612ef1273ca0b224f775d004e Mon Sep 17 00:00:00 2001 From: Hearne Date: Wed, 15 Feb 2017 12:42:03 -0700 Subject: [PATCH] Fixed an X server problem in getstrec, and fixed url in setup script. --- getstrec.py | 8 ++++++++ strec_init.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/getstrec.py b/getstrec.py index 7e66ae4..200cbea 100755 --- a/getstrec.py +++ b/getstrec.py @@ -9,12 +9,20 @@ import datetime import math +#matplotlib workaround +import matplotlib + +#this allows us to have a non-interactive backend - essential on systems without a display +matplotlib.use('Agg') + #local imports from strec.gmpe import GMPESelector from strec import gmpemap import strec.utils from strec import cmt + + def getPlungeValues(strike,dip,rake,mag): mom = 10**((mag*1.5)+16.1) d2r = math.pi/180.0 diff --git a/strec_init.py b/strec_init.py index dabdfbf..af9c5a3 100755 --- a/strec_init.py +++ b/strec_init.py @@ -18,7 +18,7 @@ from strec.mtreader import createDataFile,appendDataFile import strec.utils -SLABURL = 'http://earthquake.usgs.gov/data/slab/models/allslabs.tgz' +SLABURL = 'ftp://hazards.cr.usgs.gov/web/data/slab/models/allslabs.tgz' HIST_GCMT_URL = 'http://www.ldeo.columbia.edu/~gcmt/projects/CMT/catalog/jan76_dec10.ndk.gz' MONTHLY_GCMT_URL = 'http://www.ldeo.columbia.edu/~gcmt/projects/CMT/catalog/NEW_MONTHLY/'