def test_StaticInversion(self): fault_file = join(self.share_dir, 'fault_He50km_east.h5') rough = Roughening.create_from_fault_file(fault_file) reg = Composite().add_component(rough, 1., 'roughening') basis = BasisMatrix.create_from_fault_file(fault_file) inv = StaticInversion( file_G=join(self.share_dir, 'G.h5'), file_d=join(self.share_dir, 'cumu_post_with_seafloor.h5'), file_sd=join(self.share_dir, 'sites_sd.h5'), file_sites_filter=join(self.share_dir, 'sites_with_seafloor'), regularization=reg, basis=basis, ) inv.set_data_all() inv.run() inv.save(join(self.outs_dir, 'out.h5'), overwrite=True)
def test_StaticInversion(self): fault_file = join(self.share_dir, 'fault_He50km_east.h5') rough = Roughening.create_from_fault_file(fault_file) reg = Composite().add_component(rough, 1., 'roughening') basis = BasisMatrix.create_from_fault_file(fault_file) inv = StaticInversion( file_G = join(self.share_dir, 'G.h5'), file_d = join(self.share_dir,'cumu_post_with_seafloor.h5'), file_sd = join(self.share_dir, 'sites_sd.h5'), file_sites_filter = join(self.share_dir, 'sites_with_seafloor'), regularization = reg, basis = basis, ) inv.set_data_all() inv.run() inv.save(join(self.outs_dir,'out.h5'), overwrite=True)
from numpy import logspace from viscojapan.inversion import OccamDeconvolution from viscojapan.inversion.regularization import Roughening, Composite from viscojapan.inversion.basis_function import BasisMatrix epochs = [0] fault_file = '../../fault_model/fault_bott60km.h5' basis = BasisMatrix.create_from_fault_file(fault_file) rough = Roughening.create_from_fault_file(fault_file) inv = OccamDeconvolution( file_G0 = '../../green_function/G0_He63km_VisM1.0E19_Rake90.h5', files_Gs = ['../../green_function/G1_He63km_VisM1.0E19_Rake80.h5'], nlin_par_names = ['rake'], file_d = '../../cumu_post_with_seafloor.h5', file_sd = '../sd/sd_seafloor_inf.h5', file_incr_slip0 = 'slip0/slip0.h5', filter_sites_file = 'sites_with_seafloor', epochs = epochs, regularization = rough, basis = basis, ) inv.set_data_except_L() for nth, alpha in enumerate(logspace(-4, 0, 30)): reg = Composite().add_component(component = rough, arg = alpha, arg_name = 'roughening')
from numpy import logspace from viscojapan.inversion import OccamDeconvolution from viscojapan.inversion.regularization import Roughening, Composite from viscojapan.inversion.basis_function import BasisMatrix epochs = [0] fault_file = '../../fault_model/fault_bott60km.h5' basis = BasisMatrix.create_from_fault_file(fault_file) rough = Roughening.create_from_fault_file(fault_file) inv = OccamDeconvolution( file_G0='../../green_function/G0_He63km_VisM1.0E19_Rake90.h5', files_Gs=['../../green_function/G1_He63km_VisM1.0E19_Rake80.h5'], nlin_par_names=['rake'], file_d='../../cumu_post_with_seafloor.h5', file_sd='../sd/sd_seafloor_inf.h5', file_incr_slip0='slip0/slip0.h5', filter_sites_file='sites_with_seafloor', epochs=epochs, regularization=rough, basis=basis, ) inv.set_data_except_L() for nth, alpha in enumerate(logspace(-4, 0, 30)): reg = Composite().add_component(component=rough, arg=alpha, arg_name='roughening')