-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
Add origin_mismatch
option to constraints on angular separations
#598
Comments
Here is a code to reproduce the issue. import astropy.units as u
from astroplan import (
FixedTarget,
MoonSeparationConstraint,
Observer,
time_grid_from_range,
)
from astropy.time import Time
# Define the observer location
observer = Observer.at_site("subaru")
# Define the time of observation
# time = Time("2024-11-01 06:00:00")
time = time_grid_from_range(
Time(["2024-11-01 06:00:00", "2024-11-2 12:00:00"]), time_resolution=1 * u.hour
)
# Define Altair's position
altair = FixedTarget.from_name("Altair")
is_moon_sep = MoonSeparationConstraint(min=30 * u.deg).compute_constraint(
time, observer, altair
)
print(is_moon_sep) The output looks like the following:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As noted in the astropy document, a warning is emitted if the coordinate transformation can cause the angular separation value to be order-dependent.
https://docs.astropy.org/en/stable/coordinates/common_errors.html#object-separation
This warning can be very long when supplying a time or a target array with many elements. I'd like to have the
origin_mismatch
option withwarn
as the default for these constraints class related to object separations.Apparently, only sun and moon constraints needs to be updated, so changes will be small. However, I'm not sure which place is the best location to do this. For example, one can set at the initialization of the class object or at
compute_constraint()
for each actrual calculation.The text was updated successfully, but these errors were encountered: