diff --git a/pyLIMA/fits/DEMC_fit.py b/pyLIMA/fits/DEMC_fit.py index e572164..432f400 100644 --- a/pyLIMA/fits/DEMC_fit.py +++ b/pyLIMA/fits/DEMC_fit.py @@ -4,7 +4,6 @@ import emcee import numpy as np from pyLIMA.fits.ML_fit import MLfit -from pyLIMA.outputs import pyLIMA_plots from pyLIMA.priors import parameters_priors @@ -142,7 +141,7 @@ def fit(self, initial_population=[], computational_pool=False): 'DEMC_chains': DEMC_chains, 'fit_time': computation_time} def fit_outputs(self): - + from pyLIMA.outputs import pyLIMA_plots pyLIMA_plots.plot_lightcurves(self.model, self.fit_results['best_model']) pyLIMA_plots.plot_geometry(self.model, self.fit_results['best_model']) diff --git a/pyLIMA/fits/ML_fit.py b/pyLIMA/fits/ML_fit.py index d203bd6..e5246de 100644 --- a/pyLIMA/fits/ML_fit.py +++ b/pyLIMA/fits/ML_fit.py @@ -4,8 +4,6 @@ import numpy as np import pyLIMA.fits.objective_functions as objective_functions -from bokeh.layouts import gridplot -from bokeh.plotting import output_file, save from pyLIMA.priors import parameters_boundaries from pyLIMA.priors import parameters_priors @@ -1254,6 +1252,8 @@ def fit_outputs(self, bokeh_plot=None): implemented yet) bokeh_figure : bokehh.fig, a bokeh.figure containing all the above """ + from bokeh.layouts import gridplot + from bokeh.plotting import output_file, save from pyLIMA.outputs import pyLIMA_plots matplotlib_lightcurves = None diff --git a/pyLIMA/outputs/pyLIMA_plots.py b/pyLIMA/outputs/pyLIMA_plots.py index 63a024c..31ed20c 100644 --- a/pyLIMA/outputs/pyLIMA_plots.py +++ b/pyLIMA/outputs/pyLIMA_plots.py @@ -5,7 +5,6 @@ import matplotlib.pyplot as plt import numpy as np import pyLIMA.fits.objective_functions -import pygtc from bokeh.layouts import gridplot from bokeh.models import Arrow, OpenHead from bokeh.models import BasicTickFormatter @@ -1188,6 +1187,7 @@ def plot_residuals(figure_axe, microlensing_model, model_parameters, bokeh_plot= def plot_distribution(samples, parameters_names=None, bokeh_plot=None): + import pygtc names = [str(i) for i in range(len(parameters_names))] try: GTC = pygtc.plotGTC(chains=[samples], sigmaContourLevels=True, paramNames=names,