Example #1
0
class PipelineTest(unittest.TestCase):        
    
    def assertModelEquals(self, actual, expected):
        # np.testing.assert_array_equal() will accept floats, ints etc.
        np.testing.assert_array_almost_equal(actual.vs, expected.vs)
        np.testing.assert_array_almost_equal(actual.all_deps, expected.all_deps)
        np.testing.assert_array_almost(actual.idep, expected.idep) # integers
        self.assertAlmostEqual(actual.std_rf, expected.std_rf)
        self.assertAlmostEqual(actual.lam_rf, expected.lam_rf)
        self.assertAlmostEqual(actual.std_swd, expected.std_swd)
    
        
    
    
    #  Test initial model 
    deps = np.append(np.arange(0,60,1), np.arange(60,201,5))
    normdist =  np.random.normal(0,0.5,1000) # Gaussian distribution, std = 0.5
    
    @parameterized.expand([
        ("Seed == 1", normdist, 1,
             pipeline.Model(vs = np.array(1.17), all_deps = deps, idep = np.array(8), 
                            std_rf = 0.5, lam_rf = 0.2, std_swd = 0.15)),       
        ("Seed == 10", normdist, 10, 
             pipeline.Model(vs = 3.36, all_deps = deps, idep = 54, 
                            std_rf = 0.5, lam_rf = 0.2, std_swd = 0.15)),
    ])
       
    def test_InitialModel(self, name, normdist, random_seed, expected):
        model= pipeline.InitialModel(normdist,random_seed)
        self.assertModelEquals(model, expected)
        
    del deps, normdist
    
    # Test checking prior
    deps = np.append(np.arange(0,60,1), np.arange(60,201,5))
    lims = pipeline.Limits(
            vs = (0.5,5), dep = (0,200), std_rf = (0.005,0.5), 
            lam_rf = (0.05,0.5), std_swd = (0.01,0.2),
            )  
    model = pipeline.Model(
            vs = np.array([1.4,4,5]), all_deps = deps, idep = np.array([0,42,64]), 
            std_rf = 0.15, lam_rf = 0.2, std_swd = 0.15,
            )
    
    @parameterized.expand([
            ("Should work", lims, model, True),
            ("Vs too small", lims, model._replace(vs = np.array([0.4,1.4,4])), False),
            ("Vs too big", lims, model._replace(vs = np.array([0.5,1.4,5.6])), False),
            ("Vs lims", lims._replace(vs = (1.5,5)), model, False), 
            ("Dep ind wrong", lims, model._replace(idep = np.array([-1,42,89])), False),
            ("Dep lims", lims._replace(dep = (50, 100)), model, False),
            ("Std_rf", lims, model._replace(std_rf = 0.51),False),
            ("Std_swd", lims._replace(std_swd = (0,0.1)), model, False),
            ("Lam_rf", lims, model._replace(lam_rf = 1), False),
            ])
    
    def test_CheckPrior(self,name,lims,model,expected):
        self.assertEqual(expected,pipeline.CheckPrior(model,lims))
    
    del deps, lims, model
Example #2
0
def LoadObservations():

    rf_obs = pipeline.RecvFunc(amp=np.array([
        0.056, 0.059, 0.056, 0.040, 0.042, 0.014, -0.003, -0.002, 0.010, 0.010,
        0.009, 0.016, 0.025, 0.018, -0.003, -0.003, 0.025, 0.091, 0.129, 0.091,
        0.017, -0.011, -0.006, 0.014, 0.034, 0.009, -0.030, -0.027, -0.021,
        -0.001, -0.004, -0.009, -0.016, -0.019, -0.014, 0.000, 0.014, 0.009,
        -0.001, 0.001, 0.009, -0.000, -0.014, -0.016, -0.014, -0.002, -0.002,
        -0.003, -0.002, -0.006, -0.011, -0.005, -0.009, -0.007, 0.002, -0.001,
        -0.013, 0.003, 0.027, 0.047, 0.026, -0.006, -0.036, -0.024, -0.013,
        0.003, 0.009, -0.005, -0.015, -0.011, -0.006, -0.005, -0.010, -0.018,
        -0.035, -0.023, -0.015, -0.019, -0.015, -0.012, -0.027, -0.045, -0.021,
        0.006, 0.023, 0.011, 0.013, -0.009, -0.036, -0.023, -0.020, -0.024,
        -0.022, -0.007, -0.004, 0.016, 0.034, 0.019, -0.019, -0.043, -0.031,
        -0.014, 0.005, 0.002, 0.010, 0.004, -0.005, -0.001, 0.000, -0.007,
        -0.013, -0.000, -0.008, -0.018, -0.014, -0.019, -0.006, 0.009, 0.010,
        -0.001
    ]),
                               dt=0.250,
                               ray_param=0.06147,
                               std_sc=5,
                               rf_phase='Ps',
                               filter_corners=[1, 100])

    swd_obs = pipeline.SurfaceWaveDisp(period=np.array([
        9.000, 10.120, 11.570, 13.500, 16.200, 20.250, 25.000, 32.000, 40.000,
        50.000, 60.000, 80.000
    ]),
                                       c=np.array([
                                           3.2200, 3.2860, 3.3290, 3.3880,
                                           3.4830, 3.5980, 3.8230, 3.9690,
                                           4.0330, 4.0410, 4.1230, 4.1100
                                       ]))

    all_lims = pipeline.Limits(vs=(0.5, 5.0),
                               dep=(0, 200),
                               std_rf=(0, 0.05),
                               lam_rf=(0.05, 0.5),
                               std_swd=(0, 0.05),
                               crustal_thick=(25, ))

    return (rf_obs, swd_obs, all_lims)
