Skip to content

Commit

Permalink
changes in analysis imports
Browse files Browse the repository at this point in the history
  • Loading branch information
santiagocasas committed Nov 23, 2023
1 parent 30f288c commit 8fba4c3
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 23 deletions.
2 changes: 1 addition & 1 deletion cosmicfishpie/analysis/fisher_derived.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

import numpy as np

from . import fisher_matrix as fm
from cosmicfishpie.analysis import fisher_matrix as fm

# ***************************************************************************************

Expand Down
2 changes: 1 addition & 1 deletion cosmicfishpie/analysis/fisher_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

import numpy as np

from . import utilities as fu
from cosmicfishpie.analysis import utilities as fu

# ***************************************************************************************

Expand Down
2 changes: 1 addition & 1 deletion cosmicfishpie/analysis/fisher_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

import numpy as np

from . import fisher_matrix as fm
from cosmicfishpie.analysis import fisher_matrix as fm

# ***************************************************************************************

Expand Down
16 changes: 8 additions & 8 deletions cosmicfishpie/analysis/fisher_plot_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@

import numpy as np

from . import __init__ as CosmicFishPyLib
from . import fisher_derived as fd
from . import fisher_matrix as fm
from . import fisher_operations as fo
from . import utilities as fu
from cosmicfishpie.analysis import fisher_derived as fd
from cosmicfishpie.analysis import fisher_matrix as fm
from cosmicfishpie.analysis import fisher_operations as fo
from cosmicfishpie.analysis import utilities as fu

# ***************************************************************************************

Expand Down Expand Up @@ -89,6 +88,7 @@ def __init__(
"""
# create class instances:
self.feedback = 1
self.fisher_list = []
self.fisher_name_list = []
# check wether we have to do something:
Expand Down Expand Up @@ -176,14 +176,14 @@ def search_fisher_path(self, fisher_path, search_fisher_guess=False, with_derive

# import fisher matrices:
for file in fisher_files:
if CosmicFishPyLib.__feedback__ > 1:
if self.feedback > 1:
print("Trying to import: " + file + " as a Fisher matrix: ", end=" ")
try:
self.fisher_list.append(fm.fisher_matrix(file_name=file))
self.fisher_name_list.append(self.fisher_list[-1].name)
if CosmicFishPyLib.__feedback__ > 1:
if self.feedback > 1:
print("SUCCESS")
if CosmicFishPyLib.__feedback__ == 1:
if self.feedback == 1:
print("Imported as a Fisher matrix: " + file)
# remove from the derived fishers if necessary:
derived_fisher_files.remove(file)
Expand Down
16 changes: 6 additions & 10 deletions cosmicfishpie/analysis/fisher_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,22 @@

from cosmicfishpie.utilities.utils import filesystem as ffs

from . import fisher_matrix as fm
from . import fisher_plot_analysis as fpa
from . import plot_comparison as pc
from cosmicfishpie.analysis import fisher_matrix as fm
from cosmicfishpie.analysis import fisher_plot_analysis as fpa
from cosmicfishpie.analysis import plot_comparison as pc

matplotlib.rcParams.update({"font.size": 22})
matplotlib.rcParams.update({"font.family": "cm"})
params = {
"mathtext.fontset": "cm",
"mathtext.fontset": "stix",
"font.size": 22,
"mathtext.rm": "serif",
"mathtext.bf": "serif:bold",
"mathtext.it": "serif:italic",
"mathtext.sf": "sans\\-serif",
"text.usetex": False,
"font.family": "serif",
"font.family": "STIXGeneral",
"font.weight": "normal",
"font.serif": "Computer Modern",
}

matplotlib.rcParams.update(params)
matplotlib.rcParams["text.usetex"]


class fisher_plotting:
Expand Down
4 changes: 2 additions & 2 deletions cosmicfishpie/analysis/plot_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
import seaborn as sns
from mpl_toolkits import axes_grid1

from . import fisher_operations as fo
from . import utilities as fu
from cosmicfishpie.analysis import fisher_operations as fo
from cosmicfishpie.analysis import utilities as fu

plt.style.use("tableau-colorblind10")

Expand Down

0 comments on commit 8fba4c3

Please sign in to comment.