diff --git a/pyLIMA/fits/LM_fit.py b/pyLIMA/fits/LM_fit.py index 5034789..80490c7 100644 --- a/pyLIMA/fits/LM_fit.py +++ b/pyLIMA/fits/LM_fit.py @@ -105,7 +105,7 @@ def fit(self): gtol=10 ** -10, x_scale=scaling) - fit_results = lm_fit['x'].tolist() + fit_results = lm_fit['x'] fit_chi2 = lm_fit['cost'] * 2 # chi2 try: diff --git a/pyLIMA/fits/TRF_fit.py b/pyLIMA/fits/TRF_fit.py index 8f890b0..03e4d40 100644 --- a/pyLIMA/fits/TRF_fit.py +++ b/pyLIMA/fits/TRF_fit.py @@ -61,7 +61,7 @@ def fit(self): loss=loss, xtol=10**-10, ftol=10**-10, gtol=10**-10, x_scale=scaling) - fit_results = trf_fit['x'].tolist() + fit_results = trf_fit['x'] fit_chi2 = trf_fit['cost'] * 2 # chi2 try: diff --git a/pyLIMA/telescopes.py b/pyLIMA/telescopes.py index cb8e364..021d05a 100644 --- a/pyLIMA/telescopes.py +++ b/pyLIMA/telescopes.py @@ -99,19 +99,20 @@ def __init__(self, name='NDG', camera_filter='I', pixel_scale=1, lightcurve=None self.ld_a2 = 0 if lightcurve is not None: - data = construct_time_series(lightcurve, lightcurve_names, lightcurve_units) + values = [data[key].value for key in data.keys()] if 'mag' in lightcurve_names: - lightcurve_magnitude = lightcurve + lightcurve_magnitude = np.c_[values].T + lightcurve_flux = self.lightcurve_in_flux(data) else: - lightcurve_flux = lightcurve + lightcurve_flux = np.c_[values].T if 'inv_err_flux' not in lightcurve_names: @@ -121,11 +122,12 @@ def __init__(self, name='NDG', camera_filter='I', pixel_scale=1, lightcurve=None lightcurve_tot = np.c_[lightcurve_magnitude,lightcurve_flux[:,1:]] - data = construct_time_series(lightcurve_tot, ['time','mag','err_mag','flux','err_flux','inv_err_flux'], + data_tot = construct_time_series(lightcurve_tot, ['time','mag','err_mag', + 'flux','err_flux','inv_err_flux'], ['JD','mag','mag','W/m^2','W/m^2','m^2/W']) - good_lines, non_finite_lines, non_unique_lines = clean_time_series(data) + good_lines, non_finite_lines, non_unique_lines = clean_time_series(data_tot) - self.lightcurve = data[good_lines] + self.lightcurve = data_tot[good_lines] bad_data = {} bad_data['non_finite_lines'] = non_finite_lines