test_generate_adjoint_stations.py 文件源码

python
阅读 16 收藏 0 点赞 0 评论 0

项目:pytomo3d 作者: computational-seismology 项目源码 文件源码
def test_prepare_adjoint_station_information():
    adjoint_stations = gas.prepare_adjoint_station_information(
        ["II.ABKT..BHR"], _stations)

    _true = [0.0, 120.0, 2437.8, 0.0]
    assert len(adjoint_stations) == 1
    npt.assert_allclose(adjoint_stations["II.ABKT"], _true)

    adjoint_stations = gas.prepare_adjoint_station_information(
        ["II.ABKT..BHR", "II.ABKT..BHZ"], _stations)
    assert len(adjoint_stations) == 1
    npt.assert_allclose(adjoint_stations["II.ABKT"], _true)

    adjoint_stations = gas.prepare_adjoint_station_information(
        ["II.ABKT..BHR", "II.ABKT..BHZ", "IU.BCD..BHZ"], _stations)
    assert len(adjoint_stations) == 2
    npt.assert_allclose(adjoint_stations["II.ABKT"], _true)
    npt.assert_allclose(adjoint_stations["IU.BCD"],
                        [0.0, -120.0, 2437.8, 0.0])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号