Skip to content

Commit

Permalink
Added delta/shift_t_0 to results file, finished issue rpoleski#93
Browse files Browse the repository at this point in the history
  • Loading branch information
rapoliveira committed Oct 26, 2023
1 parent ebe3c71 commit 5747f7f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/example_16/ulens_model_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -2356,6 +2356,10 @@ def _parse_results_EMCEE(self):
if self._yaml_results:
self._print_yaml_best_model()

if self._shift_t_0 and self._yaml_results:
print("Plots shift_t_0 : {:}".format(self._shift_t_0_value),
**self._yaml_kwargs)

def _extract_posterior_samples_EMCEE(self):
"""
set self._samples_flat and self._samples for EMCEE
Expand Down Expand Up @@ -2500,6 +2504,7 @@ def _shift_t_0_in_samples(self):
index = self._fit_parameters.index(name)
values = self._samples_flat[:, index]
mean = np.mean(values)
self._shift_t_0_value = int(mean)
try:
self._samples_flat[:, index] -= int(mean)
if 'trace' in self._plots:
Expand Down

0 comments on commit 5747f7f

Please sign in to comment.