Skip to content

Commit

Permalink
add utils data
Browse files Browse the repository at this point in the history
  • Loading branch information
yoachim committed Nov 2, 2023
1 parent e40a7ea commit e191362
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions rubin_scheduler/data/scheduler_download_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def data_dict():
"scheduler": "scheduler_2023_10_16.tgz",
"site_models": "site_models_2023_10_02.tgz",
"skybrightness_pre": "skybrightness_pre_2023_10_17.tgz",
"utils": "utils_2023_11_02.tgz",
}
return file_dict

Expand Down
2 changes: 1 addition & 1 deletion rubin_scheduler/utils/camera_footprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class LsstCameraFootprint:

def __init__(self, units="degrees", footprint_file=None):
if footprint_file is None:
footprint_file = os.path.join(get_data_dir(), "maf", "fov_map.npz")
footprint_file = os.path.join(get_data_dir(), "utils", "fov_map.npz")
_temp = np.load(footprint_file)
# Units refers to the incoming ra/dec values in the _call__ method
# Internally, radians are used to calculate the footprint
Expand Down
3 changes: 0 additions & 3 deletions tests/utils/test_camerafootprint.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import os
import unittest

import numpy as np

from rubin_scheduler.data import get_data_dir
from rubin_scheduler.utils import LsstCameraFootprint


Expand All @@ -18,7 +16,6 @@ def setUp(self):
def test_camera(self):
camera = LsstCameraFootprint(
units="degrees",
footprint_file=os.path.join(get_data_dir(), "tests", "fov_map.npz"),
)
idx_obs = camera(self.obj_ra, self.obj_dec, self.obs_ra, self.obs_dec, self.obs_rot_sky_pos)
# The first of these objects should be in the middle of the FOV, while the second is outside
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/test_trixel.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ def test_against_fatboy(self):
"""
dtype = np.dtype([("htmid", int), ("ra", float), ("dec", float)])
data = np.genfromtxt(
os.path.join(get_data_dir(), "tests", "testData", "htmid_test_data.txt"),
os.path.join(get_data_dir(), "utils", "htmid_test_data.txt"),
dtype=dtype,
)
self.assertGreater(len(data), 20)
Expand Down

0 comments on commit e191362

Please sign in to comment.