Example #1
0
    plotnum = [False for i in range(15)]
    if len(sys.argv) < 2:
        print help
        exit()
    else:
        plotnum[int(sys.argv[1])] = True
    ####################################################

    ## Figure Properties #######
    width = 12
    height = 9
    legsize = width + 3
    ###########################
    ## Prep Data
    arg = Args()
    arg.addQuery("status", "eq", "processed-ok")
    # Load station params
    d = Params(stnfile, ["hk::H","hk::R"], arg)

    arg = Args()
    m = Params(moonfile, ["H","Vp"])
    m.filter(arg.addQuery("geoprov", "not in", "oceanic"))
    m.filter(arg.addQuery("geoprov", "not in", "Shelf"))

    #######################################################################
    # F0
    # CANADA
    if plotnum[0]:
    ## Kanamori Poisson Histogram
        # Set figure
        fig = plt.figure( figsize = (width, height) )
    plotnum = [False for i in range(15)]
    if len(sys.argv) < 2:
        print help
        exit()
    else:
        plotnum[int(sys.argv[1])] = True
    ####################################################

    ## Figure Properties #######
    width = 12
    height = 5
    legsize = height + 3
    ###########################
    ## Prep Data
    arg = Args()
    arg.addQuery("status", "eq", "processed-ok")
    # Load station params
    d = Params(stnfile, ["hk::H", "hk::R"], arg)

    arg = Args()
    m = Params(moonfile, ["H", "Vp"])
    m.filter(arg.addQuery("geoprov", "not in", "oceanic"))
    m.filter(arg.addQuery("geoprov", "not in", "Shelf"))

    #######################################################################
    # F0
    # CANADA
    if plotnum[0]:
        ## Kanamori Poisson Histogram
        # Set figure
        fig = plt.figure(figsize=(width, height))
Example #3
0
'''
if len(sys.argv) < 2:
    print help
else:
    plotnum[int(sys.argv[1])] = True


def poisson(R):
    ''' Function to go from Vp/Vs -> Poisson's ratio '''
    return  ( (R**2 - 2) / (2*(R**2 - 1)))

#######################################################################
# F0
if plotnum[0]:
    arg1 = Args()
    arg1.addQuery("hk::H", "lt", "45")
    arg2 = Args()
    arg2.addQuery("hk::H", "lt", "40")
    arg3 = Args()
    arg3.addQuery("hk::H", "lt", "35")
    arg4 = Args()

    fstns = os.environ['HOME'] + '/thesis/stations.json'

    a = Params(fstns, arg1, ["mb::H"])
    b = Params(fstns, arg2, ["mb::H"])
    c = Params(fstns, arg2, ["hk::H"])
    d = Params(fstns, arg3, ["hk::H"])
    e = Params(fstns, arg3, ["wm::H"])
    f = Params(fstns, arg4, ["wm::H"])
Example #4
0
if len(sys.argv) < 2:
    print help
else:
    plotnum[int(sys.argv[1])] = True


def poisson(R):
    ''' Function to go from Vp/Vs -> Poisson's ratio '''
    return ((R**2 - 2) / (2 * (R**2 - 1)))


#######################################################################
# F0
if plotnum[0]:
    arg1 = Args()
    arg1.addQuery("hk::H", "lt", "45")
    arg2 = Args()
    arg2.addQuery("hk::H", "lt", "40")
    arg3 = Args()
    arg3.addQuery("hk::H", "lt", "35")
    arg4 = Args()

    fstns = os.environ['HOME'] + '/thesis/stations.json'

    a = Params(fstns, arg1, ["mb::H"])
    b = Params(fstns, arg2, ["mb::H"])
    c = Params(fstns, arg2, ["hk::H"])
    d = Params(fstns, arg3, ["hk::H"])
    e = Params(fstns, arg3, ["wm::H"])
    f = Params(fstns, arg4, ["wm::H"])
    print "total stations examined:", len(d.stns)
    for jj in range(0,4):
        print msg[jj]
        ix = ixs[jj]
        for ii, stn in enumerate(d.stns[ix]):
            if details:
                print stn, d.hk_c0R[ix][ii], d.hk_c1R[ix][ii]
            else:
                pass
        print "number of stations:", len(d.stns[ix])


#details = False
#printinfo(msg, ixs, d, details)
arg = Args().stations( list(d.stns[ixs[2]]) )
arg.addQuery("status", "eq", "processed-notok")
d.filter(arg)
for stn in d.stns:
    print stn

d = Params(stnfile, ["hk::H","hk::R", "hk::stdR", "hk::c0R", "hk::c1R"])
d.filter(Args().addQuery("status", "in", "processed"))
arg = Args()
arg.stations(list(d.stns[ixs[0]]))
arg.addQuery("status", "eq", "processed-ok")
d.filter(arg)

#for station in d.stns:
#    print station
#print np.fabs(d.hk_c1R - d.hk_c0R)
Example #6
0
    print "total stations examined:", len(d.stns)
    for jj in range(0, 4):
        print msg[jj]
        ix = ixs[jj]
        for ii, stn in enumerate(d.stns[ix]):
            if details:
                print stn, d.hk_c0R[ix][ii], d.hk_c1R[ix][ii]
            else:
                pass
        print "number of stations:", len(d.stns[ix])


#details = False
#printinfo(msg, ixs, d, details)
arg = Args().stations(list(d.stns[ixs[2]]))
arg.addQuery("status", "eq", "processed-notok")
d.filter(arg)
for stn in d.stns:
    print stn

d = Params(stnfile, ["hk::H", "hk::R", "hk::stdR", "hk::c0R", "hk::c1R"])
d.filter(Args().addQuery("status", "in", "processed"))
arg = Args()
arg.stations(list(d.stns[ixs[0]]))
arg.addQuery("status", "eq", "processed-ok")
d.filter(arg)

#for station in d.stns:
#    print station
#print np.fabs(d.hk_c1R - d.hk_c0R)
Example #7
0
    plotnum = [False for i in range(15)]
    if len(sys.argv) < 2:
        print help
        exit()
    else:
        plotnum[int(sys.argv[1])] = True
    ####################################################

    ## Figure Properties #######
    width = 12
    height = 5
    legsize = height + 3
    ###########################
    ## Prep Data
    arg = Args()
    arg.addQuery("status", "eq", "processed-ok")
    # Load station params
    d = Params(stnfile, ["hk::H","hk::R"], arg)

    arg = Args()
    m = Params(moonfile, ["H","Vp"])
    m.filter(arg.addQuery("geoprov", "not in", "oceanic"))
    m.filter(arg.addQuery("geoprov", "not in", "Shelf"))

    #######################################################################
    # F0
    # CANADA
    if plotnum[0]:
    ## Kanamori Poisson Histogram
        # Set figure
        fig = plt.figure( figsize = (width, height) )