Skip to content

Commit

Permalink
Convert times to float64 so batman doesnt get angry.
Browse files Browse the repository at this point in the history
  • Loading branch information
nespinoza committed Sep 6, 2019
1 parent 631993e commit 47ad4a0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions juliet/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def data_preparation(self,times,instruments,linear_regressors,linear_instruments
def convert_input_data(self, t, y, yerr):
"""
This converts the input dictionaries to arrays (this is easier to handle internally within juliet; input dictionaries are just asked because
it is easier for the user to pass them)
it is easier for the user to pass them).
"""
instruments = list(t.keys())
all_times = np.array([])
Expand Down Expand Up @@ -775,8 +775,12 @@ def __init__(self,priors = None, input_folder = None, t_lc = None, y_lc = None,
if (lcfilename is None) and (t_lc is not None):
# First check user gave all data:
input_error_catcher(t_lc,y_lc,yerr_lc,'lightcurve')
# Convert times to float64 (batman really hates non-float64 inputs):
for instrument in t_lc.keys():
t_lc[instrument] = t_lc[instrument].astype('float64')
# Create global arrays:
tglobal_lc, yglobal_lc, yglobalerr_lc, instruments_lc = self.convert_input_data(t_lc, y_lc, yerr_lc)
# Save data in a foramt useful for global modelling:
# Save data in a format useful for global modelling:
inames_lc, instrument_indexes_lc, lm_lc_boolean, lm_lc_arguments = self.data_preparation(tglobal_lc,instruments_lc,linear_regressors_lc,linear_instruments_lc)
ninstruments_lc = len(inames_lc)

Expand Down

0 comments on commit 47ad4a0

Please sign in to comment.