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

OPSIM-1184: use ra/dec to order series of observations in BlobSurvey #95

Merged
merged 1 commit into from
Sep 6, 2024
Merged
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
17 changes: 3 additions & 14 deletions rubin_scheduler/scheduler/surveys/surveys.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from rubin_scheduler.scheduler.surveys import BaseMarkovSurvey
from rubin_scheduler.scheduler.utils import empty_observation, int_binned_stat, order_observations
from rubin_scheduler.utils import _angular_separation, _approx_ra_dec2_alt_az, _hpid2_ra_dec, hp_grow_argsort
from rubin_scheduler.utils import _angular_separation, _hpid2_ra_dec, hp_grow_argsort


class GreedySurvey(BaseMarkovSurvey):
Expand Down Expand Up @@ -488,21 +488,10 @@ def generate_observations_rough(self, conditions):
# everything was nans, or self.nvisit_block was zero
return []

# Let's find the alt, az coords of the points (right now,
# hopefully doesn't change much in time block)
# Not sure why need to convert to alt,az before running TSP,
# but it does seem to be better.
pointing_alt, pointing_az = _approx_ra_dec2_alt_az(
self.fields["RA"][self.best_fields],
self.fields["dec"][self.best_fields],
conditions.site.latitude_rad,
conditions.site.longitude_rad,
conditions.mjd,
lmst=conditions.lmst,
better_order = order_observations(
self.fields["RA"][self.best_fields], self.fields["dec"][self.best_fields]
)

better_order = order_observations(pointing_az, pointing_alt)

# XXX-TODO: Could try to roll better_order to start at
# the nearest/fastest slew from current position.
observations = []
Expand Down
Loading