test_process#

Test the preprocessing functions which include standardization and rotation

Note

Pysep.preprocess() is almost all ObsPy functions so we don’t test that as we expect ObsPy to be testing their own functionality

Module Contents#

Functions#

test_event()

Pre-saved event object

test_inv()

Pre-saved event object

test_st(test_event, test_inv)

Pre-saved event object

test_trim_start_end_times(test_st)

Make sure we can trim per-station waveforms to their shortest component

test_merge_data_gaps(test_st)

Make sure merging data gaps works for a few different options. Does not

test_merge_data_gap_fraction(test_st)

Try out the fraction percentage function

test_resample_data(test_st)

Resample data to a lower sampling rate

test_format_streams_for_rotation(test_st)

Check that we can add null traces if we're missing data streams

test_rotate_to_uvw(test_st)

Test orientation UVW rotation

test_append_back_azimuth_to_stats(test_st, test_inv, ...)

Check that back azimuth values are appended correctly

test_rotate_streams_fail(test_st, test_inv, test_event)

Ensure that stream rotation does not go ahead if no back azimuth values are

test_rotate_streams(test_st, test_inv, test_event)

Ensure that stream rotation works as expected after we format SAC headers

test_rotate_streams_enz(test_st, test_inv)

Test that streams rotate from ENZ even if components are already ENZ

test_rotate_streams_12z()

Test that 12Z components can be rotated to ZNE

test_process.test_event()[source]#

Pre-saved event object

test_process.test_inv()[source]#

Pre-saved event object

test_process.test_st(test_event, test_inv)[source]#

Pre-saved event object

test_process.test_trim_start_end_times(test_st)[source]#

Make sure we can trim per-station waveforms to their shortest component and also merge existing waveforms, dropping those with data gaps

test_process.test_merge_data_gaps(test_st)[source]#

Make sure merging data gaps works for a few different options. Does not check values, just runs through the function

test_process.test_merge_data_gap_fraction(test_st)[source]#

Try out the fraction percentage function

test_process.test_resample_data(test_st)[source]#

Resample data to a lower sampling rate

test_process.test_format_streams_for_rotation(test_st)[source]#

Check that we can add null traces if we’re missing data streams

test_process.test_rotate_to_uvw(test_st)[source]#

Test orientation UVW rotation TODO test function and get better assertions

test_process.test_append_back_azimuth_to_stats(test_st, test_inv, test_event)[source]#

Check that back azimuth values are appended correctly

test_process.test_rotate_streams_fail(test_st, test_inv, test_event)[source]#

Ensure that stream rotation does not go ahead if no back azimuth values are specified

test_process.test_rotate_streams(test_st, test_inv, test_event)[source]#

Ensure that stream rotation works as expected after we format SAC headers

test_process.test_rotate_streams_enz(test_st, test_inv)[source]#

Test that streams rotate from ENZ even if components are already ENZ

test_process.test_rotate_streams_12z()[source]#

Test that 12Z components can be rotated to ZNE