https://github.com/RadioAstronomySoftwareGroup/pyuvdata
Raw File
Tip revision: 8390aaceafd4868ecbd14a4cb6294ca18be7af00 authored by Bryna Hazelton on 12 February 2020, 23:55 UTC
remove extra mwa_beam.py file that got added in the rebase
Tip revision: 8390aac
__init__.py
# -*- mode: python; coding: utf-8 -*-
# Copyright (c) 2018 Radio Astronomy Software Group
# Licensed under the 2-clause BSD License

"""Init file for pyuvdata."""
from __future__ import absolute_import, division, print_function
import warnings
from pkg_resources import get_distribution, DistributionNotFound

# Set the version automatically from the package details.
try:
    __version__ = get_distribution(__name__).version
except DistributionNotFound:  # pragma: nocover
    # package is not installed
    pass

# Filter annoying Cython warnings that serve no good purpose. see numpy#432
# needs to be done before the imports to work properly
warnings.filterwarnings("ignore", message="numpy.dtype size changed")
warnings.filterwarnings("ignore", message="numpy.ufunc size changed")

from .uvdata import UVData  # noqa
from .telescopes import known_telescopes, Telescope, get_telescope  # noqa
from .uvcal import UVCal  # noqa
from .uvbeam import UVBeam  # noqa
from .uvflag import UVFlag  # noqa

__all__ = [
    "UVData",
    "UVCal",
    "UVFlag",
    "UVBeam",
    "Telescope",
    "known_telescopes",
    "get_telescope"
]


# adapted from https://github.com/astropy/astropy/__init__.py
# please consult astropy/__init__.py for clarification on logic details

# Cleanup the top-level namespace.
# Delete everything that is not in __all__, a magic function,
# or is a submodule of this package
from types import ModuleType as __module_type__  # noqa
for varname in dir():
    if not (
        varname in __all__
        or (varname.startswith("__") and varname.endswith("__"))
        or (
            varname[0] != "_"
            and isinstance(locals()[varname], __module_type__)
            and locals()[varname].__name__.startswith(__name__ + '.')
        )
    ):
        del locals()[varname]

del varname, __module_type__
back to top