Example #3
0
def LoadObservations():

    rf_obs = pipeline.RecvFunc(amp=np.array([
        0.032, 0.191, 0.169, 0.002, -0.127, -0.130, -0.079, -0.019, 0.031,
        0.081, 0.058, 0.031, 0.023, -0.018, -0.045, -0.062, -0.052, -0.021,
        0.018, 0.054, 0.080, 0.104, 0.112, 0.078, 0.030, -0.014, -0.047,
        -0.096, -0.102, -0.038, -0.021, -0.048, -0.088, -0.092, -0.067, -0.082,
        -0.087, -0.063, -0.007, 0.009, 0.012, -0.023, -0.040, -0.047, -0.037,
        -0.021, -0.022, -0.007, -0.009, -0.005, -0.011, -0.016, -0.008, -0.040,
        -0.063, -0.039, -0.007, -0.016, -0.025, -0.025, -0.001, 0.019, 0.021,
        0.018, 0.004, -0.017, -0.038, -0.021, -0.004, -0.016, -0.034, -0.039,
        -0.007, 0.021, 0.015, 0.007, -0.008, -0.019, -0.010, -0.001, -0.033,
        -0.051, -0.055, -0.041, -0.042, -0.031, -0.020, -0.022, -0.041, -0.019,
        0.027, 0.041, -0.008, -0.024, 0.017, 0.049, 0.047, 0.044, 0.018,
        -0.005, 0.005, 0.007, 0.037, 0.021, -0.011, -0.022, 0.006, -0.005,
        -0.049, -0.026, 0.008, 0.043, 0.042, 0.025, 0.027, 0.033, 0.014,
        -0.022, -0.018, -0.020
    ]),
                               dt=0.250,
                               ray_param=0.06147,
                               std_sc=5,
                               rf_phase='Ps',
                               filter_corners=[1, 100])

    swd_obs = pipeline.SurfaceWaveDisp(period=np.array([
        9.000, 10.120, 11.570, 13.500, 16.200, 20.250, 25.000, 32.000, 40.000,
        50.000, 60.000, 80.000
    ]),
                                       c=np.array([
                                           3.1610, 3.2070, 3.2330, 3.2870,
                                           3.3240, 3.4030, 3.5500, 3.6770,
                                           3.7750, 3.8300, 3.8660, 3.9650
                                       ]))

    all_lims = pipeline.Limits(vs=(0.5, 5.0),
                               dep=(0, 200),
                               std_rf=(0, 0.05),
                               lam_rf=(0.05, 0.5),
                               std_swd=(0, 0.15),
                               crustal_thick=(25, ))

    return (rf_obs, swd_obs, all_lims)
Example #4
0
def LoadObservations():

    rf_obs = pipeline.RecvFunc(amp=np.array([
        0.027, 0.031, 0.025, 0.021, 0.026, 0.037, 0.040, 0.035, 0.025, 0.010,
        -0.005, -0.016, -0.030, -0.044, -0.053, -0.057, -0.057, -0.056, -0.056,
        -0.064, -0.073, -0.066, -0.054, -0.045, -0.040, -0.036, -0.029, -0.018,
        -0.009, -0.006, -0.005, -0.003, 0.003, 0.014, 0.025, 0.027, 0.025,
        0.029, 0.035, 0.041, 0.042, 0.036, 0.027, 0.020, 0.020, 0.019, 0.014,
        0.011, 0.016, 0.027, 0.035, 0.036, 0.035, 0.035, 0.036, 0.038, 0.040,
        0.035, 0.024, 0.014, 0.012, 0.010, 0.007, 0.004, 0.002, 0.002, 0.003,
        0.005, 0.003, 0.001, -0.001, -0.001, 0.004, 0.009, 0.011, 0.010, 0.009,
        0.008, 0.007, 0.005, 0.004, 0.001, -0.007, -0.014, -0.014, -0.013,
        -0.012, -0.011, -0.010, -0.005, 0.001, 0.000, -0.003, -0.003, -0.001,
        0.001, 0.004, 0.006, 0.005, 0.002, 0.003, 0.006, 0.009, 0.011, 0.012,
        0.013, 0.013, 0.009, 0.003, -0.002, -0.003, -0.003, -0.006, -0.010,
        -0.012, -0.014, -0.015, -0.014, -0.014, -0.015
    ]),
                               dt=0.250,
                               ray_param=0.11012,
                               std_sc=5,
                               rf_phase='Sp',
                               filter_corners=[1, 100])

    swd_obs = pipeline.SurfaceWaveDisp(period=np.array([
        9.000, 10.120, 11.570, 13.500, 16.200, 20.250, 25.000, 32.000, 40.000,
        50.000, 60.000, 80.000
    ]),
                                       c=np.array([
                                           3.2120, 3.2150, 3.2330, 3.2880,
                                           3.3390, 3.3880, 3.5140, 3.6470,
                                           3.7150, 3.7980, 3.8470, 3.9370
                                       ]))

    all_lims = pipeline.Limits(vs=(0.5, 5.),
                               dep=(0, 200),
                               std_rf=(0, 0.05),
                               lam_rf=(0.05, 0.5),
                               std_swd=(0, 0.15),
                               crustal_thick=(25, 60))

    return (rf_obs, swd_obs, all_lims)
