Skip to content

Commit

Permalink
Fix more deprecated basis functions
Browse files Browse the repository at this point in the history
  • Loading branch information
rhiannonlynne committed Sep 5, 2024
1 parent 18f78cd commit 4199c9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rubin_scheduler/scheduler/basis_functions/mask_basis_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def __init__(

self.min_alt = np.radians(min_alt)
self.max_alt = np.radians(max_alt)
self.ra, self.dec = _hpid2_ra_dec(nside, np.arange(hp.nside2npix(nside)))
self.ra, self.dec = _hpid2_ra_dec(self.nside, np.arange(hp.nside2npix(self.nside)))
self.shadow_minutes = np.radians(shadow_minutes / 60.0 * 360.0 / 24.0)
# Compute the declination band where things could drift into zenith
self.decband = np.zeros(self.dec.size, dtype=float)
Expand Down Expand Up @@ -486,7 +486,7 @@ def __init__(self, nside=None, out_of_bounds_val=np.nan, az_min=0.0, az_max=180.
self.az_max = IntRounded(np.radians(az_max))
self.out_of_bounds_val = out_of_bounds_val
self.result = np.ones(hp.nside2npix(self.nside))
send_unused_deprecation_warning()
send_unused_deprecation_warning(self.__class__.__name__)

def _calc_value(self, conditions, indx=None):
to_mask = np.where(
Expand Down
1 change: 1 addition & 0 deletions tests/scheduler/test_basisfuncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ def test_deprecated(self):
basis_functions.MaskAzimuthBasisFunction,
]
for dep_bf in deprecated_basis_functions:
print(dep_bf)
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
dep_bf()
Expand Down

0 comments on commit 4199c9a

Please sign in to comment.