def test_simple_raydensity(project): """ Tests the plotting of a single event. """ project.plot_raydensity(save_plot=False) # Use a low dpi to keep the test filesize in check. images_are_identical("simple_raydensity_plot", project.paths["root"], dpi=25)
def test_domain_plotting(tmpdir): """ Very simple domain plotting test. """ pr = Project(str(tmpdir), init_project="TestProject") pr.plot_domain() images_are_identical("simple_test_domain", str(tmpdir))
def test_Q_model_plotting(tmpdir): """ Tests the plotting of the Q Model. """ reset_matplotlib() tmpdir = str(tmpdir) Q_discrete.plot(WEIGHTS, RELAXATION_TIMES, f_min=1.0 / 100.0, f_max=1.0 / 10.0) images_are_identical("discrete_Q_model", tmpdir)
def test_Q_model_plotting(tmpdir): """ Tests the plotting of the Q Model. """ reset_matplotlib() tmpdir = str(tmpdir) weights = [2.50960201, 2.31899515, 0.19681762] relaxation_times = [1.73160984, 14.41562154, 16.70330157] Q_discrete.plot(weights, relaxation_times, f_min=1.0 / 100.0, f_max=1.0 / 10.0) images_are_identical("discrete_Q_model", tmpdir)
def test_event_plotting(project): """ Tests the plotting of all events. The commands supports three types of plots: Beachballs on a map and depth and time distribution histograms. """ project.plot_events(plot_type="map") images_are_identical("two_events_plot_map", project.paths["root"]) project.plot_events(plot_type="depth") images_are_identical("two_events_plot_depth", project.paths["root"]) project.plot_events(plot_type="time") images_are_identical("two_events_plot_time", project.paths["root"])
def test_single_event_plot(project): """ Tests the plotting of a single event. """ project.plot_event("GCMT_event_TURKEY_Mag_5.1_2010-3-24-14-11") images_are_identical("single_event_plot", project.paths["root"])