Beispiel #1
0
import mtpy.modeling.occam2d as occam

s_edi_path = r"c:\Users\jpeacock\Documents\MountainPass\EDI_Files_birrp\Edited\geographic_north\final_edi"
s_list = ["mp1{0:02}".format(ii) for ii in range(1, 20)]

ocd = occam.Data(edi_path=s_edi_path, station_list=s_list)
ocd.model_mode = "log_tm"
ocd.phase_tm_err = 1.4
ocd.res_tm_err = 30
ocd.save_path = r"c:\MinGW32-xy\Peacock\occam\MountainPass\inv06_tm_rot"
# ocd.geoelectric_strike = 70.0
ocd._rotate_to_strike = True
ocd.write_data_file()

ocm = occam.Regularization(station_locations=ocd.station_locations)
ocm.cell_width = 150
ocm.n_layers = 80
ocm.z1_layer = 10
ocm.z_target_depth = 40000
ocm.x_pad_multiplier = 1.5
ocm.num_x_pad_cells = 9
ocm.num_x_pad_small_cells = 3
ocm.build_mesh()
ocm.save_path = ocd.save_path
ocm.write_mesh_file()
ocm.build_regularization()
ocm.write_regularization_file()
ocm.plot_mesh()

ocs = occam.Startup()
Beispiel #2
0
    def _main_func(self, edipath):
        """
        test function should be successful with a edipath
        :return:
        """
        # path to save to
        savepath = self._output_dir

        # list of stations
        slst = [
            edi[0:-4] for edi in os.listdir(edipath) if edi.find('.edi') > 0
        ]

        # create an occam data object
        ocd = occam2d.Data(
            edi_path=edipath,
            station_list=slst,
            #                  interpolate_freq=True,
            #                  freq=np.logspace(-3,1,30)
        )

        ocd.save_path = savepath

        # choose frequency range to invert

        # ocd.freq_num = 50
        ocd.freq_min = 1
        ocd.freq_max = 10000
        # ocd.freq_num = 50 # number of frequencies to invert for
        ###########make data file

        # error floors
        ocd.res_te_err = 10
        ocd.res_tm_err = 10
        ocd.phase_te_err = 5
        ocd.phase_tm_err = 5
        # ocd.model_mode= 4
        ocd.write_data_file()

        # make model and mesh files
        ocr = occam2d.Regularization(ocd.station_locations)
        # number of layers
        ocr.n_layers = 60
        # cell width to aim for, note this is the mesh size (2 mesh blocks per model block)
        ocr.cell_width = 200
        # controls number and size of padding
        ocr.num_x_pad_cells = 9
        ocr.x_pad_multiplier = 1.9
        # controls aspect ratio of blocks
        ocr.trigger = 0.25

        # z1 layer and target depth in metres
        ocr.z1_layer = 20
        ocr.z_target_depth = 10000
        ocr.num_z_pad_cells = 10
        ocr.z_bottom = 100000
        ocr.save_path = ocd.save_path
        ocr.build_mesh()
        ocr.build_regularization()
        ocr.write_mesh_file()
        ocr.write_regularization_file()

        ocr.plot_mesh()
        plt_wait(1)
        plt_close()

        # make startup file
        ocs = occam2d.Startup()
        ocs.iterations_to_run = 40
        ocs.data_fn = os.path.join(ocd.save_path, 'OccamDataFile.dat')
        ocs.resistivity_start = 2.0
        ocr.get_num_free_params()
        ocs.param_count = ocr.num_free_param
        ocs.save_path = ocd.save_path
        ocs.model_fn = ocr.reg_fn
        ocs.write_startup_file()

        return savepath
Beispiel #3
0
ocd.freq_min = 1
ocd.freq_max = 10000

###########make data file
ocd.geoelectric_strike = strike
ocd._rotate_to_strike = False

# error floors
ocd.res_te_err = 10
ocd.res_tm_err = 10
ocd.phase_te_err = 5
ocd.phase_tm_err = 5
ocd.write_data_file()

# make model and mesh files
ocr = occam2d.Regularization(ocd.station_locations)
# number of layers
ocr.n_layers = 60
# mesh cell width
ocr.cell_width = 10
# controls number and size of padding
ocr.num_x_pad_cells = 9
ocr.x_pad_multiplier = 1.9
# controls aspect ratio of blocks
ocr.trigger = 1.0

# z1 layer and target depth in metres
ocr.z1_layer = 20
ocr.z_target_depth = 4000
ocr.num_z_pad_cells = 10
ocr.z_bottom = 10000