Skip to content

Commit

Permalink
root out last rubin_sim references
Browse files Browse the repository at this point in the history
  • Loading branch information
yoachim committed Nov 8, 2023
1 parent 49c190e commit 7b066f7
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion rubin_scheduler/scheduler/features/conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def __init__(
-----------
nside : int
Healpix resolution. All maps are set to this reslution.
site : rubin_sim.Site object ('LSST')
site : rubin_scheduler.Site object ('LSST')
Contains static site-specific data (lat, lon, altitude, etc). Defaults to 'LSST'.
ra : np.array
A healpix array with the RA of each healpixel center (radians). Automatically
Expand Down
4 changes: 2 additions & 2 deletions rubin_scheduler/scheduler/surveys/base_survey.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def make_reward_df(self, conditions, accum=True):
Parameters
----------
conditions : `rubin_sim.scheduler.features.Conditions`
conditions : `rubin_scheduler.scheduler.features.Conditions`
Conditions for which rewards are to be returned
accum : `bool`
Include accumulated reward (more compute intensive)
Expand Down Expand Up @@ -412,7 +412,7 @@ class BaseMarkovSurvey(BaseSurvey):
Parameters
----------
basis_function : list of rubin_sim.schuler.basis_function objects
basis_function : list of rubin_scheduler.schuler.basis_function objects
basis_weights : list of float
Must be same length as basis_function
Expand Down
8 changes: 5 additions & 3 deletions rubin_scheduler/scheduler/surveys/generate_ddf_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@

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.
import rubin_sim.skybrightness as sb
from astroplan import Observer
from astropy.time import Time
from rubin_sim.data import get_data_dir
from rubin_sim.site_models.seeing_model import SeeingModel
from rubin_sim.utils import Site, ddf_locations, m5_flat_sed
from rubin_scheduler.data import get_data_dir
from rubin_scheduler.site_models.seeing_model import SeeingModel
from rubin_scheduler.utils import Site, ddf_locations, m5_flat_sed

if __name__ == "__main__":
# Generate a grid of airmass skybrightness values
Expand Down
2 changes: 1 addition & 1 deletion rubin_scheduler/scheduler/thomson/thomson_jit.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

import numpy as np
from numba import jit
from rubin_sim.utils import _angular_separation
from rubin_scheduler.utils import _angular_separation
from scipy.optimize import minimize


Expand Down
8 changes: 4 additions & 4 deletions rubin_scheduler/scheduler/training/training.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy as np
import rubin_sim.scheduler as fs
import rubin_sim.scheduler.Training as optional
from rubin_sim.speedObservatory import Speed_observatory
import rubin_scheduler.scheduler as fs
import rubin_scheduler.scheduler.Training as optional
from rubin_scheduler.model_observatory import ModelObservatory


class BlackTraining:
Expand Down Expand Up @@ -52,7 +52,7 @@ def target(self, x):
for survey in self.surveys:
survey.basis_weights = x
scheduler = fs.Core_scheduler_cost(self.surveys)
observatory = Speed_observatory()
observatory = ModelObservatory()
observatory, scheduler, observations = fs.sim_runner(
observatory, scheduler, survey_length=self.survey_length
)
Expand Down
2 changes: 1 addition & 1 deletion rubin_scheduler/scheduler/utils/sky_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def __init__(
self.low_dust = np.where(self.low_dust > smoothing_cutoff, 1, 0)

def read_dustmap(self, dustmap_file=None):
"""Read the dustmap from rubin_sim, in the appropriate resolution."""
"""Read the dustmap from rubin_scheduler, in the appropriate resolution."""
# Dustmap from rubin_sim_data
if dustmap_file is None:
datadir = rs_data.get_data_dir()
Expand Down
2 changes: 1 addition & 1 deletion rubin_scheduler/scheduler/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ def run_info_table(observatory, extra_info=None):
result[1]["Parameter"] = "hostname"
result[1]["Value"] = socket.gethostname()

result[2]["Parameter"] = "rubin_sim.__version__"
result[2]["Parameter"] = "rubin_scheduler.__version__"
result[2]["Value"] = rsVersion.__version__

result[3:]["Parameter"] = observatory_info[:, 0]
Expand Down

0 comments on commit 7b066f7

Please sign in to comment.