# Path: pyLIMA/microltoolbox.py
# MAGNITUDE_CONSTANT = 27.4
# def chichi(residuals_fn, fit_process_parameters):
# def magnitude_to_flux(magnitude):
# def flux_to_magnitude(flux):
# def error_magnitude_to_error_flux(error_magnitude, flux):
# def error_flux_to_error_magnitude(error_flux, flux):
# def MCMC_compute_fs_g(fit, mcmc_chains):
# def align_the_data_to_the_reference_telescope(fit, telescope_index = 0, parameters = None) :
# 
# Path: pyLIMA/microlmodels.py
# class ModelException(Exception):
# class MLModel(object):
# class ModelPSPL(MLModel):
# class ModelFSPL(MLModel):
# class ModelFSPLee(MLModel):
# class ModelFSPLarge(MLModel):
# class ModelDSPL(MLModel):
# class ModelDFSPL(MLModel):
# class ModelFSBL(MLModel):
# class ModelUSBL(ModelFSBL):
# class ModelPSBL(ModelFSBL):
# class ModelVariablePL(MLModel):
# def create_model(model_type, event, model_arguments=[], parallax=['None', 0.0], xallarap=['None'],
#                  orbital_motion=['None', 0.0], source_spots='None', blend_flux_ratio=True):
#     def __init__(self, event, model_arguments=[], parallax=['None', 0.0], xallarap=['None'],
#                  orbital_motion=['None', 0.0], source_spots='None', blend_flux_ratio=True):
#     def model_type(self):
#     def paczynski_model_parameters(self):
#     def model_magnification(self, telescope, pyLIMA_parameters):
#     def define_pyLIMA_standard_parameters(self):
#     def define_model_parameters(self):
#     def print_model_parameters(self):
#     def compute_the_microlensing_model(self, telescope, pyLIMA_parameters):
#     def _default_microlensing_model(self, telescope, pyLIMA_parameters, amplification):
#     def derive_telescope_flux(self, telescope, pyLIMA_parameters, amplification):
#     def compute_pyLIMA_parameters(self, fancy_parameters):
#     def find_origin(self, pyLIMA_parameters):
#     def uo_to_from_uc_tc(self, pyLIMA_parameters):
#     def uc_tc_from_uo_to(selfself,pyLIMA_parameters):
#     def fancy_parameters_to_pyLIMA_standard_parameters(self, fancy_parameters):
#     def pyLIMA_standard_parameters_to_fancy_parameters(self, pyLIMA_parameters):
#     def source_trajectory(self, telescope, to, uo, tE, pyLIMA_parameters):
#     def model_type(self):
#     def paczynski_model_parameters(self):
#     def model_magnification(self, telescope, pyLIMA_parameters):
#     def Jacobian_model_magnification(self, telescope, pyLIMA_parameters):
#     def model_Jacobian(self, telescope, pyLIMA_parameters):
#     def model_type(self):
#     def paczynski_model_parameters(self):
#     def model_magnification(self, telescope, pyLIMA_parameters):
#     def Jacobian_model_magnification(self, telescope, pyLIMA_parameters):
#     def model_Jacobian(self, telescope, pyLIMA_parameters):
#     def model_type(self):
#     def paczynski_model_parameters(self):
#     def model_magnification(self, telescope, pyLIMA_parameters):
#     def model_type(self):
#     def paczynski_model_parameters(self):
#     def model_magnification(self, telescope, pyLIMA_parameters):
#     def model_type(self):
#     def paczynski_model_parameters(self):
#     def model_magnification(self, telescope, pyLIMA_parameters):
#     def model_type(self):
#     def paczynski_model_parameters(self):
#     def model_magnification(self, telescope, pyLIMA_parameters):
#     def model_type(self):
#     def paczynski_model_parameters(self):
#     def model_magnification(self, telescope, pyLIMA_parameters):
#     def find_caustics(self, separation, mass_ratio):
#     def find_origin(self, pyLIMA_parameters):
#     def uo_to_from_uc_tc(self, pyLIMA_parameters):
#     def uc_tc_from_uo_to(self, pyLIMA_parameters, to, uo):
#     def find_binary_regime(self, pyLIMA_parameters):
#     def model_type(self):
#     def paczynski_model_parameters(self):
#     def model_magnification(self, telescope, pyLIMA_parameters):
#     def model_type(self):
#     def paczynski_model_parameters(self):
#     def model_magnification(self, telescope, pyLIMA_parameters):
#     def model_type(self):
#     def paczynski_model_parameters(self):
#     def model_magnification(self, telescope, pyLIMA_parameters):
#     def compute_the_microlensing_model(self, telescope, pyLIMA_parameters):
#     def derive_telescope_flux(self, telescope, pyLIMA_parameters, amplification, pulsations):
#     def compute_pulsations(self, time, filter, pyLIMA_parameters):
# 
# Path: pyLIMA/event.py
# class EventException(Exception):
# class Event(object):
#     def __init__(self):
#     def fit(self, model, method, DE_population_size=10, flux_estimation_MCMC='MCMC', fix_parameters_dictionnary=None,
#             grid_resolution=10, computational_pool=None, binary_regime=None):
#     def telescopes_names(self):
#     def check_event(self):
#     def find_survey(self, choice=None):
#     def lightcurves_in_flux(self, choice='Yes'):
#     def compute_parallax_all_telescopes(self, parallax_model):
#     def total_number_of_data_points(self):


