diff --git a/nuclockutils/nustarclock.py b/nuclockutils/nustarclock.py index a692af7..471f94e 100644 --- a/nuclockutils/nustarclock.py +++ b/nuclockutils/nustarclock.py @@ -315,7 +315,6 @@ def eliminate_trends_in_residuals(temp_table, clock_offset_table, table_new['temp_corr'][:] = clock_off_fun(table_new['met']) log.info("Final detrending...") - table_new = spline_detrending( clock_offset_table, temp_table, outlier_cuts=[-0.002, -0.001], @@ -843,6 +842,7 @@ def __init__(self, temperature_file, mjdstart=None, mjdstop=None, self.clock_jump_times = \ np.array([78708320, 79657575, 81043985, 82055671, 293346772]) self.fixed_control_points = np.arange(291e6, 295e6, 86400) + # Sum 30 seconds to avoid to exclude these points # from previous interval self.gtis = find_good_time_intervals( @@ -971,7 +971,8 @@ def write_clock_file(self, filename=None, save_nodetrend=False, idx0, idx1 = np.searchsorted( allmets, [jumptime - twodays, jumptime + twodays]) # print(idx0, idx1) - good_for_clockfile[idx0:idx1:10] = True + + good_for_clockfile[idx0:idx1] = True new_clock_table_subsample = new_clock_table[good_for_clockfile] else: new_clock_table_subsample = new_clock_table @@ -1392,14 +1393,56 @@ def clock_ppm_model(nustar_met, temperature, craig_fit=False): parameters of the ppm-time relation (long-term clock decay) """ + + # Parameters([('b0', + # ), + # ('b1', ), + # ('b2', + # ), + # ('b3', + # ), + # ('e', + # ), + # ('__lnsigma', + #