Skip to content

Commit

Permalink
feat(telescope): remove deprecated caput cached_property
Browse files Browse the repository at this point in the history
  • Loading branch information
ljgray committed Aug 2, 2024
1 parent 2bc2e53 commit 2c6a9fc
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions drift/core/telescope.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import abc
import logging

from functools import cached_property
import numpy as np

from caput import cache
Expand Down Expand Up @@ -710,7 +710,7 @@ def _skip_baseline(self, bl_ind):
"""
return bl_ind in self.skip_baselines

@cache.cached_property
@cached_property
def included_freq(self) -> np.ndarray:
"""The frequency indices that *are* being calculated.
Expand All @@ -723,7 +723,7 @@ def included_freq(self) -> np.ndarray:
[ind for ind in range(self.nfreq) if not self._skip_freq(ind)], dtype=int
)

@cache.cached_property
@cached_property
def included_baseline(self) -> np.ndarray:
"""The baseline indices that *are* being calculated.
Expand All @@ -737,7 +737,7 @@ def included_baseline(self) -> np.ndarray:
dtype=int,
)

@cache.cached_property
@cached_property
def included_pol(self) -> np.ndarray:
"""The pol indices that *are* being calculated.
Expand Down Expand Up @@ -977,7 +977,7 @@ def _beam(self, feed_ind, freq_ind):

# ====== Properties to help with draco pipeline =====

@cache.cached_property
@cached_property
def prodstack(self):
"""Generate the results of a prodstack.
Expand All @@ -996,7 +996,7 @@ def prodstack(self):

return upairs.ravel().view(dtype)

@cache.cached_property
@cached_property
def index_map_prod(self):
"""Generate a *full triangle* `index_map/prod` like object.
Expand All @@ -1010,7 +1010,7 @@ def index_map_prod(self):

return tpairs.T.flatten().view(dtype)

@cache.cached_property
@cached_property
def index_map_stack(self):
"""Generate an `index_map/stack` like object.
Expand All @@ -1037,7 +1037,7 @@ def ind2tri(i, j, n):

return stack_map

@cache.cached_property
@cached_property
def reverse_map_stack(self):
"""Generate a `reverse_map/stack` like object.
Expand Down Expand Up @@ -1315,7 +1315,7 @@ def _transfer_single(self, bl_index, f_index, lmax, lside):

return btrans

@cache.cached_property
@cached_property
def included_pol(self) -> np.ndarray:
"""The included polarisation indices.
Expand Down

0 comments on commit 2c6a9fc

Please sign in to comment.