# Enter km spacing between path density points. km_points = 20.0 # Reference elipsoid to calculate distance. wgs84 = pyproj.Geod(ellps='WGS84') # Enter number of bins for 2D Histogram density calculation. nbins = 200 # Enter estimated average shear wave velocity. 3kms-1 is the default! velocity = 3.0 # Define your ambient noise period range OR individual period in seconds. global period_range period_range = [1,40] # Enter path to dataless file dataless_path = 'ALL_AUSTRALIA.870093.dataless' coords = Dataless.locs_from_dataless(dataless_path) shape_path = "/home/boland/Dropbox/University/UniMelb\ /AGOS/PROGRAMS/ANT/Versions/26.04.2015/shapefiles/aus.shp" t0 = dt.datetime.now() # Generate InShape class SHAPE = InShape(shape_path) # Create shapely polygon from imported shapefile UNIQUE_SHAPE = SHAPE.shape_poly() print type(UNIQUE_SHAPE) # Generate InPoly class INPOLY = InPoly(shape_path) # Create matplotlib Path object from imported shapefile outer_shape = UNIQUE_SHAPE.buffer(1.,resolution=1)
# Enter number new stations desired. N = 3 # Enter km spacing between path density points. km_points = 20.0 # Reference elipsoid to calculate distance. wgs84 = pyproj.Geod(ellps='WGS84') # Enter number of bins for 2D Histogram density calculation. nbins = 200 # Enter estimated average shear wave velocity. 3kms-1 is the default! velocity = 3.0 # Define your ambient noise period range OR individual period in seconds. global period_range period_range = [1, 40] dataless_obj = Dataless(dataless_path=dataless_path) coords = dataless_obj.locs_from_dataless() lons, lats, elevs = coords[:, 0], coords[:, 1], coords[:, 2] if show: plt.figure() plt.scatter(lons, lats) plt.show() #----------------------------------------------------------------------------- # GENERATE SECOND SET OF VARIABLES AND STATES #----------------------------------------------------------------------------- lonmin, lonmax = np.floor(min(coords[:, 0])), np.ceil(max(coords[:, 0])) latmin, latmax = np.floor(min(coords[:, 1])), np.ceil(max(coords[:, 1]))
N = 3 # Enter km spacing between path density points. km_points = 20.0 # Reference elipsoid to calculate distance. wgs84 = pyproj.Geod(ellps='WGS84') # Enter number of bins for 2D Histogram density calculation. nbins = 200 # Enter estimated average shear wave velocity. 3kms-1 is the default! velocity = 3.0 # Define your ambient noise period range OR individual period in seconds. global period_range period_range = [1,40] dataless_obj = Dataless(dataless_path=dataless_path) coords = dataless_obj.locs_from_dataless() lons, lats, elevs = coords[:,0], coords[:,1], coords[:,2] if show: plt.figure() plt.scatter(lons, lats) plt.show() #----------------------------------------------------------------------------- # GENERATE SECOND SET OF VARIABLES AND STATES #----------------------------------------------------------------------------- lonmin, lonmax = np.floor(min(coords[:,0])), np.ceil(max(coords[:,0])) latmin, latmax = np.floor(min(coords[:,1])), np.ceil(max(coords[:,1]))