# Path: frbpoppy/misc.py
# def pprint(*s, output=True):
#     """Hack to make for more informative print statements."""
#     f = inspect.stack()[1][1].split('/')[-1]
#     m = '{:13.13} |'.format(f)
# 
#     if output:
#         print(m, *s)
#     else:
#         lines = []
#         for e in s:
#             lines.append('\n'.join([f'{m} {f}' for f in e.split('\n')]))
#         return '\n'.join(lines)
# 
# Path: frbpoppy/paths.py
# class Paths():
#     def __init__(self):
#     def __str__(self):
#     def check(self, path):
#     def store(self, name, default, *args):
#     def data(self, *args):
#     def populations(self, *args):
#     def surveys(self, *args):
#     def models(self, *args):
#     def frbcat(self, *args):


import os
import numpy as np
import sqlite3
import sys
import frbpoppy.galacticops as go
from scipy.integrate import quad
from tqdm import tqdm
from joblib import Parallel, delayed
from frbpoppy.misc import pprint
from frbpoppy.paths import paths
        self.rounding = 2

        # For parallel processes
        self.temp_path = None

        if self.test:
            self.step = 0.1
            if os.path.exists(self.file_name):
                os.remove(self.file_name)

        if os.path.exists(self.file_name) and self.test is False:
            self.db = True
        else:
            # Calculations take quite some time
            # Provide a way for people to quit
            try:
                self.create_table()
            except KeyboardInterrupt:
                pprint('Losing all progress in calculations')
                os.remove(self.file_name)
                if self.temp:
                    os.remove(self.temp_path)
                sys.exit()

    def set_file_name(self):
        """Determine filename."""
        uni_mods = os.path.join(paths.models(), 'universe/')
        self.file_name = uni_mods + 'dm_mw.db'

        if self.test:

# Path: frbpoppy/misc.py
# def pprint(*s, output=True):
#     """Hack to make for more informative print statements."""
#     f = inspect.stack()[1][1].split('/')[-1]
#     m = '{:13.13} |'.format(f)
# 
#     if output:
#         print(m, *s)
#     else:
#         lines = []
#         for e in s:
#             lines.append('\n'.join([f'{m} {f}' for f in e.split('\n')]))
#         return '\n'.join(lines)
# 
# Path: frbpoppy/paths.py
# class Paths():
#     def __init__(self):
#     def __str__(self):
#     def check(self, path):
#     def store(self, name, default, *args):
#     def data(self, *args):
#     def populations(self, *args):
#     def surveys(self, *args):
#     def models(self, *args):
#     def frbcat(self, *args):


# Path: frbpoppy/precalc.py
import os
import numpy as np
import sqlite3
import sys
import frbpoppy.galacticops as go
from scipy.integrate import quad
from tqdm import tqdm
from joblib import Parallel, delayed
from frbpoppy.misc import pprint
from frbpoppy.paths import paths

        self.rounding = 2

        # For parallel processes
        self.temp_path = None

        if self.test:
            self.step = 0.1
            if os.path.exists(self.file_name):
                os.remove(self.file_name)

        if os.path.exists(self.file_name) and self.test is False:
            self.db = True
        else:
            # Calculations take quite some time
            # Provide a way for people to quit
            try:
                self.create_table()
            except KeyboardInterrupt:
                pprint('Losing all progress in calculations')
                os.remove(self.file_name)
                if self.temp:
                    os.remove(self.temp_path)
                sys.exit()

    def set_file_name(self):
        """Determine filename."""
        uni_mods = os.path.join(paths.models(), 'universe/')
        self.file_name = uni_mods + 'dm_mw.db'

        if self.test:

            uni_mods = os.path.join(paths.models(), 'universe/')