def test_panel_plot(): module = LandslideSimulation(extent=extent) module.load_simulation_data_npz(test_data['landslide_simulation'] + 'Sim_Topo1_Rel13_results4sandbox.npz') module.frame_selector = 10 module.plot_frame_panel() module.plot_flow_frame.show()
def test_show_widgets(): module = LandslideSimulation(extent=extent) module.load_simulation_data_npz(test_data['landslide_simulation'] + 'Sim_Topo1_Rel13_results4sandbox.npz') module.flow_selector = "Velocity" module.frame_selector = 10 landslide = module.show_widgets() landslide.show()
def test_plot_landslide(): module = LandslideSimulation(extent=extent) module.load_simulation_data_npz(test_data['landslide_simulation'] + 'Sim_Topo1_Rel13_results4sandbox.npz') module.flow_selector = "Velocity" module.frame_selector = 10 fig, ax = plt.subplots() ax.imshow(frame, vmin=extent[-2], vmax=extent[-1], cmap='gist_earth_r', origin='lower') module.plot_landslide_frame(ax) fig.show() module.flow_selector = "Height" ax.cla() ax.imshow(frame, vmin=extent[-2], vmax=extent[-1], cmap='gist_earth_r', origin='lower') module.plot_landslide_frame(ax) fig.show()
def test_load_simulation(): module = LandslideSimulation(extent=extent) module.load_simulation_data_npz(test_data['landslide_simulation'] + 'Sim_Topo1_Rel13_results4sandbox.npz') assert module.velocity_flow is not None and module.height_flow is not None