Skip to content

Commit

Permalink
Merge pull request #114 from rapoliveira/bugfix-example16-residuals
Browse files Browse the repository at this point in the history
Bugfix example16 residuals
  • Loading branch information
rpoleski authored Dec 27, 2023
2 parents 03de1a6 + 63aa94e commit dff8bc5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 3 additions & 4 deletions examples/example_16/ob03235_2_full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ other_output:
file name: ob03235_2_all_models.txt
yaml output:
file name: ob03235_2_all_results.yaml
other_output:
residuals:
# "-" below means the we don't output residuals for second file
files: ob03235_1_res.txt -
residuals:
# "-" below means the we don't output residuals for second file
files: ob03235_2_res.txt -
4 changes: 3 additions & 1 deletion examples/example_16/ulens_model_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
except Exception:
raise ImportError('\nYou have to install MulensModel first!\n')

__version__ = '0.34.2'
__version__ = '0.34.3'


class UlensModelFit(object):
Expand Down Expand Up @@ -3144,6 +3144,8 @@ def _second_Y_axis_optimal(self, ax2, A_min, A_max):
ax2.set_ylim(A_min, A_max)
A_values = ax2.yaxis.get_ticklocs().round(7)
A_values = A_values[(A_values >= max(1, A_min)) & (A_values < A_max)]
if 1. not in A_values and A_min <= 1:
A_values = np.insert(A_values, 0, 1.)
is_integer = [mag.is_integer() for mag in A_values]
if all(is_integer):
labels = [f"{int(x):d}" for x in A_values]
Expand Down

0 comments on commit dff8bc5

Please sign in to comment.