import os.path
import numpy as np
import unittest.mock as mock
from pyLIMA import microltoolbox, microlmodels
from pyLIMA import event



def test_chichi():
    magic_residuals = mock.MagicMock()

    parameters = []
    magic_residuals.residuals_fn.return_value = np.array([0, 1, 50])

    parameters2 = [0, 6, 5]

# Path: pyLIMA/microltoolbox.py
# MAGNITUDE_CONSTANT = 27.4
# def chichi(residuals_fn, fit_process_parameters):
# def magnitude_to_flux(magnitude):
# def flux_to_magnitude(flux):
# def error_magnitude_to_error_flux(error_magnitude, flux):
# def error_flux_to_error_magnitude(error_flux, flux):
# def MCMC_compute_fs_g(fit, mcmc_chains):
# def align_the_data_to_the_reference_telescope(fit, telescope_index = 0, parameters = None) :
# 
# Path: pyLIMA/microlmodels.py
# class ModelException(Exception):
# class MLModel(object):
# class ModelPSPL(MLModel):
# class ModelFSPL(MLModel):
# class ModelFSPLee(MLModel):
# class ModelFSPLarge(MLModel):
# class ModelDSPL(MLModel):
# class ModelDFSPL(MLModel):
# class ModelFSBL(MLModel):
# class ModelUSBL(ModelFSBL):
# class ModelPSBL(ModelFSBL):
# class ModelVariablePL(MLModel):
# def create_model(model_type, event, model_arguments=[], parallax=['None', 0.0], xallarap=['None'],
#                  orbital_motion=['None', 0.0], source_spots='None', blend_flux_ratio=True):
#     def __init__(self, event, model_arguments=[], parallax=['None', 0.0], xallarap=['None'],
#                  orbital_motion=['None', 0.0], source_spots='None', blend_flux_ratio=True):
#     def model_type(self):
#     def paczynski_model_parameters(self):
#     def model_magnification(self, telescope, pyLIMA_parameters):
#     def define_pyLIMA_standard_parameters(self):
#     def define_model_parameters(self):
#     def print_model_parameters(self):
#     def compute_the_microlensing_model(self, telescope, pyLIMA_parameters):
#     def _default_microlensing_model(self, telescope, pyLIMA_parameters, amplification):
#     def derive_telescope_flux(self, telescope, pyLIMA_parameters, amplification):
#     def compute_pyLIMA_parameters(self, fancy_parameters):
#     def find_origin(self, pyLIMA_parameters):
#     def uo_to_from_uc_tc(self, pyLIMA_parameters):
#     def uc_tc_from_uo_to(selfself,pyLIMA_parameters):
#     def fancy_parameters_to_pyLIMA_standard_parameters(self, fancy_parameters):
#     def pyLIMA_standard_parameters_to_fancy_parameters(self, pyLIMA_parameters):
#     def source_trajectory(self, telescope, to, uo, tE, pyLIMA_parameters):
#     def model_type(self):
#     def paczynski_model_parameters(self):
#     def model_magnification(self, telescope, pyLIMA_parameters):
#     def Jacobian_model_magnification(self, telescope, pyLIMA_parameters):
#     def model_Jacobian(self, telescope, pyLIMA_parameters):
#     def model_type(self):
#     def paczynski_model_parameters(self):
#     def model_magnification(self, telescope, pyLIMA_parameters):
#     def Jacobian_model_magnification(self, telescope, pyLIMA_parameters):
#     def model_Jacobian(self, telescope, pyLIMA_parameters):
#     def model_type(self):
#     def paczynski_model_parameters(self):
#     def model_magnification(self, telescope, pyLIMA_parameters):
#     def model_type(self):
#     def paczynski_model_parameters(self):
#     def model_magnification(self, telescope, pyLIMA_parameters):
#     def model_type(self):
#     def paczynski_model_parameters(self):
#     def model_magnification(self, telescope, pyLIMA_parameters):
#     def model_type(self):
#     def paczynski_model_parameters(self):
#     def model_magnification(self, telescope, pyLIMA_parameters):
#     def model_type(self):
#     def paczynski_model_parameters(self):
#     def model_magnification(self, telescope, pyLIMA_parameters):
#     def find_caustics(self, separation, mass_ratio):
#     def find_origin(self, pyLIMA_parameters):
#     def uo_to_from_uc_tc(self, pyLIMA_parameters):
#     def uc_tc_from_uo_to(self, pyLIMA_parameters, to, uo):
#     def find_binary_regime(self, pyLIMA_parameters):
#     def model_type(self):
#     def paczynski_model_parameters(self):
#     def model_magnification(self, telescope, pyLIMA_parameters):
#     def model_type(self):
#     def paczynski_model_parameters(self):
#     def model_magnification(self, telescope, pyLIMA_parameters):
#     def model_type(self):
#     def paczynski_model_parameters(self):
#     def model_magnification(self, telescope, pyLIMA_parameters):
#     def compute_the_microlensing_model(self, telescope, pyLIMA_parameters):
#     def derive_telescope_flux(self, telescope, pyLIMA_parameters, amplification, pulsations):
#     def compute_pulsations(self, time, filter, pyLIMA_parameters):
# 
# Path: pyLIMA/event.py
# class EventException(Exception):
# class Event(object):
#     def __init__(self):
#     def fit(self, model, method, DE_population_size=10, flux_estimation_MCMC='MCMC', fix_parameters_dictionnary=None,
#             grid_resolution=10, computational_pool=None, binary_regime=None):
#     def telescopes_names(self):
#     def check_event(self):
#     def find_survey(self, choice=None):
#     def lightcurves_in_flux(self, choice='Yes'):
#     def compute_parallax_all_telescopes(self, parallax_model):
#     def total_number_of_data_points(self):


# Path: pyLIMA/test/test_microltoolbox.py
import os.path
import numpy as np
import unittest.mock as mock
from pyLIMA import microltoolbox, microlmodels
from pyLIMA import event




def test_chichi():
    magic_residuals = mock.MagicMock()

    parameters = []
    magic_residuals.residuals_fn.return_value = np.array([0, 1, 50])

    parameters2 = [0, 6, 5]

    chichi = microltoolbox.chichi(magic_residuals.residuals_fn, parameters2)