Skip to content

Commit

Permalink
deprecate analysis functions from tobac-project#146
Browse files Browse the repository at this point in the history
  • Loading branch information
freemansw1 committed Nov 21, 2022
1 parent 7e961e6 commit 672abbc
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tobac/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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])
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 672abbc

Please sign in to comment.