Coverage for lisacattools/__init__.py: 96%
48 statements
« prev ^ index » next coverage.py v7.0.5, created at 2023-02-06 17:36 +0000
« prev ^ index » next coverage.py v7.0.5, created at 2023-02-06 17:36 +0000
1# -*- coding: utf-8 -*-
2# Copyright (C) 2021 - James I. Thorpe, Tyson B. Littenberg, Jean-Christophe
3# Malapert
4#
5# This file is part of lisacattools.
6#
7# lisacattools is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.
11#
12# lisacattools is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with lisacattools. If not, see <https://www.gnu.org/licenses/>.
19import logging.config
20import os
22from ._version import __author__ # noqa: F401
23from ._version import __author_email__ # noqa: F401
24from ._version import __copyright__ # noqa: F401
25from ._version import __description__ # noqa: F401
26from ._version import __license__ # noqa: F401
27from ._version import __name__ # noqa: F401
28from ._version import __title__ # noqa: F401
29from ._version import __url__ # noqa: F401
30from ._version import __version__ # noqa: F401
31from .analyze import CatalogAnalysis
32from .analyze import HistoryAnalysis
33from .analyze import LisaAnalyse
34from .catalog import GWCatalog
35from .catalog import GWCatalogs
36from .catalog import GWCatalogType
37from .custom_logging import LogRecord
38from .custom_logging import UtilsLogs
39from .utils import confidence_ellipse
40from .utils import convert_ecliptic_to_galactic
41from .utils import convert_galactic_to_cartesian
42from .utils import ellipse_area
43from .utils import FrameEnum
44from .utils import get_DL
45from .utils import get_Mchirp
46from .utils import getSciRD
47from .utils import HPhist
49logging.getLogger(__name__).addHandler(logging.NullHandler())
51UtilsLogs.addLoggingLevel("TRACE", 15)
52try:
53 PATH_TO_CONF = os.path.dirname(os.path.realpath(__file__))
54 logging.config.fileConfig(
55 os.path.join(PATH_TO_CONF, "logging.conf"),
56 disable_existing_loggers=False,
57 )
58 logging.debug(
59 "file %s loaded" % os.path.join(PATH_TO_CONF, "logging.conf")
60 )
61except Exception as exception: # pylint: disable=broad-except
62 logging.warning("cannot load logging.conf : %s" % exception)
63logging.setLogRecordFactory(LogRecord) # pylint: disable=no-member
65CRITICAL = 50
66FATAL = CRITICAL
67ERROR = 40
68WARNING = 30
69WARN = WARNING
70TRACE = 15
71INFO = 20
72DEBUG = 10
73NOTSET = 0
74OFF = 100
76__all__ = [
77 "GWCatalogs",
78 "GWCatalog",
79 "GWCatalogType",
80 "LisaAnalyse",
81 "CatalogAnalysis",
82 "HistoryAnalysis",
83 "FrameEnum",
84 "getSciRD",
85 "get_DL",
86 "get_Mchirp",
87 "confidence_ellipse",
88 "convert_ecliptic_to_galactic",
89 "convert_galactic_to_cartesian",
90 "ellipse_area",
91 "HPhist",
92 "CRITICAL",
93 "FATAL",
94 "ERROR",
95 "WARNING",
96 "WARN",
97 "TRACE",
98 "INFO",
99 "DEBUG",
100 "NOTSET",
101 "OFF",
102]