Esempio n. 1
0
 def test_SubfaultsMeshes(self):
     delete_if_exists(self.file_subfaults)
     
     sf = SubfaultsMeshes(control_points1)
     sf.x_f = linspace(0,700, 26)
     sf.y_f = linspace(0,300, 11)
     sf.save_fault_file(self.file_subfaults)
    def setUp(self):
        self.this_script = __file__
        super().setUp()
        self.out1 = join(self.outs_dir, 'out1')
        delete_if_exists(self.out1)

        self.out2 = join(self.outs_dir, 'out2')
 def setUp(self):
     self.this_script = __file__
     super().setUp()
     self.out1 = join(self.outs_dir,'out1')
     delete_if_exists(self.out1)
     
     self.out2 = join(self.outs_dir,'out2')
    def setUp(self):
        vec = ones(100).reshape([-1,1])
        for nth in range(10):
            vec[nth*10:(nth+1)*10,0] = nth

        self.vec = vec
        self.epochs = range(0,10)

        self.h5_file_name = join(this_test_dir, 'break_into_test.h5')        
        delete_if_exists(self.h5_file_name)
Esempio n. 5
0
    def test_SubfaultsMeshesByLength(self):
        delete_if_exists(self.file_gen_by_length)
        
        gen = SubfaultsMeshesByLength(control_points2)
        gen.subflt_sz_dip = 20.
        gen.depth_bottom_limit = 60.

        gen.flt_sz_strike_limit = 700. # km
        gen.subflt_sz_strike = 19.

        gen.save_fault_file(self.file_gen_by_length)
Esempio n. 6
0
    def test_SubfaultsMeshesByNumber(self):
        delete_if_exists(self.file_gen_by_number)

        gen=SubfaultsMeshesByNumber(control_points2)       
        
        gen.num_subflt_along_strike = 4
        gen.flt_sz_strike = 700. # km
        
        gen.num_subflt_along_dip = 3        
        gen.depth_bottom_limit = 50.

        gen.save_fault_file(self.file_gen_by_number)
    def setUp(self):
        # simulated slip on the fault
        gaussian_slip = GaussianSlip()
        gaussian_slip.num_subflts_in_dip = 10
        gaussian_slip.num_subflts_in_strike = 25

        gaussian_slip.mu_dip = 4.
        gaussian_slip.mu_stk = 12.
        gaussian_slip.sig_dip = 2
        gaussian_slip.sig_stk = 5

        # temporal part
        gaussian_slip.max_slip0 = 10.
        gaussian_slip.log_mag = 1.
        gaussian_slip.tau = 5.
        
        com = ForwardConvolution()
        com.file_G = '/home/zy/workspace/viscojapan/greensfunction/050km-vis02/G.h5'
        com.slip = gaussian_slip
        com.file_output = join(this_test_path,'~simulated_disp.h5')

        delete_if_exists(com.file_output)

        self.com_disp = com
    def setUp(self):
        # simulated slip on the fault
        gaussian_slip = GaussianSlip()
        gaussian_slip.num_subflts_in_dip = 10
        gaussian_slip.num_subflts_in_strike = 25

        gaussian_slip.mu_dip = 4.
        gaussian_slip.mu_stk = 12.
        gaussian_slip.sig_dip = 2
        gaussian_slip.sig_stk = 5

        # temporal part
        gaussian_slip.max_slip0 = 10.
        gaussian_slip.log_mag = 1.
        gaussian_slip.tau = 5.

        com = ForwardConvolution()
        com.file_G = '/home/zy/workspace/viscojapan/greensfunction/050km-vis02/G.h5'
        com.slip = gaussian_slip
        com.file_output = join(this_test_path, '~simulated_disp.h5')

        delete_if_exists(com.file_output)

        self.com_disp = com
Esempio n. 9
0
    def setUp(self):
        self.this_script = __file__
        MyTestCase.setUp(self)

        self.out_file = join(self.outs_dir, 'decay.out')
        delete_if_exists(self.out_file)
Esempio n. 10
0
    def setUp(self):
        self.this_script = __file__
        MyTestCase.setUp(self)

        self.out_file = join(self.outs_dir, 'out_disp')
        delete_if_exists(self.out_file)
 def test_break_m_into_slip_file(self):    
     slip_fn = join(this_test_dir, 'break_into_slip.h5')        
     delete_if_exists(slip_fn)
     break_m_into_slip_file(self.vec, self.epochs, slip_fn,
                            rows_per_epoch=10)