def _test_func(self): if not os.path.isdir(edi_path): # input file does not exist, skip test after remove the output dir os.rmdir(self._output_dir) self.skipTest("edi path does not exist: {}".format(edi_path)) # generate data edi_list = glob.glob(edi_path + '/*.edi') period_list = EdiCollection(edi_list).select_periods() datob = Data(edi_list=edi_list, inv_mode='1', period_list=period_list, epsg=epsg_code, error_type_tipper='abs', error_type_z='egbert', comp_error_type=None, error_floor=10) datob.write_data_file(save_path=self._output_dir) # create mesh grid model object model = Model( stations_object=datob.station_locations, Data=datob, epsg=epsg_code, cell_size_east=10000, cell_size_north=10000, # GA_VIC pad_north= 8, # number of padding cells in each of the north and south directions pad_east=8, # number of east and west padding cells pad_z=8, # number of vertical padding cells pad_stretch_v= 1.5, # factor to increase by in padding cells (vertical) pad_stretch_h= 1.5, # factor to increase by in padding cells (horizontal) n_air_layers= 0, # number of air layers 0, 10, 20, depend on topo elev height res_model= 100, # halfspace resistivity value for initial reference model n_layers=50, # total number of z layers, including air and pad_z z1_layer=50, # first layer thickness metres, depend z_target_depth=500000) model.make_mesh( ) # the data file will be re-write in this method. No topo elev file used yet model.plot_mesh() model.plot_mesh_xy() model.plot_mesh_xz() # write a model file and initialise a resistivity model model.write_model_file(save_path=self._output_dir)
pad_east=8, # number of east and west padding cells pad_z=8, # number of vertical padding cells pad_stretch_v=1.5, # factor to increase by in padding cells (vertical) pad_stretch_h=1.5, # factor to increase by in padding cells (horizontal) n_airlayers= 10, # number of air layers 0, 10, 20, depend on topo elev height res_model=100, # halfspace resistivity value for initial reference model n_layers=55, # total number of z layers, including air and pad_z z1_layer=50, # first layer thickness metres, depend z_target_depth=500000) model.make_mesh( ) # the data file will be re-write in this method. No topo elev file used yet model.plot_mesh() model.plot_mesh_xy() model.plot_mesh_xz() # write a model file and initialise a resistivity model model.write_model_file(save_path=outputdir) #=========== now add topo data, with or without air layers? # 1) the data file will be changed in 3 columns sxi, syi and szi meters # 2) The covariance file will be written. # 3) the model file not changed?? No air layers can be seen in the .ws file. # add topography, define an initial resistivity model, modify and re-write the data file, define covariance mask # dat file will be changed and rewritten, # grid centre is used as the new origin of coordinate system, topo data used in the elev column. # model.add_topography(topofile, interp_method='nearest') # dat file will be written again as elevation updated