From 2c6a9fc42f7595054cbc157ce3de12356cfdaa11 Mon Sep 17 00:00:00 2001 From: Liam Gray Date: Fri, 2 Aug 2024 11:36:05 -0700 Subject: [PATCH] feat(telescope): remove deprecated caput cached_property --- drift/core/telescope.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drift/core/telescope.py b/drift/core/telescope.py index 269a753..cd65fe9 100644 --- a/drift/core/telescope.py +++ b/drift/core/telescope.py @@ -1,6 +1,6 @@ import abc import logging - +from functools import cached_property import numpy as np from caput import cache @@ -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. @@ -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. @@ -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. @@ -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. @@ -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. @@ -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. @@ -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. @@ -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.