blimpy/sigproc.py
def len_header(filename):
    """ Return the length of the blimpy header, in bytes

    Args:
        filename (str): name of file to open

    Returns:
        idx_end (int): length of header, in bytes
    """
    with  open(filename, 'rb') as f:
        header_sub_count = 0
        eoh_found = False
        while not eoh_found:
            header_sub = f.read(512)
            header_sub_count += 1
            if b'HEADER_END' in header_sub:
                idx_end = header_sub.index(b'HEADER_END') + len(b'HEADER_END')
                eoh_found = True
                break

        idx_end = (header_sub_count -1) * 512 + idx_end
    return idx_end
def len_header(filename):
    with  open(filename, 'rb') as f:
        header_sub_count = 0
        eoh_found = False
        while not eoh_found:
            header_sub = f.read(512)
            header_sub_count += 1
            if b'HEADER_END' in header_sub:
                idx_end = header_sub.index(b'HEADER_END') + len(b'HEADER_END')
                eoh_found = True
                break

        idx_end = (header_sub_count -1) * 512 + idx_end
    return idx_end
def len_header ( filename ) : with open ( filename , 'rb' ) as f : header_sub_count = 0 eoh_found = False while not eoh_found : header_sub = f . read ( 512 ) header_sub_count += 1 if b'HEADER_END' in header_sub : idx_end = header_sub . index ( b'HEADER_END' ) + len ( b'HEADER_END' ) eoh_found = True break idx_end = ( header_sub_count - 1 ) * 512 + idx_end return idx_end
Return the length of the blimpy header, in bytes

    Args:
        filename (str): name of file to open

    Returns:
        idx_end (int): length of header, in bytes
Return the length of the blimpy header in bytes