Beispiel #1
0
def test_time_filter_V():
    ali_file = Path(
        f"{test_data}/rf_tools/align_data/2019-10-01/2019-10-01-14:30/rf0XX_S06XX_2019-10-01-14:30_aligned.npz"
    )
    ref_pow, tile_pow, times = read_aligned(ali_file=ali_file)
    intvl = time_filter(1569911300, 1569911400, times)
    assert intvl is None
Beispiel #2
0
def test_noise_floor():
    ali_file = Path(
        f"{test_data}/rf_tools/align_data/2019-10-01/2019-10-01-14:30/rf0XX_S06XX_2019-10-01-14:30_aligned.npz"
    )
    ref_pow, tile_pow, times = read_aligned(ali_file=ali_file)
    noise_threshold = noise_floor(1, 3, ref_pow)
    assert round(noise_threshold) == -104.0
Beispiel #3
0
def test_plt_channel():
    ali_file = Path(
        f"{test_data}/rf_tools/align_data/2019-10-01/2019-10-01-14:30/rf0XX_S06XX_2019-10-01-14:30_aligned.npz"
    )
    ref_pow, tile_pow, times = read_aligned(ali_file=ali_file)
    noise_threshold = noise_floor(1, 3, ref_pow)
    plt = plt_channel(times, ref_pow[:, 46], np.median(ref_pow), 46, [-120, 5],
                      noise_threshold, 30)
    assert type(plt).__name__ == "module"
Beispiel #4
0
def test_plt_window_chans():
    ali_file = Path(
        f"{test_data}/rf_tools/align_data/2019-10-01/2019-10-01-14:30/rf0XX_S06XX_2019-10-01-14:30_aligned.npz"
    )
    ref_pow, tile_pow, times = read_aligned(ali_file=ali_file)
    plt = plt_window_chans(ref_pow,
                           12345,
                           1569911700,
                           1569912000,
                           "Spectral",
                           chs=[0, 4, 7, 14],
                           good_ch=7)
    assert type(plt).__name__ == "module"
Beispiel #5
0
def test_read_aligned_times():
    ali_file = Path(
        f"{test_data}/rf_tools/align_data/2019-10-01/2019-10-01-14:30/rf0XX_S06XX_2019-10-01-14:30_aligned.npz"
    )
    ref_pow, tile_pow, times = read_aligned(ali_file=ali_file)
    assert times.shape[0] == 1779