|
35 | 35 | from tobac.utils import decorators
|
36 | 36 |
|
37 | 37 | from tobac.utils import periodic_boundaries as pbc_utils
|
38 |
| -from tobac.utils.general import spectral_filtering |
39 |
| -from tobac.utils import get_statistics |
| 38 | +import tobac.utils |
| 39 | +import tobac.utils.general |
40 | 40 | import warnings
|
41 | 41 |
|
42 | 42 | # from typing_extensions import Literal
|
@@ -64,7 +64,9 @@ def feature_position(
|
64 | 64 | ) -> tuple[float]:
|
65 | 65 | """Determine feature position with regard to the horizontal
|
66 | 66 | dimensions in pixels from the identified region above
|
67 |
| - threshold values |
| 67 | + threshold values. |
| 68 | +
|
| 69 | + :hidden: |
68 | 70 |
|
69 | 71 | Parameters
|
70 | 72 | ----------
|
@@ -152,7 +154,8 @@ def feature_position(
|
152 | 154 | lies exactly between hdim1_max and hdim1_min, the output could be
|
153 | 155 | between hdim1_max and hdim1_max+1. While a value between hdim1_min-1
|
154 | 156 | and hdim1_min would also be valid, we choose to overflow on the max side of things.
|
155 |
| -
|
| 157 | + Notes |
| 158 | + ----- |
156 | 159 | """
|
157 | 160 |
|
158 | 161 | # First, if necessary, run PBC processing.
|
@@ -260,6 +263,8 @@ def test_overlap(
|
260 | 263 | ) -> bool:
|
261 | 264 | """Test for overlap between two regions
|
262 | 265 |
|
| 266 | + :hidden: |
| 267 | +
|
263 | 268 | Parameters
|
264 | 269 | ----------
|
265 | 270 | region_1 : list
|
@@ -292,6 +297,8 @@ def remove_parents(
|
292 | 297 | Remove features where its regions surround newly
|
293 | 298 | detected feature regions.
|
294 | 299 |
|
| 300 | + :hidden: |
| 301 | +
|
295 | 302 | Parameters
|
296 | 303 | ----------
|
297 | 304 | features_thresholds : pandas.DataFrame
|
@@ -406,6 +413,8 @@ def feature_detection_threshold(
|
406 | 413 | ) -> tuple[pd.DataFrame, dict]:
|
407 | 414 | """Find features based on individual threshold value.
|
408 | 415 |
|
| 416 | + :hidden: |
| 417 | +
|
409 | 418 | Parameters
|
410 | 419 | ----------
|
411 | 420 | data_i : np.array
|
@@ -925,6 +934,8 @@ def feature_detection_multithreshold_timestep(
|
925 | 934 | thresholds. Smoothing the input data with the Gaussian filter makes
|
926 | 935 | output less sensitive to noisiness of input data.
|
927 | 936 |
|
| 937 | + :hidden: |
| 938 | +
|
928 | 939 | Parameters
|
929 | 940 | ----------
|
930 | 941 |
|
@@ -1027,7 +1038,7 @@ def feature_detection_multithreshold_timestep(
|
1027 | 1038 |
|
1028 | 1039 | # spectrally filter the input data, if desired
|
1029 | 1040 | if wavelength_filtering is not None:
|
1030 |
| - track_data = spectral_filtering( |
| 1041 | + track_data = tobac.utils.general.spectral_filtering( |
1031 | 1042 | dxy, track_data, wavelength_filtering[0], wavelength_filtering[1]
|
1032 | 1043 | )
|
1033 | 1044 |
|
@@ -1144,7 +1155,7 @@ def feature_detection_multithreshold_timestep(
|
1144 | 1155 | # select which data to use according to statistics_unsmoothed option
|
1145 | 1156 | stats_data = data_i.values if statistics_unsmoothed else track_data
|
1146 | 1157 |
|
1147 |
| - features_thresholds = get_statistics( |
| 1158 | + features_thresholds = tobac.utils.get_statistics( |
1148 | 1159 | features_thresholds,
|
1149 | 1160 | labels,
|
1150 | 1161 | stats_data,
|
@@ -1188,6 +1199,7 @@ def feature_detection_multithreshold(
|
1188 | 1199 |
|
1189 | 1200 | The regions are above/below a threshold.
|
1190 | 1201 |
|
| 1202 | +
|
1191 | 1203 | Parameters
|
1192 | 1204 | ----------
|
1193 | 1205 | field_in : iris.cube.Cube or xarray.DataArray
|
@@ -1490,6 +1502,9 @@ def filter_min_distance(
|
1490 | 1502 | If two features are closer than `min_distance`, it keeps the
|
1491 | 1503 | larger feature.
|
1492 | 1504 |
|
| 1505 | + :hidden: |
| 1506 | +
|
| 1507 | +
|
1493 | 1508 | Parameters
|
1494 | 1509 | ----------
|
1495 | 1510 | features: pandas DataFrame
|
|
0 commit comments