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

tickets/PREOPS-5240: import get_baseline from rubin_sim instead of rubin_scheduler #92

Merged
merged 2 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
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
Binary file modified schedview/data/sample_opsim.db
Binary file not shown.
Binary file modified schedview/data/sample_rewards.h5
Binary file not shown.
Binary file modified schedview/data/sample_scheduler.pickle.xz
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/test_compute_maf.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import unittest

import numpy as np
from rubin_scheduler.data import get_baseline
from rubin_scheduler.utils import survey_start_mjd
from rubin_sim.data import get_baseline

from schedview.collect import read_opsim

Expand Down
2 changes: 1 addition & 1 deletion tests/test_compute_visits.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import numpy as np
from astropy.time import Time
from rubin_scheduler.data import get_baseline
from rubin_scheduler.utils import survey_start_mjd
from rubin_sim.data import get_baseline

import schedview.collect
import schedview.compute.visits
Expand Down
2 changes: 2 additions & 0 deletions tests/test_nightly.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from pathlib import Path
from tempfile import TemporaryDirectory

import astropy.utils.iers
import bokeh
import pandas as pd
from rubin_scheduler.scheduler.model_observatory import ModelObservatory
Expand Down Expand Up @@ -34,6 +35,7 @@ def _create_almanac(night):
class TestNightly(unittest.TestCase):
def test_plot_airmass_vs_time(self):
visits = _load_sample_visits()
astropy.utils.iers.conf.iers_degraded_accuracy = "ignore"
almanac_events = _create_almanac(visits["start_date"].dt.date[0])

fig = schedview.plot.nightly.plot_airmass_vs_time(visits, almanac_events)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_overhead.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import bokeh
from astropy.time import Time
from rubin_scheduler.data import get_baseline
from rubin_scheduler.utils import survey_start_mjd
from rubin_sim.data import get_baseline

import schedview.collect
import schedview.compute.visits
Expand Down
2 changes: 1 addition & 1 deletion tests/test_plot_cadence.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import bokeh.models.layouts
import numpy as np
from rubin_scheduler.data import get_baseline
from rubin_sim.data import get_baseline

import schedview.collect
import schedview.compute.visits
Expand Down
2 changes: 1 addition & 1 deletion tests/test_plot_survey.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import healpy as hp
import numpy as np
from astropy.time import Time
from rubin_scheduler.data import get_baseline
from rubin_scheduler.scheduler.model_observatory import ModelObservatory
from rubin_scheduler.utils import survey_start_mjd
from rubin_sim.data import get_baseline
from uranography.api import SphereMap

import schedview.collect
Expand Down
2 changes: 1 addition & 1 deletion tests/test_plot_visits.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import bokeh
from astropy.time import Time
from rubin_scheduler.data import get_baseline
from rubin_scheduler.utils import survey_start_mjd
from rubin_sim.data import get_baseline

import schedview.collect
import schedview.plot
Expand Down
2 changes: 1 addition & 1 deletion tests/test_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pandas as pd
from astropy.time import Time
from lsst.resources import ResourcePath
from rubin_scheduler.data import get_baseline
from rubin_sim.data import get_baseline

from schedview.collect.opsim import read_ddf_visits, read_opsim
from schedview.collect.resources import find_file_resources
Expand Down
Loading