Beispiel #1
0
# 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)

# 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
Beispiel #2
0
#plot_magnitude_time_scatter(catalogue, fmt_string='o', alpha=0.3, linewidth=0.0)

# Depth histogram
# plot_depth_histogram(catalogue, 10.)

filename = "/Users/pirchiner/Desktop/tmp_plot.png"

# Time-varying completeness
completeness = np.array([[1980., 3.0], [1985., 4.0], [1964., 5.0],
                         [1910., 6.5], [1900., 9.0]])
plot_observed_recurrence(
    catalogue,
    completeness,
    0.2,
    catalogue.end_year,
    title="Recurrence [#Eq / Time]",
    overlay=False,
    markersize=10,
    color=['#FEF2D8', '#F18C79'],
    #linewidth=3,
    alpha=0.6,
)

plt.show()

exit()

input_catalogue_file = 'data_input/hmtk_sa3'
#input_catalogue_file = 'data_input/hmtk_bsb2013'

###
###    Catalogue cache or read/cache
Beispiel #3
0
                                                      get_completeness_adjusted_table,
                                                      _get_catalogue_bin_limits)
magnitude_bin = 0.2
end_year = 2014

# earthquake_count = get_completeness_adjusted_table(catalogue, 
#                                                    completeness_table, 
#                                                    magnitude_bin, 
#                                                    catalogue.end_year)
#print 'Magnitude  N(OBS)     N(CUM)   Log10(Nc)'
#for row in earthquake_count:
#    print '%6.2f %10.3f %10.3f %10.3f' %(row[0], row[1], row[2], row[3]) 



plot_observed_recurrence(catalogue, completeness_table, magnitude_bin, catalogue.end_year)

# In[ ]:

# Set up the configuration parameters
recurrence_config = {'reference_magnitude': 0.0,
                     'magnitude_interval': 0.2,
                     'Average Type': 'Weighted'}

bml_recurrence = BMaxLikelihood()

bval, sigmab, seismicity_rate, sigma_rate = bml_recurrence.calculate(catalogue, 
                                                          recurrence_config, 
                                                          completeness_table)

print 'B-value = %9.4f +/- %9.4f' %(bval, sigmab)
Beispiel #4
0
from hmtk.plotting.seismicity.catalogue_plots import (
    plot_observed_recurrence, get_completeness_adjusted_table,
    _get_catalogue_bin_limits)

magnitude_bin = 0.2
end_year = 2014

# earthquake_count = get_completeness_adjusted_table(catalogue,
#                                                    completeness_table,
#                                                    magnitude_bin,
#                                                    catalogue.end_year)
#print 'Magnitude  N(OBS)     N(CUM)   Log10(Nc)'
#for row in earthquake_count:
#    print '%6.2f %10.3f %10.3f %10.3f' %(row[0], row[1], row[2], row[3])

plot_observed_recurrence(catalogue, completeness_table, magnitude_bin,
                         catalogue.end_year)

# In[ ]:

# Set up the configuration parameters
recurrence_config = {
    'reference_magnitude': 0.0,
    'magnitude_interval': 0.2,
    'Average Type': 'Weighted'
}

bml_recurrence = BMaxLikelihood()

bval, sigmab, seismicity_rate, sigma_rate = bml_recurrence.calculate(
    catalogue, recurrence_config, completeness_table)
Beispiel #5
0
# plot_magnitude_time_scatter(catalogue, fmt_string='o', alpha=0.3, linewidth=0.0)


# Depth histogram
# plot_depth_histogram(catalogue, 10.)

filename = "/Users/pirchiner/Desktop/tmp_plot.png"

# Time-varying completeness
completeness = np.array([[1980.0, 3.0], [1985.0, 4.0], [1964.0, 5.0], [1910.0, 6.5], [1900.0, 9.0]])
plot_observed_recurrence(
    catalogue,
    completeness,
    0.2,
    catalogue.end_year,
    title="Recurrence [#Eq / Time]",
    overlay=False,
    markersize=10,
    color=["#FEF2D8", "#F18C79"],
    # linewidth=3,
    alpha=0.6,
)

plt.show()

exit()


input_catalogue_file = "data_input/hmtk_sa3"
# input_catalogue_file = 'data_input/hmtk_bsb2013'

###
Beispiel #6
0

# 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)


# In[ ]:

# Set-up the file writer
output_file_name = 'data_output/basic_demo_catalogue_1.csv'
writer = CsvCatalogueWriter(output_file_name)