Coverage for frank/__init__.py: 87%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1# Frankenstein: 1D disc brightness profile reconstruction from Fourier data
2# using non-parametric Gaussian Processes
3#
4# Copyright (C) 2019-2020 R. Booth, J. Jennings, M. Tazzari
5#
6# This program is free software: you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation, either version 3 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program. If not, see <https://www.gnu.org/licenses/>
18#
19__version__ = "1.2.3"
21from frank import constants
22from frank import geometry
23from frank import hankel
24from frank import io
25from frank import radial_fitters
26from frank import debris_fitters
27from frank import utilities
30def enable_logging(log_file=None):
31 """Turn on internal logging for Frankenstein
33 Parameters
34 ----------
35 log_file : string, optional
36 Output filename to which logging messages are written.
37 If not provided, logs will only be printed to the screen
38 """
39 import logging
41 if log_file is not None:
42 handlers = [logging.FileHandler(log_file, mode="w"), logging.StreamHandler()]
43 else:
44 handlers = [logging.StreamHandler()]
46 logging.basicConfig(level=logging.INFO, format="%(message)s", handlers=handlers)