test_pplot¶
Test the general functionality of the PrettyPlot waveform plotter (pplot).
Note
Most tests only make figures to check that the machinery runs. Merging, response removal and the command line entry point are checked against expected values.
Attributes¶
Functions¶
|
Write a single gap-free channel to its own file |
|
Write the three gap-free BHZ channels to one file each |
|
Run PrettyPlot without showing the figure and check the saved figure |
|
Plot raw data on a relative time axis, trimmed with xlim |
|
xlim is given in the units of time, here minutes |
|
Remove the response, filter and add a spectrogram in local time |
|
inv also accepts an ObsPy Inventory |
The interpolated response matches ObsPy's to a small tolerance |
|
|
merge joins the segments of a gappy channel into one trace |
merge_stream accepts numbers and rejects unknown fill methods |
|
|
Overlain, stacked and record section plots of several files |
|
Grid plot with per-subplot y-limits |
|
Spectrograms cannot be combined with grid plots |
|
A colormap name is sampled into one color per trace |
|
Time marks, TauP arrivals and group velocities on relative time |
|
Overlay a second time series on a twin y-axis |
|
SPECFEM two-column ASCII is read with PySEP's read_sem |
|
The pplot entry point turns the negative flags into keywords |
Module Contents¶
- test_pplot.fid_bhz(tmpdir)[source]¶
Write a single gap-free channel to its own file
- Parameters:
tmpdir (py.path.local) – pytest temporary directory
- Return type:
str
- Returns:
path to the MiniSEED file holding AK.BESE..BHZ
- test_pplot.fids_bhz(tmpdir)[source]¶
Write the three gap-free BHZ channels to one file each
- Parameters:
tmpdir (py.path.local) – pytest temporary directory
- Return type:
list of str
- Returns:
paths to the three MiniSEED files
- test_pplot._run(fids, tmpdir, **kwargs)[source]¶
Run PrettyPlot without showing the figure and check the saved figure
- Parameters:
fids (list of str) – files to plot
tmpdir (py.path.local) – pytest temporary directory to save the figure in
- Return type:
- Returns:
the PrettyPlot instance after running
- test_pplot.test_default_plot(fid_bhz, tmpdir)[source]¶
Plot raw data on a relative time axis, trimmed with xlim
- test_pplot.test_relative_time_units(fid_bhz, tmpdir)[source]¶
xlim is given in the units of time, here minutes
- test_pplot.test_response_removal_and_spectrogram(fid_bhz, tmpdir)[source]¶
Remove the response, filter and add a spectrogram in local time
- test_pplot.test_response_removal_inventory_object(fid_bhz, tmpdir)[source]¶
inv also accepts an ObsPy Inventory
- test_pplot.test_fast_remove_response_matches_obspy()[source]¶
The interpolated response matches ObsPy’s to a small tolerance
- test_pplot.test_merge_gappy_file(tmpdir)[source]¶
merge joins the segments of a gappy channel into one trace
- test_pplot.test_merge_stream_fill_values()[source]¶
merge_stream accepts numbers and rejects unknown fill methods
- test_pplot.test_wf_types(fids_bhz, tmpdir, wf_type)[source]¶
Overlain, stacked and record section plots of several files
- test_pplot.test_grid_with_spectrogram_fails(fid_bhz)[source]¶
Spectrograms cannot be combined with grid plots
- test_pplot.test_colors_colormap(fids_bhz, tmpdir)[source]¶
A colormap name is sampled into one color per trace
- test_pplot.test_tmarks_taup_group_vels(fid_bhz, tmpdir)[source]¶
Time marks, TauP arrivals and group velocities on relative time