-
Notifications
You must be signed in to change notification settings - Fork 13
Fixing issue with try-except block #2402
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
Fixing issue with try-except block #2402
Conversation
|
I've implemented the try-except block to catch possible failures in the computation of the systematic shifts. Note that now if either I'm done with this PR. Let's wait for the tests. Let me know if you spot anything silly or wrong. @scarlehoff @andrpie |
scarlehoff
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Make sure that the label is the right one!
| if with_shift: | ||
| ax.set_title( | ||
| "{} {} (unshifted)".format(info.dataset_label, info.group_label(samefig_vals, info.figure_by)) | ||
| ) | ||
| else: | ||
| ax.set_title( | ||
| "{} {}".format(info.dataset_label, info.group_label(samefig_vals, info.figure_by)) | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you swapped here shifted and unshifted ^^U
In any case, I would keep a single set_title and just set the string with the conditional like:
if with_shift:
shift_label = "(shifted)"
else:
shift_label = "(unshifted)"
ax.set_title(
"{} {} {}".format(info.dataset_label, info.group_label(samefig_vals, info.figure_by, shift_label))
)
This PR addresses #2399