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

AltitudeConstraint: Adjust max_best_rescale() to prevent unexpected output #551

Merged
merged 2 commits into from
Jul 27, 2023

Conversation

michaelbaisch
Copy link
Contributor

In previous versions, when setting the max parameter for altitude, max_best_rescale() would return 1.0 if the altitude exceeded the maximum limit. This behavior was unexpected.

To rectify this, the greater_than_max argument in max_best_rescale() has been set to 0. This adjustment ensures that the output aligns with expectations when the altitude surpasses the specified maximum constraint.

…utput

In previous versions, when setting the max parameter for altitude, max_best_rescale() would return 1.0
if the altitude exceeded the maximum limit. This behavior was unexpected.

To rectify this, the greater_than_max argument in max_best_rescale() has been set to 0.
This adjustment ensures that the output aligns with expectations when the altitude
surpasses the specified maximum constraint.
@wtgee
Copy link
Contributor

wtgee commented Jun 2, 2023

Hi @michaelbaisch, thanks for the PR. LGTM, but if you have time to write a specific test that would be even better! :)

@bmorris3 bmorris3 merged commit 2e6c766 into astropy:main Jul 27, 2023
@bmorris3
Copy link
Contributor

Thanks @michaelbaisch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants