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-1093: feature. Migration from rubin_sim. #5

Merged
merged 24 commits into from
Nov 8, 2023
Merged

Conversation

yoachim
Copy link
Member

@yoachim yoachim commented Nov 7, 2023

Big migration of code from rubin_sim to rubin_scheduler including data, scheduler, site_models, skybrightness_pre, and utils along with relevant unit tests.

Several things from utils were deprecated (ObservationMetadata, time_handler, etc).

Dependencies on palpy were removed and coordinate conversions were swapped to use astropy.

The zernike tools in skybrightness_pre were not migrated as they had lots of palpy calls and unit tests that depended on outdated skybrightness files. It can be migrated later if wanted.

@rhiannonlynne
Copy link
Member

There are a few files here still importing from rubin_sim, which needs either updates or moving or deleting.

scheduler/detailers/vary_exptime may be problematic (?)
scheduler/features/conditions.py just needs a docstring update
scheduler/survey/base_survey just needs a docstring update
scheduler/surveys/ddf_sched just needs a docstring update
scheduler/surveys/generate_ddf_grid may be problematic (??)
scheduler/thomson/thomson.jit.py - just an import update
scheduler/training/training.py - just an import update
scheduler/utils/sky_area.py just a few docstring updates
scheduler/utils/utils.py an update for rubin_scheduler.version
skybrightness_pre/data/generate_dark_sky.py just an import update
skybrightness_pre/data/generate_hdf5.py should probably just move to rubin_sim.skybrightness and formalize the expected output API for the hdf5 files / input API for skybrightness_pre

@rhiannonlynne
Copy link
Member

It would be awesome if there was a way to more easily see what changed or not between the rubin_sim contents and the contents that moved here, but it seems like it's hanging together. A test example of the scheduler output between the two versions would be nice to confirm, not sure if you had other ideas.

Copy link
Member

@rhiannonlynne rhiannonlynne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are just a few more things to clean up, but this looks pretty good!

requirements.txt Outdated Show resolved Hide resolved
rubin_scheduler/skybrightness_pre/data/generate_hdf5.py Outdated Show resolved Hide resolved
@@ -3,12 +3,16 @@

import astropy.units as u
import numpy as np

# Technically this script should be over in rubin_sim, but here to be more
# easily found.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to leave a test in rubin_sim?
I can’t tell if having this here will lead to problems with for example building docs, because rubin_sim won’t be available, but I guess we can try to solve that if it comes up. I agree that it’s nice to have it bundled here with the actual scheduler.

@yoachim yoachim merged commit 84c9a42 into main Nov 8, 2023
5 of 7 checks passed
@rhiannonlynne rhiannonlynne deleted the tickets/OPSIM-1093 branch November 14, 2023 22:24
@rhiannonlynne rhiannonlynne changed the title Tickets/opsim 1093 OPSIM-1093: feature. Migration from rubin_sim. Jan 24, 2024
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.

2 participants