Skip to main content

Tomate

Tool to Manipulate and Aggregate data

PyPI version Release status

Tomate is a Python package that provides ways to manipulate data under the form of multi-dimensional arrays. It manages multiples variables, as well as the coordinates along which those variables vary. It also provides multiple convenience functions to retrieve subparts of the data, do simple computations, or plot the data.

The data can be retrieved from disk, where it can be arranged in multiple ways and formats. Information on the data, such as variable attributes, or coordinates values can be retrieved automatically.

Features

For data in memory:

  • Keep information about the data, the variables, the coordinates. All this information is in sync with the data.
  • Select subparts of data easily, by index or by value.
  • Support for date & time dimensions.
  • Use and create convenience function for analysis, plotting,...

For data on disk:

  • Load data that spans multiple files and comes from different sources easily. Different file format ? different structure: rows or columns first ? indexing origin lower or upper ? a varying number of time steps for each file ? This is now all a breeze !
  • Scan the files automatically to find values of coordinates, variables attributes, data indexing,...
  • Load only subparts of data.
  • Logs will ensure you are loading what you want to load.

And in general:

  • Highly modulable, can be tailored to your needs.
  • Fully documented.

Get started up with a couple of lines and a NetCDF file:

from tomate.scan_library.nc import scan_file
db = scan_file("/your_file.nc")

print(db)
db.load()

For a simple showcase of some of Tomate capabilities, take a look at the get_started notebook.

Documentation

Documentation is available online at ReadTheDocs

Warning

As of now, this only supports NetCDF files out of the box. But the package can be easily extended for other file formats. See the section 'Expanding Tomate' of the documentation.

Only tested for linux.

The code has not been extensively tested for all the possible use cases it supports, and is evolving quickly. I recommend you check thorougly in the logs that the correct files are opened, and that the correct slices of data are taken from thoses files. See the documentation on logging for more information.

Features supplied in 'data_write', that allow to save a database information in a json file to avoid re-scanning it each time, is to be considered very experimental, (and is currently heavily out-of-date).

Requirements

Tomate requires python >=3.7. Tomate requires the following python packages:

  • numpy

Optional dependencies:

  • [time] cftime>=1.1.3 - To manage dates in time coordinates
  • [netcdf] netcdf4-python - To open netCDF4 files
  • [plot] matplotlib - To create plots easily
  • [compute] scipy - To do various computation on the data

Install

The package is distributed through PyPI. To install, run:

pip install tomate-data

To add optional dependencies:

pip install tomate-data [feature name]

Feature name can be Time, NetCDF, Plot, Compute.

The code is evolving quickly, it is recommended to upgrade it regurlarly:

pip install --upgrade tomate-data

Or to even install it directly from the development branch. This will place the package files in ./src, from where you just have to do a git pull to update from the latest commit:

pip install -e git+https://github.com/Descanonge/tomate.git@develop#egg=tomate-data

Metadata

Release files for tomate-data 2.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tomate-data 2.2.2
File Size Uploaded Provenance Actions
tomate-data-2.2.2.tar.gz 85.2 kB Without provenance Details for tomate-data-2.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tomate-data 2.2.2
File Interpreter ABI Platform Actions
tomate_data-2.2.2-py3-none-any.whl Python 3 none any Details for tomate_data-2.2.2-py3-none-any.whl

Total release size: 190.3 kB

Release files / tomate-data-2.2.2.tar.gz

Download URL tomate-data-2.2.2.tar.gz
Size 85.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a2d17c668a343f03335b8dac60f703d733ab5d1b3f4e9703ec21f4cdd2b90a24
BLAKE2b-256 checksum
How to use checksums
e3eb4ce22335772e4e23a25a3e2d0679d539c8309105fc7ada6e0f0ddcc4881d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.9

Release files / tomate_data-2.2.2-py3-none-any.whl

Download URL tomate_data-2.2.2-py3-none-any.whl
Size 105.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1996408bc77e0d503a25f7cd6ed89d18cc969b2fdcd15b708b8ad704742c274f
BLAKE2b-256 checksum
How to use checksums
b91923767e96d5ff731b1fb7edd72e4ea0d61e887f828d0b5d37bb5d1fc0206f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.9

Security for tomate-data 2.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page