Example #5
0
def LoadObservations():

    rf_obs = pipeline.RecvFunc(amp=np.array([
        0.056, 0.036, 0.005, -0.024, -0.044, -0.034, -0.017, -0.008, 0.007,
        0.026, 0.034, 0.017, 0.005, 0.009, 0.015, 0.016, -0.004, -0.034,
        -0.053, -0.060, -0.076, -0.105, -0.114, -0.111, -0.105, -0.095, -0.075,
        -0.052, -0.037, -0.028, -0.007, -0.001, -0.012, -0.018, -0.023, -0.024,
        -0.014, -0.002, 0.008, 0.016, 0.017, 0.013, 0.022, 0.030, 0.021, 0.009,
        0.010, 0.017, 0.024, 0.026, 0.018, 0.005, 0.013, 0.037, 0.051, 0.052,
        0.042, 0.030, 0.018, 0.008, -0.010, -0.003, 0.012, 0.018, 0.023, 0.036,
        0.048, 0.051, 0.053, 0.048, 0.043, 0.048, 0.045, 0.034, 0.026, 0.019,
        0.006, 0.004, 0.008, 0.012, 0.017, 0.022, 0.025, 0.027, 0.027, 0.024,
        0.018, 0.006, -0.015, -0.031, -0.035, -0.035, -0.029, -0.010, 0.010,
        0.012, 0.008, 0.005, 0.009, 0.010, 0.006, 0.005, 0.011, 0.006, 0.002,
        -0.004, -0.011, -0.019, -0.027, -0.031, -0.034, -0.033, -0.029, -0.022,
        -0.016, -0.012, 0.003, 0.015, 0.018, 0.021
    ]),
                               dt=0.250,
                               ray_param=0.11012,
                               std_sc=5,
                               rf_phase='Sp',
                               filter_corners=[4, 100])

    swd_obs = pipeline.SurfaceWaveDisp(period=np.array([
        9.000, 10.120, 11.570, 13.500, 16.200, 20.250, 25.000, 32.000, 40.000,
        50.000, 60.000, 80.000
    ]),
                                       c=np.array([
                                           3.1610, 3.2070, 3.2330, 3.2870,
                                           3.3240, 3.4030, 3.5500, 3.6770,
                                           3.7750, 3.8300, 3.8660, 3.9650
                                       ]))

    all_lims = pipeline.Limits(vs=(0.5, 5.0),
                               dep=(0, 200),
                               std_rf=(0, 0.05),
                               lam_rf=(0.05, 0.5),
                               std_swd=(0, 0.15))

    return (rf_obs, swd_obs, all_lims)
Example #6
0
    -0.013, -0.002, 0.016, 0.022
]),
                           dt=0.25,
                           ray_param=0.06147)

swd_obs = pipeline.SurfaceWaveDisp(period=np.array(
    [9.0, 10.1, 11.6, 13.5, 16.2, 20.3, 25.0, 32.0, 40.0, 50.0, 60.0, 80.0]),
                                   c=np.array([
                                       3.212, 3.215, 3.233, 3.288, 3.339,
                                       3.388, 3.514, 3.647, 3.715, 3.798,
                                       3.847, 3.937
                                   ]))

all_lims = pipeline.Limits(vs=(0.5, 5.5),
                           dep=(0, 200),
                           std_rf=(0, 0.05),
                           lam_rf=(0.05, 0.5),
                           std_swd=(0, 0.15))

out = pipeline.JointInversion(rf_obs, swd_obs, all_lims, max_it, rnd_sd)

#actual_model = pipeline.SaveModel(pipeline.MakeFullModel(model),out[1][:,0])
#%%
all_models = np.load('testsave.npy')

