tobac 1.6.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tobac-1.6.3/LICENSE +29 -0
- tobac-1.6.3/PKG-INFO +154 -0
- tobac-1.6.3/README.md +72 -0
- tobac-1.6.3/pyproject.toml +115 -0
- tobac-1.6.3/setup.cfg +4 -0
- tobac-1.6.3/tobac/__init__.py +110 -0
- tobac-1.6.3/tobac/analysis/__init__.py +31 -0
- tobac-1.6.3/tobac/analysis/cell_analysis.py +628 -0
- tobac-1.6.3/tobac/analysis/feature_analysis.py +212 -0
- tobac-1.6.3/tobac/analysis/spatial.py +619 -0
- tobac-1.6.3/tobac/centerofgravity.py +226 -0
- tobac-1.6.3/tobac/feature_detection.py +1757 -0
- tobac-1.6.3/tobac/merge_split.py +324 -0
- tobac-1.6.3/tobac/plotting.py +2321 -0
- tobac-1.6.3/tobac/segmentation/__init__.py +10 -0
- tobac-1.6.3/tobac/segmentation/watershed_segmentation.py +1322 -0
- tobac-1.6.3/tobac/testing.py +1179 -0
- tobac-1.6.3/tobac/tests/segmentation_tests/test_iris_xarray_segmentation.py +0 -0
- tobac-1.6.3/tobac/tests/segmentation_tests/test_segmentation.py +1225 -0
- tobac-1.6.3/tobac/tests/segmentation_tests/test_segmentation_time_pad.py +104 -0
- tobac-1.6.3/tobac/tests/test_analysis_spatial.py +1109 -0
- tobac-1.6.3/tobac/tests/test_convert.py +265 -0
- tobac-1.6.3/tobac/tests/test_datetime.py +216 -0
- tobac-1.6.3/tobac/tests/test_decorators.py +148 -0
- tobac-1.6.3/tobac/tests/test_feature_detection.py +1411 -0
- tobac-1.6.3/tobac/tests/test_generators.py +273 -0
- tobac-1.6.3/tobac/tests/test_import.py +24 -0
- tobac-1.6.3/tobac/tests/test_iris_xarray_match_utils.py +244 -0
- tobac-1.6.3/tobac/tests/test_merge_split.py +351 -0
- tobac-1.6.3/tobac/tests/test_pbc_utils.py +497 -0
- tobac-1.6.3/tobac/tests/test_sample_data.py +197 -0
- tobac-1.6.3/tobac/tests/test_testing.py +747 -0
- tobac-1.6.3/tobac/tests/test_tracking.py +714 -0
- tobac-1.6.3/tobac/tests/test_utils.py +650 -0
- tobac-1.6.3/tobac/tests/test_utils_bulk_statistics.py +789 -0
- tobac-1.6.3/tobac/tests/test_utils_coordinates.py +328 -0
- tobac-1.6.3/tobac/tests/test_utils_internal.py +185 -0
- tobac-1.6.3/tobac/tests/test_xarray_utils.py +232 -0
- tobac-1.6.3/tobac/tracking.py +613 -0
- tobac-1.6.3/tobac/utils/__init__.py +27 -0
- tobac-1.6.3/tobac/utils/bulk_statistics.py +360 -0
- tobac-1.6.3/tobac/utils/datetime.py +184 -0
- tobac-1.6.3/tobac/utils/decorators.py +540 -0
- tobac-1.6.3/tobac/utils/general.py +753 -0
- tobac-1.6.3/tobac/utils/generators.py +87 -0
- tobac-1.6.3/tobac/utils/internal/__init__.py +2 -0
- tobac-1.6.3/tobac/utils/internal/coordinates.py +486 -0
- tobac-1.6.3/tobac/utils/internal/iris_utils.py +462 -0
- tobac-1.6.3/tobac/utils/internal/label_props.py +82 -0
- tobac-1.6.3/tobac/utils/internal/xarray_utils.py +439 -0
- tobac-1.6.3/tobac/utils/mask.py +364 -0
- tobac-1.6.3/tobac/utils/periodic_boundaries.py +419 -0
- tobac-1.6.3/tobac/wrapper.py +244 -0
- tobac-1.6.3/tobac.egg-info/PKG-INFO +154 -0
- tobac-1.6.3/tobac.egg-info/SOURCES.txt +56 -0
- tobac-1.6.3/tobac.egg-info/dependency_links.txt +1 -0
- tobac-1.6.3/tobac.egg-info/requires.txt +53 -0
- tobac-1.6.3/tobac.egg-info/top_level.txt +1 -0
tobac-1.6.3/LICENSE
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019, climate-processes
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
* Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
tobac-1.6.3/PKG-INFO
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tobac
|
|
3
|
+
Version: 1.6.3
|
|
4
|
+
Summary: A package for identifying and tracking atmospheric phenomena
|
|
5
|
+
Author-email: Max Heikenfeld <max.heikenfeld@physics.ox.ac.uk>, William Jones <william.jones@physics.ox.ac.uk>, Fabian Senf <senf@tropos.de>, Sean Freeman <sean.freeman@uah.edu>, Julia Kukulies <kukulies@ucar.edu>, Kelcy Brunner <Kelcy.Brunner@ttu.edu>, Sven Starzer <sven.starzer@proton.me>
|
|
6
|
+
License: BSD-3-Clause
|
|
7
|
+
Project-URL: Homepage, http://github.com/tobac-project/tobac
|
|
8
|
+
Project-URL: Documentation, http://tobac.io
|
|
9
|
+
Project-URL: Issues, http://github.com/tobac-project/tobac/issues
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: Education
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
16
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
17
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
18
|
+
Classifier: Programming Language :: Python
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
26
|
+
Classifier: Topic :: Scientific/Engineering
|
|
27
|
+
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
|
|
28
|
+
Requires-Python: <3.14,>=3.9
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
License-File: LICENSE
|
|
31
|
+
Requires-Dist: numpy
|
|
32
|
+
Requires-Dist: scipy
|
|
33
|
+
Requires-Dist: scikit-image
|
|
34
|
+
Requires-Dist: scikit-learn
|
|
35
|
+
Requires-Dist: pandas<3
|
|
36
|
+
Requires-Dist: matplotlib
|
|
37
|
+
Requires-Dist: scitools-iris
|
|
38
|
+
Requires-Dist: xarray
|
|
39
|
+
Requires-Dist: cartopy
|
|
40
|
+
Requires-Dist: trackpy
|
|
41
|
+
Requires-Dist: typing_extensions
|
|
42
|
+
Provides-Extra: dev
|
|
43
|
+
Requires-Dist: pre-commit; extra == "dev"
|
|
44
|
+
Requires-Dist: black; extra == "dev"
|
|
45
|
+
Requires-Dist: pytest; extra == "dev"
|
|
46
|
+
Requires-Dist: nbconvert; extra == "dev"
|
|
47
|
+
Provides-Extra: examples
|
|
48
|
+
Requires-Dist: jupyter; extra == "examples"
|
|
49
|
+
Requires-Dist: notebook; extra == "examples"
|
|
50
|
+
Requires-Dist: pytables; extra == "examples"
|
|
51
|
+
Requires-Dist: s3fs; extra == "examples"
|
|
52
|
+
Requires-Dist: arm_pyart; extra == "examples"
|
|
53
|
+
Requires-Dist: seaborn; extra == "examples"
|
|
54
|
+
Requires-Dist: h5netcdf; extra == "examples"
|
|
55
|
+
Requires-Dist: rioxarray; extra == "examples"
|
|
56
|
+
Requires-Dist: numba; extra == "examples"
|
|
57
|
+
Requires-Dist: dask; extra == "examples"
|
|
58
|
+
Requires-Dist: intake==0.7.0; extra == "examples"
|
|
59
|
+
Requires-Dist: intake-xarray==0.7.0; extra == "examples"
|
|
60
|
+
Requires-Dist: healpix; extra == "examples"
|
|
61
|
+
Requires-Dist: easygems; extra == "examples"
|
|
62
|
+
Provides-Extra: all
|
|
63
|
+
Requires-Dist: pre-commit; extra == "all"
|
|
64
|
+
Requires-Dist: black; extra == "all"
|
|
65
|
+
Requires-Dist: pytest; extra == "all"
|
|
66
|
+
Requires-Dist: nbconvert; extra == "all"
|
|
67
|
+
Requires-Dist: jupyter; extra == "all"
|
|
68
|
+
Requires-Dist: notebook; extra == "all"
|
|
69
|
+
Requires-Dist: pytables; extra == "all"
|
|
70
|
+
Requires-Dist: s3fs; extra == "all"
|
|
71
|
+
Requires-Dist: arm_pyart; extra == "all"
|
|
72
|
+
Requires-Dist: seaborn; extra == "all"
|
|
73
|
+
Requires-Dist: h5netcdf; extra == "all"
|
|
74
|
+
Requires-Dist: rioxarray; extra == "all"
|
|
75
|
+
Requires-Dist: numba; extra == "all"
|
|
76
|
+
Requires-Dist: dask; extra == "all"
|
|
77
|
+
Requires-Dist: intake==0.7.0; extra == "all"
|
|
78
|
+
Requires-Dist: intake-xarray==0.7.0; extra == "all"
|
|
79
|
+
Requires-Dist: healpix; extra == "all"
|
|
80
|
+
Requires-Dist: easygems==0.1.2; extra == "all"
|
|
81
|
+
Dynamic: license-file
|
|
82
|
+
|
|
83
|
+
# tobac - Tracking and Object-based Analysis of Clouds
|
|
84
|
+
|
|
85
|
+
[](https://anaconda.org/conda-forge/tobac)[](https://anaconda.org/conda-forge/tobac)[](https://tobac.readthedocs.io/en/latest/?badge=latest)
|
|
86
|
+
|
|
87
|
+
## What is it?
|
|
88
|
+
|
|
89
|
+
_tobac_ is a Python package for identifiying, tracking and analysing of clouds and other meteorological phenomena in different types of gridded datasets. _tobac_ is unique in its ability to track phenomena using **any** variable on **any** grid, including radar data, satellite observations, and numerical model output. _tobac_ has been used in a variety of peer-reviewed [publications](https://tobac.readthedocs.io/en/latest/publications.html) and is an international, multi-institutional collaboration.
|
|
90
|
+
|
|
91
|
+
## Documentation
|
|
92
|
+
|
|
93
|
+
Individual features are identified as either maxima or minima in a two dimensional time varying field.
|
|
94
|
+
The volume/area associated with the identified objects can be determined based on a time-varying 2D or 3D field and a threshold value. The in thre tracking step, the identified objects are linked into consistent trajectories representing the cloud over its lifecycle.
|
|
95
|
+
|
|
96
|
+
Detailed documentation of the package can be found at https://tobac.readthedocs.io.
|
|
97
|
+
|
|
98
|
+
Release announcements, workshop and conference announcements, and other information of interest to the broader _tobac_ users group are sent to the [tobac core group](https://groups.google.com/g/tobac/about) mailing list. If you are interested in contributing to the development of _tobac_, we invite you to join the [tobac developers](https://groups.google.com/u/1/g/tobac-developers) mailing list. Information on monthly developers' meetings and other developer discussion and announcements are sent to that list.
|
|
99
|
+
|
|
100
|
+
We also have a Slack server for both users and developers. For information on joining that, please contact the _tobac_ developers mailing list, or see the information in the _tobac_ release notes sent to the _tobac_ mailing list.
|
|
101
|
+
|
|
102
|
+
## Installation
|
|
103
|
+
|
|
104
|
+
tobac requires Python 3, and support for Python versions before 3.9 (i.e., 3.8 and lower) is deprecated and will be removed in tobac version 1.6.
|
|
105
|
+
|
|
106
|
+
The easiest way is to install the most recent version of tobac via conda and the conda-forge channel:
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
conda install -c conda-forge tobac
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
This will take care of all necessary dependencies and should do the job for most users and also allows for an easy update of the installation by
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
conda update -c conda-forge tobac
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
You can also install conda via git, either for development purposes or to use specific development branches for the Github repository.
|
|
119
|
+
|
|
120
|
+
If you are using anaconda, the following command from within the cloned repository should make sure all dependencies are met and up to date:
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
conda install -c conda-forge --yes --file requirements.txt
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
You can directly install the package directly from github with pip and either of the two following commands:
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
pip install --upgrade git+ssh://git@github.com/tobac-project/tobac.git
|
|
130
|
+
pip install --upgrade git+https://github.com/tobac-project/tobac.git
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
You can also clone the package with any of the two following commands
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
git clone git@github.com:tobac-project/tobac.git
|
|
137
|
+
git clone https://github.com/tobac-project/tobac.git
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
and install the package from the locally cloned version:
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
pip install tobac/
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Contributing
|
|
147
|
+
|
|
148
|
+
We encourage bug reports, questions, and code contributions. For more details on contributing, please see https://github.com/tobac-project/tobac/blob/v2.0-dev/CONTRIBUTING.md
|
|
149
|
+
|
|
150
|
+
We are currently in a transition phase between versions 1.x and 2.x. v2.x will enable the use of multiple tracking methods (including TINT) and will use xarray for gridded data instead of Iris. Preliminary development on v2.x has taken place on the `v2.0-dev` branch, while work on the `main` and `RC_v1.x.x` branches (containing v1.x development) is ongoing to unify these development efforts.
|
|
151
|
+
|
|
152
|
+
## Roadmap
|
|
153
|
+
|
|
154
|
+
A roadmap for the future development of tobac is available here: https://github.com/tobac-project/tobac-roadmap/blob/master/tobac-roadmap-main.md
|
tobac-1.6.3/README.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# tobac - Tracking and Object-based Analysis of Clouds
|
|
2
|
+
|
|
3
|
+
[](https://anaconda.org/conda-forge/tobac)[](https://anaconda.org/conda-forge/tobac)[](https://tobac.readthedocs.io/en/latest/?badge=latest)
|
|
4
|
+
|
|
5
|
+
## What is it?
|
|
6
|
+
|
|
7
|
+
_tobac_ is a Python package for identifiying, tracking and analysing of clouds and other meteorological phenomena in different types of gridded datasets. _tobac_ is unique in its ability to track phenomena using **any** variable on **any** grid, including radar data, satellite observations, and numerical model output. _tobac_ has been used in a variety of peer-reviewed [publications](https://tobac.readthedocs.io/en/latest/publications.html) and is an international, multi-institutional collaboration.
|
|
8
|
+
|
|
9
|
+
## Documentation
|
|
10
|
+
|
|
11
|
+
Individual features are identified as either maxima or minima in a two dimensional time varying field.
|
|
12
|
+
The volume/area associated with the identified objects can be determined based on a time-varying 2D or 3D field and a threshold value. The in thre tracking step, the identified objects are linked into consistent trajectories representing the cloud over its lifecycle.
|
|
13
|
+
|
|
14
|
+
Detailed documentation of the package can be found at https://tobac.readthedocs.io.
|
|
15
|
+
|
|
16
|
+
Release announcements, workshop and conference announcements, and other information of interest to the broader _tobac_ users group are sent to the [tobac core group](https://groups.google.com/g/tobac/about) mailing list. If you are interested in contributing to the development of _tobac_, we invite you to join the [tobac developers](https://groups.google.com/u/1/g/tobac-developers) mailing list. Information on monthly developers' meetings and other developer discussion and announcements are sent to that list.
|
|
17
|
+
|
|
18
|
+
We also have a Slack server for both users and developers. For information on joining that, please contact the _tobac_ developers mailing list, or see the information in the _tobac_ release notes sent to the _tobac_ mailing list.
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
tobac requires Python 3, and support for Python versions before 3.9 (i.e., 3.8 and lower) is deprecated and will be removed in tobac version 1.6.
|
|
23
|
+
|
|
24
|
+
The easiest way is to install the most recent version of tobac via conda and the conda-forge channel:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
conda install -c conda-forge tobac
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
This will take care of all necessary dependencies and should do the job for most users and also allows for an easy update of the installation by
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
conda update -c conda-forge tobac
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
You can also install conda via git, either for development purposes or to use specific development branches for the Github repository.
|
|
37
|
+
|
|
38
|
+
If you are using anaconda, the following command from within the cloned repository should make sure all dependencies are met and up to date:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
conda install -c conda-forge --yes --file requirements.txt
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
You can directly install the package directly from github with pip and either of the two following commands:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
pip install --upgrade git+ssh://git@github.com/tobac-project/tobac.git
|
|
48
|
+
pip install --upgrade git+https://github.com/tobac-project/tobac.git
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
You can also clone the package with any of the two following commands
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
git clone git@github.com:tobac-project/tobac.git
|
|
55
|
+
git clone https://github.com/tobac-project/tobac.git
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
and install the package from the locally cloned version:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
pip install tobac/
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Contributing
|
|
65
|
+
|
|
66
|
+
We encourage bug reports, questions, and code contributions. For more details on contributing, please see https://github.com/tobac-project/tobac/blob/v2.0-dev/CONTRIBUTING.md
|
|
67
|
+
|
|
68
|
+
We are currently in a transition phase between versions 1.x and 2.x. v2.x will enable the use of multiple tracking methods (including TINT) and will use xarray for gridded data instead of Iris. Preliminary development on v2.x has taken place on the `v2.0-dev` branch, while work on the `main` and `RC_v1.x.x` branches (containing v1.x development) is ongoing to unify these development efforts.
|
|
69
|
+
|
|
70
|
+
## Roadmap
|
|
71
|
+
|
|
72
|
+
A roadmap for the future development of tobac is available here: https://github.com/tobac-project/tobac-roadmap/blob/master/tobac-roadmap-main.md
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "tobac"
|
|
7
|
+
version = "1.6.3"
|
|
8
|
+
authors = [
|
|
9
|
+
{ name="Max Heikenfeld", email="max.heikenfeld@physics.ox.ac.uk" },
|
|
10
|
+
{ name="William Jones", email="william.jones@physics.ox.ac.uk" },
|
|
11
|
+
{ name="Fabian Senf", email="senf@tropos.de" },
|
|
12
|
+
{ name="Sean Freeman", email="sean.freeman@uah.edu" },
|
|
13
|
+
{ name="Julia Kukulies", email="kukulies@ucar.edu" },
|
|
14
|
+
{ name="Kelcy Brunner", email="Kelcy.Brunner@ttu.edu" },
|
|
15
|
+
{ name="Sven Starzer", email="sven.starzer@proton.me"}
|
|
16
|
+
]
|
|
17
|
+
description = "A package for identifying and tracking atmospheric phenomena"
|
|
18
|
+
readme = "README.md"
|
|
19
|
+
requires-python = ">=3.9,<3.14"
|
|
20
|
+
license = {text = "BSD-3-Clause"}
|
|
21
|
+
classifiers = [
|
|
22
|
+
"Development Status :: 5 - Production/Stable",
|
|
23
|
+
"Environment :: Console",
|
|
24
|
+
"Intended Audience :: Education",
|
|
25
|
+
"Intended Audience :: Science/Research",
|
|
26
|
+
"Intended Audience :: Developers",
|
|
27
|
+
"Operating System :: POSIX :: Linux",
|
|
28
|
+
"Operating System :: MacOS :: MacOS X",
|
|
29
|
+
"Operating System :: Microsoft :: Windows",
|
|
30
|
+
"Programming Language :: Python",
|
|
31
|
+
"Programming Language :: Python :: 3",
|
|
32
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
33
|
+
"Programming Language :: Python :: 3.9",
|
|
34
|
+
"Programming Language :: Python :: 3.10",
|
|
35
|
+
"Programming Language :: Python :: 3.11",
|
|
36
|
+
"Programming Language :: Python :: 3.12",
|
|
37
|
+
"Programming Language :: Python :: 3.13",
|
|
38
|
+
"Topic :: Scientific/Engineering",
|
|
39
|
+
"Topic :: Scientific/Engineering :: Atmospheric Science",
|
|
40
|
+
]
|
|
41
|
+
|
|
42
|
+
# always required
|
|
43
|
+
dependencies = [
|
|
44
|
+
"numpy",
|
|
45
|
+
"scipy",
|
|
46
|
+
"scikit-image",
|
|
47
|
+
"scikit-learn",
|
|
48
|
+
"pandas<3",
|
|
49
|
+
"matplotlib",
|
|
50
|
+
"scitools-iris",
|
|
51
|
+
"xarray",
|
|
52
|
+
"cartopy",
|
|
53
|
+
"trackpy",
|
|
54
|
+
"typing_extensions",
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
[project.optional-dependencies]
|
|
58
|
+
# required for development
|
|
59
|
+
dev = [
|
|
60
|
+
"pre-commit",
|
|
61
|
+
"black",
|
|
62
|
+
"pytest",
|
|
63
|
+
"nbconvert",
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
# required to run example notebooks
|
|
67
|
+
examples = [
|
|
68
|
+
"jupyter",
|
|
69
|
+
"notebook",
|
|
70
|
+
"pytables",
|
|
71
|
+
"s3fs",
|
|
72
|
+
"arm_pyart",
|
|
73
|
+
"seaborn",
|
|
74
|
+
"h5netcdf",
|
|
75
|
+
"rioxarray",
|
|
76
|
+
"numba",
|
|
77
|
+
"dask",
|
|
78
|
+
"intake==0.7.0",
|
|
79
|
+
"intake-xarray==0.7.0",
|
|
80
|
+
"healpix",
|
|
81
|
+
"easygems",
|
|
82
|
+
]
|
|
83
|
+
|
|
84
|
+
# All extras combined
|
|
85
|
+
all = [
|
|
86
|
+
"pre-commit",
|
|
87
|
+
"black",
|
|
88
|
+
"pytest",
|
|
89
|
+
"nbconvert",
|
|
90
|
+
"jupyter",
|
|
91
|
+
"notebook",
|
|
92
|
+
"pytables",
|
|
93
|
+
"s3fs",
|
|
94
|
+
"arm_pyart",
|
|
95
|
+
"seaborn",
|
|
96
|
+
"h5netcdf",
|
|
97
|
+
"rioxarray",
|
|
98
|
+
"numba",
|
|
99
|
+
"dask",
|
|
100
|
+
"intake==0.7.0",
|
|
101
|
+
"intake-xarray==0.7.0",
|
|
102
|
+
"healpix",
|
|
103
|
+
"easygems==0.1.2",
|
|
104
|
+
]
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
[project.urls]
|
|
108
|
+
Homepage = "http://github.com/tobac-project/tobac"
|
|
109
|
+
Documentation = "http://tobac.io"
|
|
110
|
+
Issues = "http://github.com/tobac-project/tobac/issues"
|
|
111
|
+
|
|
112
|
+
[tool.setuptools.packages.find]
|
|
113
|
+
where = ["."]
|
|
114
|
+
include = ["tobac*"]
|
|
115
|
+
exclude = ["tmp*"]
|
tobac-1.6.3/setup.cfg
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# from .tracking import maketrack
|
|
2
|
+
import sys
|
|
3
|
+
|
|
4
|
+
if sys.version_info < (3, 7):
|
|
5
|
+
warning = """ \n\n
|
|
6
|
+
Support for Python versions less than 3.7 is deprecated.
|
|
7
|
+
Version 1.5 of tobac will require Python 3.7 or later.
|
|
8
|
+
Python {py} detected. \n\n
|
|
9
|
+
""".format(py=".".join(str(v) for v in sys.version_info[:3]))
|
|
10
|
+
|
|
11
|
+
print(warning)
|
|
12
|
+
|
|
13
|
+
from tobac.segmentation.watershed_segmentation import (
|
|
14
|
+
segmentation_3D,
|
|
15
|
+
segmentation_2D,
|
|
16
|
+
watershedding_3D,
|
|
17
|
+
watershedding_2D,
|
|
18
|
+
)
|
|
19
|
+
from .centerofgravity import (
|
|
20
|
+
calculate_cog,
|
|
21
|
+
calculate_cog_untracked,
|
|
22
|
+
calculate_cog_domain,
|
|
23
|
+
)
|
|
24
|
+
from .plotting import (
|
|
25
|
+
plot_tracks_mask_field,
|
|
26
|
+
plot_tracks_mask_field_loop,
|
|
27
|
+
plot_mask_cell_track_follow,
|
|
28
|
+
plot_mask_cell_track_static,
|
|
29
|
+
plot_mask_cell_track_static_timeseries,
|
|
30
|
+
plot_lifetime_histogram,
|
|
31
|
+
plot_lifetime_histogram_bar,
|
|
32
|
+
plot_histogram_cellwise,
|
|
33
|
+
plot_histogram_featurewise,
|
|
34
|
+
plot_mask_cell_track_3Dstatic,
|
|
35
|
+
plot_mask_cell_track_2D3Dstatic,
|
|
36
|
+
plot_mask_cell_individual_static,
|
|
37
|
+
plot_mask_cell_individual_3Dstatic,
|
|
38
|
+
animation_mask_field,
|
|
39
|
+
make_map,
|
|
40
|
+
map_tracks,
|
|
41
|
+
)
|
|
42
|
+
from tobac.analysis.cell_analysis import (
|
|
43
|
+
cell_statistics,
|
|
44
|
+
cog_cell,
|
|
45
|
+
lifetime_histogram,
|
|
46
|
+
histogram_cellwise,
|
|
47
|
+
velocity_histogram,
|
|
48
|
+
calculate_overlap,
|
|
49
|
+
)
|
|
50
|
+
from tobac.analysis.feature_analysis import (
|
|
51
|
+
histogram_featurewise,
|
|
52
|
+
calculate_nearestneighbordistance,
|
|
53
|
+
nearestneighbordistance_histogram,
|
|
54
|
+
area_histogram,
|
|
55
|
+
)
|
|
56
|
+
from tobac.analysis.spatial import (
|
|
57
|
+
calculate_velocity,
|
|
58
|
+
calculate_distance,
|
|
59
|
+
calculate_area,
|
|
60
|
+
)
|
|
61
|
+
from .utils.mask import (
|
|
62
|
+
mask_cell,
|
|
63
|
+
mask_cell_surface,
|
|
64
|
+
mask_cube_cell,
|
|
65
|
+
mask_cube_untracked,
|
|
66
|
+
mask_cube,
|
|
67
|
+
column_mask_from2D,
|
|
68
|
+
mask_features,
|
|
69
|
+
mask_features_surface,
|
|
70
|
+
mask_cube_features,
|
|
71
|
+
)
|
|
72
|
+
from .utils.general import (
|
|
73
|
+
get_bounding_box,
|
|
74
|
+
add_coordinates,
|
|
75
|
+
get_spacings,
|
|
76
|
+
)
|
|
77
|
+
from .feature_detection import feature_detection_multithreshold
|
|
78
|
+
from .tracking import linking_trackpy
|
|
79
|
+
from .wrapper import maketrack
|
|
80
|
+
from .wrapper import tracking_wrapper
|
|
81
|
+
from . import merge_split
|
|
82
|
+
import importlib.metadata
|
|
83
|
+
import pathlib
|
|
84
|
+
|
|
85
|
+
# default version number
|
|
86
|
+
__version__ = "unknown_dev_version"
|
|
87
|
+
|
|
88
|
+
# Set version number
|
|
89
|
+
# This version should work without needing the package installed
|
|
90
|
+
try:
|
|
91
|
+
__version__ = importlib.metadata.version(__package__ or __name__)
|
|
92
|
+
except importlib.metadata.PackageNotFoundError:
|
|
93
|
+
# need to get version directly from text file
|
|
94
|
+
try:
|
|
95
|
+
import tomllib
|
|
96
|
+
|
|
97
|
+
pyproject_toml_file_name = (
|
|
98
|
+
pathlib.Path(__file__).parent.parent / "pyproject.toml"
|
|
99
|
+
)
|
|
100
|
+
if pyproject_toml_file_name.exists() and pyproject_toml_file_name.is_file():
|
|
101
|
+
with open(pyproject_toml_file_name, "rb") as f:
|
|
102
|
+
toml_data = tomllib.load(f)
|
|
103
|
+
if "project" in toml_data and "version" in toml_data["project"]:
|
|
104
|
+
__version__ = toml_data["project"]["version"]
|
|
105
|
+
|
|
106
|
+
except ImportError:
|
|
107
|
+
# on python <3.11 but not installing tobac.
|
|
108
|
+
# don't bother giving precise version number.
|
|
109
|
+
__version__ = "unknown_dev_version"
|
|
110
|
+
pass
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"""Provide tools to analyse and visualize the tracked objects.
|
|
2
|
+
This module provides a set of routines that enables performing analyses
|
|
3
|
+
and deriving statistics for individual tracks, such as the time series
|
|
4
|
+
of integrated properties and vertical profiles. It also provides
|
|
5
|
+
routines to calculate summary statistics of the entire population of
|
|
6
|
+
tracked features in the field like histograms of areas/volumes
|
|
7
|
+
or mass and a detailed cell lifetime analysis. These analysis
|
|
8
|
+
routines are all built in a modular manner. Thus, users can reuse the
|
|
9
|
+
most basic methods for interacting with the data structure of the
|
|
10
|
+
package in their own analysis procedures in Python. This includes
|
|
11
|
+
functions performing simple tasks like looping over all identified
|
|
12
|
+
objects or trajectories and masking arrays for the analysis of
|
|
13
|
+
individual features. Plotting routines include both visualizations
|
|
14
|
+
for individual convective cells and their properties. [1]_
|
|
15
|
+
|
|
16
|
+
References
|
|
17
|
+
----------
|
|
18
|
+
.. Heikenfeld, M., Marinescu, P. J., Christensen, M.,
|
|
19
|
+
Watson-Parris, D., Senf, F., van den Heever, S. C.
|
|
20
|
+
& Stier, P. (2019). tobac 1.2: towards a flexible
|
|
21
|
+
framework for tracking and analysis of clouds in
|
|
22
|
+
diverse datasets. Geoscientific Model Development,
|
|
23
|
+
12(11), 4551-4570.
|
|
24
|
+
|
|
25
|
+
Notes
|
|
26
|
+
-----
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
from tobac.analysis.cell_analysis import *
|
|
30
|
+
from tobac.analysis.feature_analysis import *
|
|
31
|
+
from tobac.analysis.spatial import *
|