# 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 = 220 # 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_path = 'east-timor/timor.dataless' dataless_path = '/storage/ANT/spectral_density/USARRAY/full_USARRAY.dataless' coords = locs_from_dataless(dataless_path) #shape_path = "/home/boland/Dropbox/University/UniMelb\ #/AGOS/PROGRAMS/ANT/Versions/26.04.2015/shapefiles/aus.shp" shape_path = 'east-timor/TLS_adm0.shp' coords = 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() #----------------------------------------------------------------------------- # INITIALISE CLASS STATES
# Generate InShape class SHAPE = InShape(shape_path) # Create shapely polygon from imported shapefile UNIQUE_SHAPE = SHAPE.shape_poly() # set plotting limits for shapefile boundaries lonmin, latmin, lonmax, latmax = SHAPE.shape_bounds() print lonmin, latmin, lonmax, latmax #lonmin, lonmax, latmin, latmax = SHAPE.plot_lims() dataless_path = 'ALL_AUSTRALIA.870093.dataless' stat_locs = locs_from_dataless(dataless_path) #folder_path = '/storage/ANT/INPUT/DATA/AU-2014' folder_path = '/storage/ANT/INPUT/DATA/AU-2014' extension = 'mseed' paths_list = paths(folder_path, extension) t0_total = datetime.datetime.now() figs_counter = 0 pickle_file0 = '/storage/ANT/spectral_density/station_pds_maxima/\ AUSTRALIA 2014/noiseinfo_comb.pickle'
km_points = 20.0 # Reference elipsoid to calculate distance. wgs84 = pyproj.Geod(ellps='WGS84') # Enter number of bins for 2D Histogram density calculation. nbins = 220 # 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_path = 'east-timor/timor.dataless' dataless_path = '/storage/ANT/spectral_density/USARRAY/full_USARRAY.dataless' coords = locs_from_dataless(dataless_path) 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) #inner_shape = UNIQUE_SHAPE.buffer(-8,resolution=1) #outer_poly = INPOLY.poly_from_shape(shape=outer_shape)
# Generate InShape class SHAPE = InShape(shape_path) # Create shapely polygon from imported shapefile UNIQUE_SHAPE = SHAPE.shape_poly() # set plotting limits for shapefile boundaries lonmin, latmin, lonmax, latmax = SHAPE.shape_bounds() print lonmin, latmin, lonmax, latmax #lonmin, lonmax, latmin, latmax = SHAPE.plot_lims() dataless_path = 'ALL_AUSTRALIA.870093.dataless' stat_locs = locs_from_dataless(dataless_path) #folder_path = '/storage/ANT/INPUT/DATA/AU-2014' #folder_path = '/storage/ANT/INPUT/DATA/AU-2014/2014-01' folder_path = '/storage/ANT/INPUT/DATA/S-2014/2014-01' extension = 'mseed' paths_list = paths(folder_path, extension) t0_total = datetime.datetime.now() figs_counter = 0 #fig1 = plt.figure(figsize=(15,10))
CODE DESCRIPTION: The following python script is used to find the lon-lat locations of seismic stations from a given dataless SEED metadata file and then plot them. """ from mpl_toolkits.basemap import Basemap from info_dataless import locs_from_dataless import matplotlib.pyplot as plt import numpy as np dataless_path = '/home/boland/Dropbox/University/UniMelb/AGOS/METADATA/metadata/UOM.dataless' info = locs_from_dataless(dataless_path) lats = info[:,1].astype(np.float); lons = info[:,2].astype(np.float) print(lats); print(lons) minlatitude=np.min(lats) - 0.5 minlongitude =np.min(lons) - 0.5 maxlatitude=np.max(lats) + 0.5 maxlongitude=np.max(lons) + 0.5 plt.figure() plt.subplots_adjust(left=0.05,right=0.95,top=0.90,bottom=0.05,wspace=0.15,hspace=0.05) ax = plt.subplot(111)
CODE DESCRIPTION: The following python script is used to find the lon-lat locations of seismic stations from a given dataless SEED metadata file and then plot them. """ from mpl_toolkits.basemap import Basemap from info_dataless import locs_from_dataless import matplotlib.pyplot as plt import numpy as np dataless_path = '/home/boland/Dropbox/University/UniMelb/AGOS/METADATA/metadata/UOM.dataless' info = locs_from_dataless(dataless_path) lats = info[:, 1].astype(np.float) lons = info[:, 2].astype(np.float) print(lats) print(lons) minlatitude = np.min(lats) - 0.5 minlongitude = np.min(lons) - 0.5 maxlatitude = np.max(lats) + 0.5 maxlongitude = np.max(lons) + 0.5 plt.figure() plt.subplots_adjust(left=0.05,