good_mods = all_models[:, np.where(all_models[0, ] > 0)[0]]
nit = good_mods.shape[1]
good_mods = good_mods[:, -int(nit / 5):]
mean_mod = np.mean(good_mods, axis=1)
std_mod = np.std(good_mods, axis=1)
Example #7
0
def LoadObservations():

    swd_obs = pipeline.SurfaceWaveDisp(
        period=np.array([
            9.0,
            10.12,
            11.57,
            13.5,
            16.2,
            20.25,
            25.0,
            32.0,
            40.0,
            50.0,
            60.0,
            80.0,
        ]),
        c=np.array([
            3.905,
            3.932,
            3.962,
            4.012,
            4.07,
            4.135,
            4.177,
            4.206,
            4.211,
            4.215,
            4.214,
            4.211,
        ]),
        std=np.array([
            0.01,
            0.01,
            0.01,
            0.01,
            0.01,
            0.01,
            0.01,
            0.01,
            0.01,
            0.01,
            0.01,
            0.01,
        ]),
    )
    all_lims = pipeline.Limits(vs=(0.5, 5.0),
                               dep=(0, 200),
                               std_rf_sc=(1, 2),
                               lam_rf=(0.05, 0.5),
                               std_swd_sc=(1, 2),
                               crustal_thick=(25, ))
    rf_obs = [
        pipeline.RecvFunc(amp=np.array([
            -0.023,
            -0.055,
            -0.078,
            -0.088,
            -0.085,
            -0.074,
            -0.059,
            -0.046,
            -0.037,
            -0.034,
            -0.036,
            -0.044,
            -0.055,
            -0.068,
            -0.078,
            -0.082,
            -0.077,
            -0.066,
            -0.053,
            -0.039,
            -0.026,
            -0.017,
            -0.01,
            -0.006,
            -0.003,
            -0.002,
            -0.002,
            -0.002,
            -0.003,
            -0.003,
            -0.002,
            -0.001,
            0.0,
            0.002,
            0.004,
            0.006,
            0.009,
            0.011,
            0.014,
            0.018,
            0.022,
            0.025,
            0.027,
            0.027,
            0.025,
            0.022,
            0.019,
            0.016,
            0.013,
            0.01,
            0.008,
            0.007,
            0.006,
            0.005,
            0.005,
            0.005,
            0.005,
            0.006,
            0.006,
            0.006,
            0.006,
            0.005,
            0.005,
            0.005,
            0.004,
            0.004,
            0.004,
            0.004,
            0.003,
            0.003,
            0.003,
            0.002,
            0.002,
            0.001,
            0.001,
            0.001,
            0.001,
            0.0,
            0.0,
            0.0,
            0.0,
            0.0,
            0.0,
            -0.0,
            -0.0,
            -0.0,
            -0.0,
            -0.0,
            -0.0,
            -0.001,
            -0.001,
            -0.001,
            -0.001,
            -0.001,
            -0.001,
            -0.001,
            -0.001,
            -0.001,
            -0.001,
            -0.001,
            -0.001,
            -0.001,
            -0.001,
            -0.001,
            -0.0,
            -0.0,
            -0.0,
            -0.0,
            -0.0,
            -0.0,
            -0.0,
            -0.0,
            -0.0,
            -0.0,
            -0.0,
            -0.0,
            -0.0,
            -0.0,
            -0.0,
            -0.0,
        ]),
                          std=np.array([
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                              0.02,
                          ]),
                          dt=0.25,
                          ray_param=0.11012,
                          std_sc=5,
                          rf_phase='Sp',
                          filter_corners=[4, 100],
                          weight_by='even'),
    ]

    vs_in = np.array([
        [0.0, 3.7],
        [0.2, 3.7],
        [0.4, 3.7],
        [0.6, 3.7],
        [0.8, 3.7],
        [1.0, 3.7],
        [1.2, 3.7],
        [1.4, 3.7],
        [1.6, 3.7],
        [1.8, 3.7],
        [2.0, 3.7],
        [2.2, 3.7],
        [2.4, 3.7],
        [2.6, 3.7],
        [2.8, 3.7],
        [3.0, 3.7],
        [3.2, 3.7],
        [3.4, 3.7],
        [3.6, 3.7],
        [3.8, 3.7],
        [4.0, 4.3],
        [4.2, 4.3],
        [4.4, 4.3],
        [4.6, 4.3],
        [4.8, 4.3],
        [5.0, 4.3],
        [5.2, 4.3],
        [5.4, 4.3],
        [5.6, 4.3],
        [5.8, 4.3],
        [6.0, 4.3],
        [6.2, 4.3],
        [6.4, 4.3],
        [6.6, 4.3],
        [6.8, 4.3],
        [7.0, 4.3],
        [7.2, 4.3],
        [7.4, 4.3],
        [7.6, 4.3],
        [7.8, 4.3],
        [8.0, 4.3],
        [8.2, 4.3],
        [8.4, 4.3],
        [8.6, 4.3],
        [8.8, 4.3],
        [9.0, 4.3],
        [9.2, 4.3],
        [9.4, 4.3],
        [9.6, 4.3],
        [9.8, 4.3],
        [10.0, 4.3],
        [11.0, 4.3],
        [12.0, 4.3],
        [13.0, 4.3],
        [14.0, 4.3],
        [15.0, 4.3],
        [16.0, 4.3],
        [17.0, 4.3],
        [18.0, 4.3],
        [19.0, 4.3],
        [20.0, 4.3],
        [21.0, 4.3],
        [22.0, 4.3],
        [23.0, 4.3],
        [24.0, 4.3],
        [25.0, 4.3],
        [26.0, 4.3],
        [27.0, 4.3],
        [28.0, 4.7],
        [29.0, 4.7],
        [30.0, 4.7],
        [31.0, 4.7],
        [32.0, 4.7],
        [33.0, 4.7],
        [34.0, 4.7],
        [35.0, 4.7],
        [36.0, 4.7],
        [37.0, 4.7],
        [38.0, 4.7],
        [39.0, 4.7],
        [40.0, 4.7],
        [41.0, 4.7],
        [42.0, 4.7],
        [43.0, 4.7],
        [44.0, 4.7],
        [45.0, 4.7],
        [46.0, 4.7],
        [47.0, 4.7],
        [48.0, 4.7],
        [49.0, 4.7],
        [50.0, 4.7],
        [51.0, 4.7],
        [52.0, 4.7],
        [53.0, 4.7],
        [54.0, 4.7],
        [55.0, 4.7],
        [56.0, 4.7],
        [57.0, 4.7],
        [58.0, 4.7],
        [59.0, 4.7],
        [60.0, 4.7],
        [65.0, 4.7],
        [70.0, 4.7],
        [75.0, 4.7],
        [80.0, 4.6],
        [85.0, 4.6],
        [90.0, 4.6],
        [95.0, 4.6],
        [100.0, 4.6],
        [105.0, 4.6],
        [110.0, 4.6],
        [115.0, 4.6],
        [120.0, 4.6],
        [125.0, 4.6],
        [130.0, 4.6],
        [135.0, 4.6],
        [140.0, 4.6],
        [145.0, 4.6],
        [150.0, 4.6],
        [155.0, 4.6],
        [160.0, 4.6],
        [165.0, 4.6],
        [170.0, 4.6],
        [175.0, 4.6],
        [180.0, 4.6],
        [185.0, 4.6],
        [190.0, 4.6],
        [195.0, 4.6],
        [200.0, 4.6],
    ])

    return (rf_obs, swd_obs, all_lims, vs_in)
