Skip to content

Commit

Permalink
Use absolute import for ease of use outside baseband.
Browse files Browse the repository at this point in the history
Also fix remaining reference to ASP.
  • Loading branch information
mhvk committed Oct 6, 2022
1 parent 7c0b7ae commit a2ca596
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions baseband/kotekan/base.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Licensed under the GPLv3 - see LICENSE
import astropy.units as u

from ..helpers import sequentialfile as sf
from ..base.base import (
from baseband.helpers import sequentialfile as sf
from baseband.base.base import (
FileBase,
FileOpener, FileInfo)
from ..base.file_info import FileReaderInfo
from baseband.base.file_info import FileReaderInfo
from .header import KotekanHeader
from .frame import KotekanFrame

Expand Down
2 changes: 1 addition & 1 deletion baseband/kotekan/frame.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Licensed under the GPLv3 - see LICENSE
from ..base.frame import FrameBase
from baseband.base.frame import FrameBase
from .header import KotekanHeader
from .payload import KotekanPayload

Expand Down
6 changes: 3 additions & 3 deletions baseband/kotekan/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from astropy.time import Time
from astropy import units as u

from ..base.header import ParsedHeaderBase
from ..base.utils import fixedvalue
from baseband.base.header import ParsedHeaderBase
from baseband.base.utils import fixedvalue


__all__ = ['KotekanHeader']
Expand Down Expand Up @@ -84,7 +84,7 @@ def fromfile(cls, fh, verify=True, **kwargs):
"""
s = fh.read(cls._dtype.itemsize)
if len(s) < cls._dtype.itemsize:
raise EOFError('reached EOF while reading ASPFileHeader')
raise EOFError('reached EOF while reading frame header')
words = np.ndarray(buffer=s, shape=(), dtype=cls._dtype)
self = cls(words, verify=verify, **kwargs)
self.mutable = False
Expand Down
3 changes: 2 additions & 1 deletion baseband/kotekan/payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import numpy as np

from ..base.payload import PayloadBase
from baseband.base.payload import PayloadBase


__all__ = ['KotekanPayload']
Expand All @@ -19,5 +19,6 @@ def decode_4bit(words):


class KotekanPayload(PayloadBase):
_dtype_word = np.dtype('u1')
_decoders = {4: decode_4bit}
_sample_shape_maker = namedtuple('SampleShape', 'npol')

0 comments on commit a2ca596

Please sign in to comment.