# Path: tests/data.py

# 
# Path: blimpy/plotting/config.py
# MAX_PLT_POINTS      = 65536                  # Max number of points in matplotlib plot
# MAX_IMSHOW_POINTS   = (8192, 4096)           # Max number of points in imshow plot


import blimpy as bl
import numpy as np
import pytest
from pprint import pprint
from tests.data import voyager_fil, voyager_h5
from blimpy.plotting.config import plt
    for key in b.header.keys():
        assert b.header[key] == a.header[key]
 
    print("Checking datatype matches..."),
    assert a.data.dtype == b.data.dtype

    print("Checking data matches..."),
    assert np.allclose(a.data, b.data)
    assert a.data.dtype == b.data.dtype


def test_plotting_doesnt_cause_exceptions():
    """ Try running the plotting routines. They should not raise expections even without X windows """
    a = bl.Waterfall(voyager_h5)
    b = bl.Waterfall(voyager_fil)

    a.plot_all()
    a.plot_kurtosis()
    a.plot_spectrum()
    a.plot_spectrum_min_max()
    a.plot_waterfall()
    a.plot_time_series()
    plt.clf() # Fix issue #140

    b.plot_all()
    b.plot_kurtosis()
    b.plot_spectrum()
    b.plot_spectrum_min_max()
    b.plot_waterfall()
    b.plot_time_series()

# Path: tests/data.py

# 
# Path: blimpy/plotting/config.py
# MAX_PLT_POINTS      = 65536                  # Max number of points in matplotlib plot
# MAX_IMSHOW_POINTS   = (8192, 4096)           # Max number of points in imshow plot


# Path: tests/test_filterbank_voyager.py
import blimpy as bl
import numpy as np
import pytest
from pprint import pprint
from tests.data import voyager_fil, voyager_h5
from blimpy.plotting.config import plt

    for key in b.header.keys():
        assert b.header[key] == a.header[key]
 
    print("Checking datatype matches..."),
    assert a.data.dtype == b.data.dtype

    print("Checking data matches..."),
    assert np.allclose(a.data, b.data)
    assert a.data.dtype == b.data.dtype


def test_plotting_doesnt_cause_exceptions():
    """ Try running the plotting routines. They should not raise expections even without X windows """
    a = bl.Waterfall(voyager_h5)
    b = bl.Waterfall(voyager_fil)

    a.plot_all()
    a.plot_kurtosis()
    a.plot_spectrum()
    a.plot_spectrum_min_max()
    a.plot_waterfall()
    a.plot_time_series()
    plt.clf() # Fix issue #140

    b.plot_all()
    b.plot_kurtosis()
    b.plot_spectrum()
    b.plot_spectrum_min_max()
    b.plot_waterfall()
    b.plot_time_series()

    plt.clf()