Example #8
0
def LoadObservations():

	swd_obs = pipeline.SurfaceWaveDisp(
		period = np.array([9.0, 
			10.12, 11.57, 13.5, 16.2, 20.25, 25.0, 
			32.0, 40.0, 50.0, 60.0, 80.0, 
			]),

		c = np.array([3.212, 3.215, 3.233, 3.288, 3.339, 3.388, 
                       3.514, 3.647, 3.715, 3.798, 3.847, 3.937, 
			]),
		)
	all_lims = pipeline.Limits(
			vs = (0.5, 5.0),dep = (0,200), std_rf = (0.01, 0.05), 
			lam_rf = (0.05, 0.5),std_swd = (0.01, 0.05), 
			crustal_thick = (25,)
			)
	rf_obs = [
		pipeline.RecvFunc(
		amp = np.array([0.073, 0.125, 0.102, 0.022,
                       -0.027, -0.015, 0.013, 0.011, -0.004, 0.004, 0.032, 0.037,
                       0.003, -0.037, -0.048, -0.020, 0.033, 0.080, 0.089, 0.056,
                       0.012, -0.016, -0.014, 0.003, 0.013, 0.006, -0.003, -0.003,
                       -0.000, -0.001, -0.004, -0.001, 0.007, 0.009, -0.003, -0.021,
                       -0.031, -0.027, -0.014, -0.001, 0.010, 0.018, 0.014, -0.002,
                       -0.017, -0.023, -0.024, -0.021, -0.011, -0.000, 0.004, 0.002,
                       0.004, 0.012, 0.015, 0.006, -0.004, -0.000, 0.012, 0.018,
                       0.011, -0.004, -0.011, -0.007, 0.002, 0.004, 0.001, -0.001,
                       -0.002, -0.002, -0.003, -0.003, -0.003, -0.005, -0.009, -0.014,
                       -0.017, -0.016, -0.020, -0.029, -0.032, -0.022, -0.004, 0.007,
                       0.006, -0.001, -0.005, -0.007, -0.010, -0.015, -0.012, 0.001,
                       0.014, 0.016, 0.008, -0.002, -0.011, -0.019, -0.017, -0.006,
                       0.006, 0.012, 0.013, 0.013, 0.006, -0.014, -0.033, -0.024,
                       0.009, 0.030, 0.018, -0.005, -0.011, -0.000, 0.003, -0.008,
                       -0.013, -0.002, 0.016, 0.022, 
			]), 

			dt = 0.25, ray_param = 0.06147,std_sc = 5,
			rf_phase = 'Ps', filter_corners =  [1, 100], weight_by = 4, 
		),
		pipeline.RecvFunc(
		amp = np.array([0.027, 0.031, 0.025,
                       0.021, 0.026, 0.037, 0.040, 0.035, 0.025,
                       0.010, -0.005, -0.016, -0.030, -0.044, -0.053,
                       -0.057, -0.057, -0.056, -0.056, -0.064, -0.073,
                       -0.066, -0.054, -0.045, -0.040, -0.036, -0.029,
                       -0.018, -0.009, -0.006, -0.005, -0.003, 0.003,
                       0.014, 0.025, 0.027, 0.025, 0.029, 0.035,
                       0.041, 0.042, 0.036, 0.027, 0.020, 0.020,
                       0.019, 0.014, 0.011, 0.016, 0.027, 0.035,
                       0.036, 0.035, 0.035, 0.036, 0.038, 0.040,
                       0.035, 0.024, 0.014, 0.012, 0.010, 0.007,
                       0.004, 0.002, 0.002, 0.003, 0.005, 0.003,
                       0.001, -0.001, -0.001, 0.004, 0.009, 0.011,
                       0.010, 0.009, 0.008, 0.007, 0.005, 0.004,
                       0.001, -0.007, -0.014, -0.014, -0.013, -0.012,
                       -0.011, -0.010, -0.005, 0.001, 0.000, -0.003,
                       -0.003, -0.001, 0.001, 0.004, 0.006, 0.005,
                       0.002, 0.003, 0.006, 0.009, 0.011, 0.012,
                       0.013, 0.013, 0.009, 0.003, -0.002, -0.003,
                       -0.003, -0.006, -0.010, -0.012, -0.014, -0.015,
                       -0.014, -0.014, -0.015, 
			]), 

			dt = 0.25, ray_param = 0.11012,std_sc = 5,
			rf_phase = 'Sp', filter_corners =  [4, 100], weight_by = 4,
		),]

	vs_in = 'unknown'

	return (rf_obs, swd_obs, all_lims, vs_in)
