# In[ ]: # Show distribution of magnitudes with time plot_magnitude_time_scatter(catalogue, fmt_string='.') # In[ ]: # Plot the magnitude-time density magnitude_bin = 0.2 time_bin = 5.0 # in Decimal Years plot_magnitude_time_density(catalogue, magnitude_bin, time_bin) # In[ ]: # Depth histogram plot_depth_histogram(catalogue, 10.) # In[ ]: # Time-varying completeness completeness = np.array([[1980., 3.0], [1985., 4.0], [1964., 5.0], [1910., 6.5]]) plot_observed_recurrence(catalogue, completeness, 0.2, catalogue.end_year) # In[ ]: # Limit the catalogue to depths less than 50 km valid_depth = catalogue.data['depth'] <= 50. catalogue.select_catalogue_events(valid_depth) plot_depth_histogram(catalogue, 2.0)
valid_months = catalogue.data['day'] != 0 catalogue.select_catalogue_events(valid_months) valid_years = catalogue.data['year'] >= 1900 catalogue.select_catalogue_events(valid_years) if plot_quality: # quality control # seismic_rate plot plot_rate(catalogue, color='#5fbdce', filename=output_base+"_rate.png", linewidth=2) # seismic_cumulative rate plot plot_rate(catalogue, cumulative=True, color='#5fbdce', filename=output_base+"_cum.png", linewidth=2) # depth histogram plot_depth_histogram(catalogue, 30, normalisation=True, filename=output_base+"_depth.png", color='#5fbdce', alpha=0.6) # day_of_week plot plot_weekday_histogram(catalogue, color='#5fbdce', alpha=0.6, filename=output_base+"_weekday.png") # hour_of_day plot plot_hour_histogram(catalogue, color='#5fbdce', alpha=0.6, filename=output_base+"_hour.png") # seismic_rate plot # cumulative number of eq if not declustered: # decluster catalog # plot decluster # save decluster catalog config = { 'decluster_method': 'gardner_knopoff', # afteran | gardner_knopoff
plt.show() exit() plt.show() exit() # In[ ]: # Limit the catalogue to depths less than 50 km # valid_depth = catalogue.data['depth'] <= 50. # catalogue.select_catalogue_events(valid_depth) plot_depth_histogram(catalogue, 2.0) exit() # In[ ]: # Set-up the file writer output_file_name = "data_output/basic_demo_catalogue_1.csv" writer = CsvCatalogueWriter(output_file_name) # Write the catalogue to file writer.write_file(catalogue) print "File %s written" % output_file_name # In[ ]: