Skip to main content

HESMA file format reader and writer

Project description

Hesmapy

PyPI - Version PyPI - Downloads DOI

HESMA Python - Tools for reading HESMA models

Documentation

Full documentation can be found here.

Installation

Currently, the package is only available through pip.

pip install hesmapy

In case you want to build the documentation, you'll need to install the optional dependencies as well. See pyproject.toml for a list of needed packages (mostly sphinx related packages)

Contents

hesmapy contains three main modules, one for each of the main HESMA categories (Hydro, RT, Tracer). It provides utilties to read and write files in the standardised HESMA file formats, as well as some utilities such as plotting. These utilities are mostly intended for use by HESMA itself and might be rather limited in their functionality.

Hydro

Hydro1D

This module contains the tools for one-dimensional hydro models. See below for some basic usage examples.

Loading models:

import hesmapy.base as hp
model = hp.load_hydro_1d("examples/hydro/hydro_1d.json")

Get the data from a model as a pd.DataFrame:

df = model.get_data()

Plot a model:

model.plot(show_plot=True)

Model files can be written by providing either a pd.DataFrame, dict or several np.ndarray. See the documentation for more details.

RT

Lightcurves

This module contains the tools for lightcurves and data derived from them. See below for some basic usage examples.

Loading models:

import hesmapy.base as hp
model = hp.load_rt_lightcurve("examples/rt/rt_lightcurve.json")

Get the data from a model as a pd.DataFrame:

df = model.get_data()

Plot a model:

model.plot(show_plot=True)

Spectra

This module contains the tools for spectra(l timeseries). See below for some basic usage examples.

Loading models:

import hesmapy.base as hp
model = hp.load_rt_spectrum("examples/rt/rt_spectrum.json")

Get the data from a model as a list of pd.DataFrame (one for each timestep):

dfs = model.get_data()

Plot a model:

model.plot(show_plot=True)``````


Model files can be written by providing either a ``pd.DataFrame``, ``dict`` or several ``np.ndarray``.
See the documentation for more details.

### Tracer
*(Not yet implemented)*

Project details


Download files

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

Source Distribution

hesmapy-24.4.1.tar.gz (104.5 kB view details)

Uploaded Source

Built Distribution

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

hesmapy-24.4.1-py3-none-any.whl (36.3 kB view details)

Uploaded Python 3

File details

Details for the file hesmapy-24.4.1.tar.gz.

File metadata

  • Download URL: hesmapy-24.4.1.tar.gz
  • Upload date:
  • Size: 104.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for hesmapy-24.4.1.tar.gz
Algorithm Hash digest
SHA256 6eae12a9db58d1380588bb6e11a1e3fc373775ad55ff6e28b8323634b6431589
MD5 b791322487678e4d6392b59e1a2ea7c8
BLAKE2b-256 f0ade1b5e6165596306743dfa8077ac56aa8484a81c46aaec44e12fcb938b0e2

See more details on using hashes here.

File details

Details for the file hesmapy-24.4.1-py3-none-any.whl.

File metadata

  • Download URL: hesmapy-24.4.1-py3-none-any.whl
  • Upload date:
  • Size: 36.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for hesmapy-24.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 27837b497ed1135abdcf918136141e85e5904b1e80ae6f82322d5c23edf7bd6b
MD5 b984c328f17877f28f823091d7af8403
BLAKE2b-256 326ada246cfb13086a34fb359cfefd78a73a26c646907ff036c510ac3c835791

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page