Example #9
0
def LoadObservations():

    #   -10.7° S, 34.5° E

    rf_obs = [
        pipeline.RecvFunc(amp=np.array([
            0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,
            -0.103, -0.036, 0.005, -0.015, 0.004, 0.066, 0.078, 0.045, 0.033,
            0.034, -0.003, -0.012, -0.005, 0.009, 0.003, 0.003, 0.018, 0.045,
            0.022, -0.012, -0.016, -0.018, 0.002, 0.006, -0.018, -0.019,
            -0.021, -0.043, -0.038, 0.012, -0.009, -0.047, -0.055, -0.032,
            -0.021, -0.003, -0.008, 0.024, -0.018, -0.036, -0.009, -0.002,
            -0.018, -0.013, -0.031, 0.020, 0.060, 0.043, 0.031, 0.033, 0.047,
            0.021, -0.008, -0.064, -0.089, -0.070, 0.026, 0.014, 0.047, 0.004,
            0.017, 0.019, -0.012, -0.010, 0.003, 0.027, 0.040, 0.027, -0.027,
            -0.061, -0.070, -0.070, -0.024, 0.028, 0.029, -0.004, -0.039,
            -0.040, -0.007, -0.017, -0.002, -0.012, -0.012, -0.007, -0.002,
            -0.001, -0.016, -0.020, -0.027, 0.002, -0.009, 0.007, 0.021, 0.007,
            0.015, 0.008, 0.015, 0.012, -0.000, 0.004, -0.000, 0.005, 0.004,
            -0.001, -0.006, -0.005, -0.007, -0.009, -0.008, -0.006, 0.003
        ]),
                          std=np.array([
                              1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,
                              1.000, 1.000, 0.072, 0.036, 0.046, 0.044, 0.039,
                              0.038, 0.016, 0.027, 0.021, 0.021, 0.011, 0.030,
                              0.010, 0.023, 0.049, 0.036, 0.035, 0.033, 0.025,
                              0.024, 0.023, 0.027, 0.022, 0.014, 0.030, 0.020,
                              0.019, 0.044, 0.037, 0.036, 0.027, 0.028, 0.026,
                              0.024, 0.028, 0.028, 0.033, 0.030, 0.016, 0.033,
                              0.023, 0.030, 0.032, 0.037, 0.028, 0.039, 0.031,
                              0.037, 0.031, 0.034, 0.041, 0.038, 0.041, 0.055,
                              0.044, 0.036, 0.035, 0.040, 0.032, 0.033, 0.031,
                              0.028, 0.026, 0.029, 0.034, 0.039, 0.035, 0.030,
                              0.028, 0.034, 0.032, 0.036, 0.030, 0.032, 0.029,
                              0.030, 0.032, 0.035, 0.030, 0.034, 0.026, 0.022,
                              0.025, 0.029, 0.029, 0.022, 0.025, 0.031, 0.032,
                              0.032, 0.033, 0.028, 0.021, 0.031, 0.039, 0.039,
                              0.037, 0.033, 0.034, 0.032, 0.036, 0.031, 0.020,
                              0.020, 0.024, 0.022, 0.019, 0.018, 0.017, 0.018,
                              0.021
                          ]),
                          dt=0.250,
                          ray_param=0.06147,
                          std_sc=0.5,
                          rf_phase='Ps',
                          weight_by='rf1',
                          filter_corners=[1, 100]),
        pipeline.RecvFunc(amp=np.array([
            -0.023, -0.036, -0.059, -0.072, -0.067, -0.058, -0.056, -0.066,
            -0.058, -0.056, -0.052, -0.050, -0.070, -0.078, -0.095, -0.114,
            -0.156, -0.176, -0.184, -0.178, -0.167, -0.150, -0.122, -0.093,
            -0.069, -0.041, -0.017, 0.001, 0.014, 0.024, 0.030, 0.032, 0.033,
            0.032, 0.030, 0.028, 0.029, 0.030, 0.029, 0.028, 0.029, 0.029,
            0.030, 0.029, 0.028, 0.030, 0.035, 0.039, 0.039, 0.038, 0.035,
            0.032, 0.029, 0.027, 0.024, 0.020, 0.021, 0.024, 0.023, 0.025,
            0.024, 0.027, 0.028, 0.026, 0.027, 0.030, 0.031, 0.033, 0.037,
            0.035, 0.029, 0.022, 0.011, 0.003, -0.003, -0.004, -0.001, 0.006,
            0.015, 0.026, 0.044, 0.056, 0.069, 0.078, 0.080, 0.077, 0.073,
            0.067, 0.050, 0.029, 0.006, -0.019, -0.042, -0.062, -0.071, -0.071,
            -0.067, -0.058, -0.048, -0.034, -0.018, -0.008, 0.019, 0.038,
            0.056, 0.074, 0.087, 0.094, 0.094, 0.089, 0.080, 0.062, 0.041,
            0.019, -0.001, -0.018, -0.031, -0.035, -0.044, -0.049
        ]),
                          std=np.array([
                              0.027, 0.031, 0.035, 0.039, 0.043, 0.044, 0.046,
                              0.045, 0.045, 0.043, 0.041, 0.043, 0.040, 0.039,
                              0.040, 0.038, 0.038, 0.038, 0.037, 0.036, 0.036,
                              0.034, 0.032, 0.030, 0.027, 0.024, 0.022, 0.019,
                              0.017, 0.016, 0.014, 0.014, 0.014, 0.013, 0.012,
                              0.012, 0.012, 0.011, 0.011, 0.011, 0.012, 0.012,
                              0.014, 0.018, 0.022, 0.026, 0.032, 0.035, 0.038,
                              0.040, 0.039, 0.035, 0.031, 0.025, 0.020, 0.017,
                              0.017, 0.015, 0.013, 0.015, 0.016, 0.017, 0.017,
                              0.016, 0.014, 0.013, 0.014, 0.013, 0.014, 0.011,
                              0.012, 0.016, 0.019, 0.022, 0.023, 0.021, 0.019,
                              0.019, 0.023, 0.034, 0.050, 0.060, 0.071, 0.079,
                              0.080, 0.077, 0.068, 0.058, 0.044, 0.031, 0.020,
                              0.020, 0.032, 0.044, 0.056, 0.064, 0.068, 0.068,
                              0.066, 0.063, 0.060, 0.073, 0.084, 0.089, 0.092,
                              0.091, 0.084, 0.075, 0.064, 0.051, 0.040, 0.037,
                              0.038, 0.040, 0.040, 0.040, 0.041, 0.043, 0.047,
                              0.048
                          ]),
                          dt=0.250,
                          ray_param=0.11012,
                          std_sc=5,
                          rf_phase='Sp',
                          weight_by='rf1',
                          filter_corners=[4, 100]),
    ]

    swd_obs = pipeline.SurfaceWaveDisp(period=np.array([
        9.000, 10.120, 11.570, 13.500, 16.200, 20.250, 25.000, 32.000, 40.000,
        50.000, 60.000, 80.000
    ]),
                                       c=np.array([
                                           3.0160, 3.0610, 3.1260, 3.2220,
                                           3.3230, 3.4340, 3.6770, 3.7970,
                                           3.8780, 3.9460, 4.0290, 4.0600
                                       ]),
                                       std=np.array([
                                           0.4310, 0.2620, 0.4140, 0.3430,
                                           0.2120, 0.1560, 0.0070, 0.0110,
                                           0.0150, 0.0190, 0.0150, 0.0110
                                       ]))

    all_lims = pipeline.Limits(vs=(0.5, 5.0),
                               dep=(0, 200),
                               std_rf_sc=(1, 2),
                               lam_rf=(0.05, 0.5),
                               std_swd_sc=(1, 2),
                               crustal_thick=(25, ))

    vs_in = 'unknown'

    return (rf_obs, swd_obs, all_lims, vs_in)
Example #10
0
def LoadObservations():

	#   -9.2° S, 34.5° E

	rf_obs = [
		pipeline.RecvFunc(
				amp = np.array([0.000, 0.000, 0.000,
                       0.003, -0.033, -0.036, -0.007, 0.019, 0.014,
                       -0.010, -0.021, -0.021, -0.012, 0.003, 0.013,
                       0.018, 0.025, 0.046, 0.071, 0.077, 0.064,
                       0.008, -0.017, -0.030, -0.028, -0.035, 0.023,
                       0.022, 0.008, -0.013, -0.020, -0.023, -0.008,
                       -0.014, -0.026, -0.024, -0.031, -0.029, -0.028,
                       -0.009, -0.015, -0.022, -0.017, -0.010, -0.008,
                       0.001, 0.014, 0.024, 0.034, 0.019, 0.012,
                       0.011, 0.011, -0.018, -0.031, 0.000, 0.018,
                       0.024, 0.013, 0.030, 0.052, 0.037, 0.036,
                       0.027, 0.036, 0.041, 0.044, 0.055, 0.045,
                       0.023, 0.034, 0.020, 0.000, -0.008, -0.019,
                       0.007, -0.006, -0.017, -0.022, -0.019, 0.023,
                       0.025, 0.029, 0.026, 0.033, 0.003, -0.010,
                       0.001, 0.036, 0.021, 0.027, 0.005, 0.004,
                       0.003, -0.022, 0.020, 0.040, 0.015, -0.009,
                       -0.015, -0.008, 0.023, 0.031, 0.071, 0.074,
                       0.075, 0.045, -0.014, -0.039, -0.031, -0.017,
                       -0.020, -0.011, -0.031, -0.080, -0.092, -0.089,
                       -0.042, -0.010, 0.022
					]),
				std = np.array([1.000, 1.000, 1.000,
                       0.007, 0.005, 0.005, 0.011, 0.015, 0.014,
                       0.010, 0.016, 0.017, 0.023, 0.024, 0.020,
                       0.023, 0.025, 0.029, 0.029, 0.026, 0.031,
                       0.031, 0.033, 0.032, 0.027, 0.021, 0.018,
                       0.016, 0.020, 0.018, 0.017, 0.014, 0.022,
                       0.022, 0.023, 0.014, 0.018, 0.021, 0.017,
                       0.018, 0.020, 0.020, 0.022, 0.025, 0.023,
                       0.026, 0.024, 0.022, 0.022, 0.016, 0.018,
                       0.024, 0.027, 0.026, 0.030, 0.028, 0.025,
                       0.025, 0.019, 0.026, 0.020, 0.021, 0.022,
                       0.022, 0.027, 0.025, 0.033, 0.027, 0.029,
                       0.028, 0.025, 0.022, 0.025, 0.025, 0.021,
                       0.023, 0.030, 0.027, 0.024, 0.024, 0.027,
                       0.028, 0.024, 0.024, 0.027, 0.030, 0.036,
                       0.034, 0.033, 0.042, 0.034, 0.036, 0.041,
                       0.036, 0.031, 0.033, 0.044, 0.043, 0.050,
                       0.044, 0.047, 0.050, 0.051, 0.052, 0.060,
                       0.063, 0.047, 0.036, 0.033, 0.051, 0.051,
                       0.042, 0.045, 0.039, 0.039, 0.048, 0.037,
                       0.031, 0.046, 0.053
					]),
				dt = 0.250, ray_param = 0.06147,
				std_sc = 0.5, rf_phase = 'Ps',
				weight_by = 'rf1',
				filter_corners = [1, 100]
				),

		pipeline.RecvFunc(
				amp = np.array([-0.071, -0.074, -0.065,
                       -0.044, -0.028, -0.005, 0.009, 0.021, 0.025,
                       0.029, 0.019, 0.006, -0.009, -0.026, -0.042,
                       -0.057, -0.072, -0.080, -0.082, -0.081, -0.072,
                       -0.066, -0.060, -0.054, -0.047, -0.039, -0.033,
                       -0.029, -0.025, -0.021, -0.016, -0.008, 0.001,
                       0.007, 0.016, 0.022, 0.017, 0.011, 0.001,
                       -0.008, -0.013, -0.012, -0.007, -0.003, 0.004,
                       0.010, 0.017, 0.024, 0.033, 0.038, 0.040,
                       0.040, 0.038, 0.033, 0.027, 0.022, 0.018,
                       0.013, 0.010, 0.005, 0.001, -0.001, -0.002,
                       -0.003, -0.002, -0.001, -0.001, 0.000, 0.001,
                       0.002, 0.004, 0.005, 0.007, 0.009, 0.011,
                       0.012, 0.013, 0.013, 0.011, 0.008, 0.006,
                       0.004, 0.001, -0.002, -0.004, -0.003, -0.006,
                       -0.005, -0.001, 0.002, 0.011, 0.021, 0.029,
                       0.038, 0.043, 0.047, 0.049, 0.051, 0.050,
                       0.046, 0.041, 0.035, 0.028, 0.025, 0.022,
                       0.021, 0.022, 0.024, 0.027, 0.029, 0.029,
                       0.022, 0.015, 0.004, -0.012, -0.030, -0.046,
                       -0.060, -0.071, -0.077
					]),
				std = np.array([0.034, 0.036, 0.030,
                       0.031, 0.034, 0.036, 0.030, 0.030, 0.031,
                       0.034, 0.033, 0.032, 0.030, 0.027, 0.024,
                       0.022, 0.021, 0.022, 0.022, 0.021, 0.021,
                       0.020, 0.021, 0.020, 0.019, 0.018, 0.017,
                       0.016, 0.015, 0.015, 0.016, 0.017, 0.017,
                       0.018, 0.019, 0.018, 0.017, 0.017, 0.018,
                       0.021, 0.025, 0.029, 0.029, 0.028, 0.027,
                       0.026, 0.022, 0.019, 0.017, 0.014, 0.012,
                       0.011, 0.010, 0.011, 0.012, 0.012, 0.013,
                       0.013, 0.013, 0.013, 0.013, 0.013, 0.013,
                       0.015, 0.015, 0.016, 0.016, 0.015, 0.014,
                       0.013, 0.012, 0.012, 0.012, 0.012, 0.012,
                       0.012, 0.012, 0.013, 0.013, 0.014, 0.014,
                       0.015, 0.015, 0.015, 0.015, 0.016, 0.015,
                       0.014, 0.013, 0.013, 0.013, 0.015, 0.017,
                       0.020, 0.022, 0.025, 0.026, 0.027, 0.029,
                       0.029, 0.030, 0.029, 0.029, 0.027, 0.025,
                       0.023, 0.022, 0.022, 0.024, 0.026, 0.027,
                       0.031, 0.032, 0.033, 0.038, 0.046, 0.055,
                       0.064, 0.071, 0.073
					]),
				dt = 0.250, ray_param = 0.11012,
				std_sc = 5, rf_phase = 'Sp',
				weight_by = 'rf1',
				filter_corners = [4, 100]
				),
		]


	swd_obs = pipeline.SurfaceWaveDisp(
				period = np.array([9.000, 10.120, 11.570,
                       13.500, 16.200, 20.250, 25.000, 32.000, 40.000,
                       50.000, 60.000, 80.000
					]),
				c = np.array([3.3350, 3.3540, 3.4060,
                       3.4790, 3.5600, 3.6390, 3.7630, 3.8720, 3.8980,
                       3.9930, 4.0130, 4.0480
					]),
				std = np.array([0.2730, 0.1110, 0.1110,
                       0.1200, 0.0890, 0.0440, 0.0130, 0.0150, 0.0170,
                       0.0190, 0.0200, 0.0180
					])
				)

	all_lims = pipeline.Limits(
				vs = (0.5, 5.0),dep = (0,200), std_rf_sc = (1, 2),
				lam_rf = (0.05, 0.5), std_swd_sc = (1, 2), crustal_thick = (25,))

	vs_in = 'unknown'

	return (rf_obs, swd_obs, all_lims, vs_in)