sys.path.append('/Users/dmelgar/code/python/neic_tools')
from neic_tools import neic_catalog
from matplotlib import pyplot as plt
import matplotlib as mpl
from numpy import where, logspace, cov, array, argsort, log, histogram, log10, median, arange

path_to_files = '/Users/dmelgar/Downloads/PARAM_FILES/'
catalog_file = '/Users/dmelgar/USGSFF/catalog.txt'
mpl.rcParams['xtick.labelsize'] = 14
mpl.rcParams['ytick.labelsize'] = 14
run_regression = True
Nbins = 500

#Get the catalog
neic = neic_catalog(path_to_files,
                    catalog_file,
                    percent_cutoff=0.2,
                    get_stfs=True)

#Run regression
if run_regression:
    A, k, mcmc = neic.run_regression(inversion_type='bayesian',
                                     prior='uninformative',
                                     Niter=1000e3,
                                     burn=100e3,
                                     fix_exponent=False,
                                     dependent_variable='slip')
    print '\n'
    print A
    print k
else:
    A = 9.05037048766e-06
Beispiel #2
0
from neic_tools import neic_catalog
from matplotlib import pyplot as plt
import matplotlib as mpl
from numpy import where, logspace, cov, array, argsort, log, histogram, log10, median, arange

path_to_files = '/Users/dmelgar/USGSFF/finite_faults/param/'
catalog_file = '/Users/dmelgar/USGSFF/catalog.txt'
mpl.rcParams['xtick.labelsize'] = 14
mpl.rcParams['ytick.labelsize'] = 14
run_regression = True
Nbins = 500

#Get the catalog
neic = neic_catalog(path_to_files,
                    catalog_file,
                    percent_cutoff=0.2,
                    percent_cutoff_vrup=0.3,
                    duration_cutoff=0.9)

#Run regression
if run_regression:
    A, k, mcmc = neic.run_regression(inversion_type='bayesian',
                                     prior='uninformative',
                                     Niter=1000e3,
                                     burn=100e3,
                                     fix_exponent=False)
    print '\n'
    print A
    print k
else:
    A = 9.05037048766e-06
import sys
sys.path.append('/Users/dmelgar/code/python/neic_tools')
from neic_tools import neic_catalog
from matplotlib import pyplot as plt
import matplotlib as mpl
from numpy import where, logspace, cov, array, argsort, log, histogram, log10, median, arange

path_to_files = '/Users/dmelgar/Downloads/PARAM_FILES/'
catalog_file = '/Users/dmelgar/USGSFF/catalog.txt'
mpl.rcParams['xtick.labelsize'] = 14
mpl.rcParams['ytick.labelsize'] = 14
run_regression = True
Nbins = 500

#Get the catalog
neic = neic_catalog(path_to_files, catalog_file, percent_cutoff=0.2)

#Run regression
if run_regression:
    Ai, ki, mcmci = neic.run_regression(inversion_type='bayesian',
                                        prior='uninformative',
                                        Niter=100e3,
                                        burn=20e3,
                                        fix_exponent=False,
                                        select_event_type='i',
                                        dependent_variable='slip')
    Au, ku, mcmcu = neic.run_regression(inversion_type='bayesian',
                                        prior='uninformative',
                                        Niter=100e3,
                                        burn=20e3,
                                        fix_exponent=False,
import cPickle as pickle

path_to_files = '/Users/dmelgar/USGSFF/param/'
catalog_file = '/Users/dmelgar/USGSFF/catalog.txt'
mpl.rcParams['xtick.labelsize'] = 14
mpl.rcParams['ytick.labelsize'] = 14
run_regression = True
Nbins = 500

#Get the catalog

#Run regression
Niter = 100e3
neic = neic_catalog(path_to_files,
                    catalog_file,
                    percent_cutoff=0.2,
                    get_stfs=True,
                    percent_cutoff_vrup=0.3,
                    median=False)
Atr, ktr, mcmctr = neic.run_regression(inversion_type='bayesian',
                                       prior='uninformative',
                                       Niter=Niter,
                                       burn=50e3,
                                       fix_exponent=False,
                                       dependent_variable='rise_time')

neic_med = neic_catalog(path_to_files,
                        catalog_file,
                        percent_cutoff=0.2,
                        get_stfs=True,
                        percent_cutoff_vrup=0.3,
                        median=True)