pyatoa.tests.test_manager

Test the functionalities of the Pyaflowa Manager class

Module Contents

Functions

st_obs()

Raw observed waveforms from station NZ.BFZ.HH? for New Zealand event

st_syn()

Synthetic data stream generated using Specfem3D and focal mechanism for

cat()

ObsPy Event Catalog for New Zealand based event with

event(cat)

Event from Catalog

inv()

StationXML information for station NZ.BFZ.HH?

config()

Default Pyatoa Config object

mgmt_pre(config, event, st_obs, st_syn, inv)

A manager filled with data but pre-workflow

mgmt_post(mgmt_pre)

A manager that has completed the full workflow

test_read_write_from_asdfdataset(tmpdir, mgmt_pre, config)

Write a Manager into an ASDFDataSet and then read it back

test_standardize_to_synthetics(mgmt_pre)

Ensure that standardizing streams performs three main tasks, trimming

test_standardize_raises_manager_error(mgmt_pre)

Asser that Manager will raise an error if user tries to standardize with

test_preprocess_dont_rotate(mgmt_pre)

Standard preprocessing, dont rotate components, just filter, check if

test_preprocess_rotate_to_rtz(mgmt_pre)

Standard preprocessing but rotate components based on the backazimuth

test_select_window(mgmt_pre)

Ensure windows functionality works as advertised

test_save_and_retrieve_windows(tmpdir, mgmt_post)

Test retrieve_windows() and save_windows() by saving windows into a

test_save_adjsrcs(tmpdir, mgmt_post)

Checks that adjoint sources can be written to dataset and will match the

test_format_windows(mgmt_post)

Basic check that format windows returns as formatted lists expected

test_flow_multiband(mgmt_pre)

Test that the workflow for multiple period bands returns a single

test_resample_numerical_noise(mgmt_pre)

Raised in Issue #34 by Ridvan O. (rdno).

pyatoa.tests.test_manager.st_obs()[source]

Raw observed waveforms from station NZ.BFZ.HH? for New Zealand event 2018p130600 (GeoNet event id)

pyatoa.tests.test_manager.st_syn()[source]

Synthetic data stream generated using Specfem3D and focal mechanism for 2018p130600. Minimum resolved period roughly 10s.

pyatoa.tests.test_manager.cat()[source]

ObsPy Event Catalog for New Zealand based event with GeoNet Event ID: 2018p130600

pyatoa.tests.test_manager.event(cat)[source]

Event from Catalog

pyatoa.tests.test_manager.inv()[source]

StationXML information for station NZ.BFZ.HH?

pyatoa.tests.test_manager.config()[source]

Default Pyatoa Config object

pyatoa.tests.test_manager.mgmt_pre(config, event, st_obs, st_syn, inv)[source]

A manager filled with data but pre-workflow

pyatoa.tests.test_manager.mgmt_post(mgmt_pre)[source]

A manager that has completed the full workflow

pyatoa.tests.test_manager.test_read_write_from_asdfdataset(tmpdir, mgmt_pre, config)[source]

Write a Manager into an ASDFDataSet and then read it back

pyatoa.tests.test_manager.test_standardize_to_synthetics(mgmt_pre)[source]

Ensure that standardizing streams performs three main tasks, trimming origin times, matching sampling rates, and matching number of points.

pyatoa.tests.test_manager.test_standardize_raises_manager_error(mgmt_pre)[source]

Asser that Manager will raise an error if user tries to standardize with no traces present

pyatoa.tests.test_manager.test_preprocess_dont_rotate(mgmt_pre)[source]

Standard preprocessing, dont rotate components, just filter, check if filtering worked

pyatoa.tests.test_manager.test_preprocess_rotate_to_rtz(mgmt_pre)[source]

Standard preprocessing but rotate components based on the backazimuth

pyatoa.tests.test_manager.test_select_window(mgmt_pre)[source]

Ensure windows functionality works as advertised

pyatoa.tests.test_manager.test_save_and_retrieve_windows(tmpdir, mgmt_post)[source]

Test retrieve_windows() and save_windows() by saving windows into a scratch dataset and retrieving them back. Window criteria will be recalculated but since the waveforms are the same, the values will be the same as before.

pyatoa.tests.test_manager.test_save_adjsrcs(tmpdir, mgmt_post)[source]

Checks that adjoint sources can be written to dataset and will match the formatting required by Specfem3D

pyatoa.tests.test_manager.test_format_windows(mgmt_post)[source]

Basic check that format windows returns as formatted lists expected

pyatoa.tests.test_manager.test_flow_multiband(mgmt_pre)[source]

Test that the workflow for multiple period bands returns a single adjoint source

pyatoa.tests.test_manager.test_resample_numerical_noise(mgmt_pre)[source]

Raised in Issue #34 by Ridvan O. (rdno).

Numerical noise can be introduced by resampling a trace that already has the correct sampling rate, which leads to non-zero adjoint sources/misfit when traces are identical due to very slight time shifts introduced from the resampling method.

This check ensures the fix (do not resample if sampling rates are the same) continues to work.