From 672abbc2111aa6fd2c3f618f08dbbce38f936617 Mon Sep 17 00:00:00 2001 From: Sean Freeman Date: Mon, 21 Nov 2022 10:26:57 -0600 Subject: [PATCH] deprecate analysis functions from #146 --- tobac/analysis.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tobac/analysis.py b/tobac/analysis.py index d8651522..cfbb73b0 100644 --- a/tobac/analysis.py +++ b/tobac/analysis.py @@ -30,6 +30,7 @@ import numpy as np import logging import os +import warnings from .utils import mask_cell, mask_cell_surface, mask_cube_cell, get_bounding_box @@ -86,6 +87,11 @@ def cell_statistics_all( ------- None """ + warnings.warn( + "cell_statistics_all is depreciated and will be removed or significantly changed in v2.0.", + DeprecationWarning, + ) + if cell_selection is None: cell_selection = np.unique(track["cell"]) for cell in cell_selection: @@ -161,6 +167,11 @@ def cell_statistics( from iris.coords import AuxCoord from iris import Constraint, save + warnings.warn( + "cell_statistics is depreciated and will be removed or significantly changed in v2.0.", + DeprecationWarning, + ) + # If input is single cube, turn into cubelist if type(input_cubes) is Cube: input_cubes = CubeList([input_cubes]) @@ -313,6 +324,11 @@ def cog_cell( None """ + warnings.warn( + "cog_cell is depreciated and will be removed or significantly changed in v2.0.", + DeprecationWarning, + ) + from iris import Constraint logging.debug("Start calculating COG for " + str(cell))