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

Remove deprecated caput.cached_property #120

Merged
merged 1 commit into from
Aug 2, 2024
Merged
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
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 @@ -689,7 +689,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 @@ -702,7 +702,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 @@ -716,7 +716,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 @@ -958,7 +958,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 @@ -977,7 +977,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 @@ -991,7 +991,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 @@ -1018,7 +1018,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 @@ -1296,7 +1296,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