Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix example16 residuals #114

Merged
merged 2 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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