コード例 #1
0
def test_cumulative_absolute_velocity():
    record_path = TEST_DATA_DIR
    record_filename = 'test_motion_dt0p01.txt'
    motion_step = 0.01
    rec = np.loadtxt(record_path + record_filename)
    acc_signal = AccSignal(rec, motion_step)
    acc_signal.generate_cumulative_stats()
    true_cav = 8.53872
    assert np.isclose(acc_signal.cav, true_cav, rtol=0.0001)
コード例 #2
0
def test_arias_intensity():
    record_path = TEST_DATA_DIR
    record_filename = 'test_motion_dt0p01.txt'
    motion_step = 0.01
    rec = np.loadtxt(record_path + record_filename)
    acc_signal = AccSignal(rec, motion_step)
    acc_signal.generate_cumulative_stats()
    true_arias_intensity = 0.63398
    assert np.isclose(acc_signal.arias_intensity,
                      true_arias_intensity,
                      rtol=0.0001)