# Path: blimpy/io/sigproc.py
# def len_header(filename):
# def read_next_header_keyword(fh):
# def is_filterbank(filename):
# def read_header(filename, return_idxs=False):
# def fix_header(filename, keyword, new_value):
# def fil_double_to_angle(angle):
# def to_sigproc_keyword(keyword, value=None):
# def generate_sigproc_header(f):
# def to_sigproc_angle(angle_val):
# def calc_n_ints_in_file(filename):
#     GULP = 4096
# 
# Path: tests/data.py



from blimpy.io import sigproc
from tests.data import voyager_fil, voyager_h5
import blimpy as bl
import numpy as np
import os


def test_sigproc_is_fil():
    """ Check that the is_fil function works """

    assert sigproc.is_filterbank(voyager_h5) is False
    assert sigproc.is_filterbank(voyager_fil) is True


def test_sigproc_generate_headers():
    """ Test if you can generate headers OK from files """
    a = bl.Waterfall(voyager_h5)
    b = bl.Waterfall(voyager_fil)
    sigproc.generate_sigproc_header(a)

# Path: blimpy/io/sigproc.py
# def len_header(filename):
# def read_next_header_keyword(fh):
# def is_filterbank(filename):
# def read_header(filename, return_idxs=False):
# def fix_header(filename, keyword, new_value):
# def fil_double_to_angle(angle):
# def to_sigproc_keyword(keyword, value=None):
# def generate_sigproc_header(f):
# def to_sigproc_angle(angle_val):
# def calc_n_ints_in_file(filename):
#     GULP = 4096
# 
# Path: tests/data.py



# Path: tests/test_sigproc.py
from blimpy.io import sigproc
from tests.data import voyager_fil, voyager_h5
import blimpy as bl
import numpy as np
import os



def test_sigproc_is_fil():
    """ Check that the is_fil function works """

    assert sigproc.is_filterbank(voyager_h5) is False
    assert sigproc.is_filterbank(voyager_fil) is True


def test_sigproc_generate_headers():
    """ Test if you can generate headers OK from files """
    a = bl.Waterfall(voyager_h5)
    b = bl.Waterfall(voyager_fil)
    sigproc.generate_sigproc_header(a)

    sigproc.generate_sigproc_header(b)