Skip to main content

Dataset suite (dataset-suite)

Store scientific data in HDF5 files, but with pleasant Python bindings!

A general data handling toolkit with a powerful class for abstracting away work with multidimensional set.

Parts of this code were created as part of PhD work supported by the EU ITN EID project CORAL (GA no. 859841).

Installation

You can install this package from pip:

pip install dataset-suite

Once installed, all useful functions are in the top-level module:

import dataset_suite as ds

Basic usage

A short introduction to using the library:

import dataset_suite as ds

# Create a dataset out of a set of spectra
data = ds.dataset(
    array,
    index=np.arange(array.shape[0]) # A basic numerical index
    wavelength=spectrometer.wavelength # You can store a numpy array as an axis descriptor
    # alongside your data. This way you know that the second axis of this dataset is a
    # "wavelength", and what wavelength corresponds to each datapoint
)
data.metadata["comment"] = "afternoon spectra"
# Save the dataset to a HDF5 file
data.save_h5("file.h5")
# Load a dataset from a file
data = ds.load_h5('file.h5')
# inspect the dataset - what axes does it have?
print(data)
# dataset(index[10], wavelength[100])

data.raw # access the underlying numpy array
data.wl # use axis names as attributes to get the values for a given axis,
#         like wavelength here
data.wl[10] # this is the wavelength corresponding to the 10th column of the array
data.take(index=5) # slice along the index axis: dataset(wavelength[100])
data.take_sum("wavelength") # sum along the wavelength axis: dataset(index[10])
data.metadata # dictionary of measurement metadata

The library also includes some convenient helpers like a function mapping values to colours using matplotlib colormaps, and a number of filename search/analysis tools. Have a look at https://dataset-suite.readthedocs.io/en/latest/api.html

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dataset_suite-0.4.0.tar.gz (126.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dataset_suite-0.4.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file dataset_suite-0.4.0.tar.gz.

File metadata

  • Download URL: dataset_suite-0.4.0.tar.gz
  • Upload date:
  • Size: 126.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for dataset_suite-0.4.0.tar.gz
Algorithm Hash digest
SHA256 68e748268d2a04dfe7841ed8a933a3afde6e810704158585f4ca2256e540bd39
MD5 5c6a8b24d8c95bf9921d637f483567fd
BLAKE2b-256 2f60c76b3afb6307e3f54d5b96fda15af0b51d22259dd6d6dc30af4e47ee16af

See more details on using hashes here.

Provenance

The following attestation bundles were made for dataset_suite-0.4.0.tar.gz:

Publisher: python-publish.yml on jdranczewski/dataset-suite-pip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dataset_suite-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: dataset_suite-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for dataset_suite-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7071a85c298bc12074f7611a4932f1c0d33dfc02766a9b09d6836b06561712b0
MD5 cbf46cd31ec0f3c2474445e757b814a9
BLAKE2b-256 674ecbff723af8e61b4a2ecd1d3db12db9228030a354ab6d50a98029c814cd54

See more details on using hashes here.

Provenance

The following attestation bundles were made for dataset_suite-0.4.0-py3-none-any.whl:

Publisher: python-publish.yml on jdranczewski/dataset-suite-pip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

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