Skip to main content

A Python package for the fetching (and some processing) of eCallisto data via the eCallisto API.

Project description

Ecallisto NG

Ecallisto NG is a compact yet effective Python package designed to facilitate seamless interaction with the Ecallisto API. The package is constructed in Python 3.9 and utilizes the requests library to directly access the Ecallisto API via the link: https://v000792.fhnw.ch/api/data.

Installation

To install this package, clone this repository and use pip for installation. Execute the following command in your terminal: pip install -e .

PyPI

Ecallisto NG is conveniently available on PyPI as well. To download, visit the following link: https://pypi.org/project/ecallisto-ng/

Usage

Here's a guide on how to use the different features of Ecallisto NG:

Data Fetching

Fetching data is easy using the get_data function, housed under the ecallisto_ng.data_fetching.get_data module. Here's an example:

from ecallisto_ng.data_fetching.get_data import get_data

parameters = {
    "instrument_name": "austria_unigraz_01",
    "start_datetime": "2021-03-01 06:30:00",
    "end_datetime": "2021-03-07 23:30:00",
    "timebucket": "15m",
    "agg_function": "MAX",
}

df = get_data(parameters)

Plotting

Ecallisto NG provides basic plotting capabilities. Here's an example of how to generate a spectogram:

from ecallisto_ng.plotting.plot import fill_missing_timesteps_with_nan, plot_spectogram

df = fill_missing_timesteps_with_nan(df)
plot_spectogram(df,  parameters["instrument_name"], parameters["start_datetime"], parameters["end_datetime"])

Spectogram editing

We also provide some basic functionalities to edit the spectogram. Here's how you can do it:

from ecallisto_ng.data_processing.utils import elimwrongchannels, subtract_constant_background, subtract_rolling_background

df = elimwrongchannels(df)
df = subtract_constant_background(df)
df = subtract_rolling_background(df)

plot_spectogram(df,  parameters["instrument_name"], parameters["start_datetime"], parameters["end_datetime"])

These simple commands allow you to easily manipulate spectogram data, enabling effective use of the Ecallisto API for your needs.

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

ecallisto_ng-0.0.5.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

ecallisto_ng-0.0.5-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file ecallisto_ng-0.0.5.tar.gz.

File metadata

  • Download URL: ecallisto_ng-0.0.5.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for ecallisto_ng-0.0.5.tar.gz
Algorithm Hash digest
SHA256 c1a5dbe73cff856a353ce63b923c658ddc1067922a5dec99adcc1625d7e2d73d
MD5 4ff3e436f92483db3f59e5b7fa23030d
BLAKE2b-256 6e1639aa42f52550e1b6b1feb9dd1be4fe9a8cb126929c6cb94563d388cc4714

See more details on using hashes here.

File details

Details for the file ecallisto_ng-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for ecallisto_ng-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f3496784e972cbfa0dbc0fc1394a3c8f0d2de8fc9d4dd7c998cadf012d1a9661
MD5 76786b302d1299d765dde3a0bc34c942
BLAKE2b-256 64dba3da92f9dd8a05f0d0476db7bbc8fa204163ef51511302c0ac8822f5a171

See more details on using hashes here.

Supported by

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