You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
##% Load in ShakeMap
shakemap = ShakeGrid.load(shakefile, adjust='res')
##% Then subdivide to match smaller geodict
PGA = shakemap.getLayer('pga').subdivide(gdict).getData().astype(float)
'''
This leaves edges with values much lower than they should be (but not nodata)
causing problems on the edges in later calculations for ground failure
'''
plt.imshow(PGA)
plt.show()
The text was updated successfully, but these errors were encountered:
from mapio.geodict import GeoDict
from mapio.shake import ShakeGrid
import matplotlib.pyplot as plt
shakefile = 'grid.xml' # Use 1906 San Francisco shakemap here
gdict = GeoDict({'xmin': -122.88698976549115,
'xmax': -122.2389795319979,
'ymin': 37.49798642716523,
'ymax': 38.065041960700796,
'dx': 9.315845794900122e-05,
'dy': 9.315845794900046e-05,
'ny': 6088,
'nx': 6957})
##% Load in ShakeMap
shakemap = ShakeGrid.load(shakefile, adjust='res')
##% Then subdivide to match smaller geodict
PGA = shakemap.getLayer('pga').subdivide(gdict).getData().astype(float)
'''
This leaves edges with values much lower than they should be (but not nodata)
causing problems on the edges in later calculations for ground failure
'''
plt.imshow(PGA)
plt.show()
The text was updated successfully, but these errors were encountered: