Пример #1
0
def test_run_aruco_source():
    seis = SeismicModule()
    file = np.load(_test_data['test'] + "frame1.npz")
    frame = seis.crop_frame(origin=(10, 10),
                            width=230,
                            height=180,
                            frame=file['arr_0'])
    seis.init_model(vmin=2, vmax=4, frame=np.transpose(frame), nbl=40)

    marker = pytest.sb_params['marker']
    seis.xy_aruco = marker.loc[marker.is_inside_box, ('box_x', 'box_y')].values
    seis.insert_aruco_source()

    seis.show_velocity(seis.model, source=seis.src_coordinates)
    print(seis.src_coordinates)
    seis.operator_and_solve()

    seis.show_velocity(seis.model, source=seis.src_coordinates)
    seis.show_wavefield(timeslice=10)
    seis.show_wavefield(timeslice=50)
    seis.show_wavefield(timeslice=100)
    seis.show_wavefield(timeslice=200)
    seis.show_wavefield(timeslice=300)
    seis.show_wavefield(timeslice=400)
    seis.show_wavefield(timeslice=5000)
Пример #2
0
def test_init_all_velocity_model():
    seis = SeismicModule()
    file = np.load(_test_data['test'] + "frame1.npz")
    frame = seis.crop_frame(origin=(20, 20),
                            width=200,
                            height=180,
                            frame=file['arr_0'])
    seis.init_model(vmin=2, vmax=4, frame=np.transpose(frame))
    plt.imshow(frame, origin="lower", cmap="gist_earth")
    plt.show()
    seis.show_velocity(seis.model)
Пример #3
0
def test_panel_plotting():
    seis = SeismicModule()
    marker = pytest.sb_params['marker']
    seis.xy_aruco = marker.loc[marker.is_inside_box, ('box_x', 'box_y')].values
    file = np.load(_test_data['test'] + "frame1.npz")
    seis.frame = seis.crop_frame(origin=(30, 30),
                                 width=230,
                                 height=180,
                                 frame=file['arr_0'])
    seis.run_simulation()
    seis.timeslice = 50
    sb_params = seis.update(pytest.sb_params)
    fig = sb_params["fig"]
    fig.show()