Skip to main content

About maser.data

maser.data is a submodule of maser4py.

It offers programs to handle radio data from the following missions:

  • Cassini
  • Ecallisto
  • Interball
  • Juno
  • Mars Express
  • nancay decametric array (Jupiter only)
  • Nancay NenuFAR/BST
  • Solar orbiter
  • Viking
  • Wind

Installation

To install the package, run the following command:

pip install maser.data

or use one of the extra options:

  • jupyter for Jupyter notebook support
  • spacepy for CDF data format support (note that this requires the CDF library)
  • nenupy for NenuFAR data products support
  • all to install all the above

For example use maser.data[jupyter,spacepy] if you want to use maser.data with spacepy and jupyter notebooks:

pip install maser.data[jupyter,spacepy]

Usage

The Data class is a wrapper around several classes that allow you to read data from many different formats, including CDF, Fits, and some custom binary formats. By default, the class will try to automagically detect the format of the file and use the appropriate class to read the data.

from maser.data import Data

filepath = "path/to/my/data/file.ext"
data = Data(filepath=filepath)

Binder You can also launch a Binder environment and browse through the notebook examples.

Development

To contribute to the development of the package, you will need to install a local copy of maser.data

git clone https://gitlab.obspm.fr/maser/maser4py.git

Then, you can install the package locally

Requirements

maser.data requirements are detailed in the pyproject.toml file

poetry

To install the package, it is recommended to use poetry:

pip install poetry

CDF file format

To use maser.data to read CDF files you have to install the CDF library and the spacepy.pycdf package.

Installing a local copy of maser.data

Use the following command to install the package:

poetry install

or this one if you want to use maser.data with spacepy to handle CDF files:

poetry install --extras "spacepy"

Tests

Use pytest -m "not test_data_required" to skip tests that require test data (and to skip auto download).

Generate setup.py for editable local installation

The setup.py file have to be updated after any changes to the pyproject.toml file.

To generate a new setup.py file, go to the top level of the maser.data project folder and run:

python generate_setup.py

Now you can use the setup.py file to install the package locally in editable mode:

pip install -e path/to/project/folder

Build the documentation

Use sphinx-build docs/source docs/public to build the documentation.

Manually publish maser and generate a new DOI

To publish maser with poetry you will have to build a dist package:

poetry build

And then publish the package on pypi (and/or on Gitlab, see https://python-poetry.org/docs/cli/#publish):

poetry publish

maser comes with a Python client (see .ci/zenodo.py) to interact with the Zenodo API and generate automatically a DOI for each new version of maser.

To archive maser on Zenodo:

  1. Create an access token
  2. Is this the first maser deposit on Zenodo ?
  • Yes it's the first deposit, so you don't need any ID
  • No, it's a new version of maser. Then browse to the first record of maser on Zenodo and check the URL : https://zenodo.org/record/<DEPOSITION_ID> to get the maser deposition ID.
  1. Use the following command to deposit the package on Zenodo:
 python .ci/zenodo.py -p ./ -t <ACCESS_TOKEN> -a ./dist/maser4py-X.Y.Z.tar.gz  -id <DEPOSITION_ID>
  1. Browse to the maser record on Zenodo, check the metadata/files and publish the package to finally generate the DOI.

Notes :

  • the --sandbox keyword can be used to deposit files on the Zenodo test server
  • the --publish keyword can be used to automatically publish the new record and generate the DOI. But be careful, once published, there is no way to modify a record on Zenodo without publishing a new version.

Download files

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

Source Distribution

maser.data-0.3.0.tar.gz (41.2 kB view details)

Uploaded Source

Built Distribution

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

maser.data-0.3.0-py3-none-any.whl (57.4 kB view details)

Uploaded Python 3

File details

Details for the file maser.data-0.3.0.tar.gz.

File metadata

  • Download URL: maser.data-0.3.0.tar.gz
  • Upload date:
  • Size: 41.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.15 CPython/3.6.9 Linux/4.9.0-17-amd64

File hashes

Hashes for maser.data-0.3.0.tar.gz
Algorithm Hash digest
SHA256 5d9f319ff36cfbe6cdbacb9ebf819da687f4f2ed73bed0a63f4fc766efa1c0fb
MD5 312aa32fb33922f5baca8c893b8e095d
BLAKE2b-256 f08a735142badac5a5b1d8b5f422cb89f354582dacece35df001de51ad0ceeb1

See more details on using hashes here.

File details

Details for the file maser.data-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: maser.data-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 57.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.15 CPython/3.6.9 Linux/4.9.0-17-amd64

File hashes

Hashes for maser.data-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2eb20e859b301fed241a7b73b11ddb08cd11af5261cfb7c4dce37601597ced20
MD5 1752596f0e2d063434b4f7de34aedcaf
BLAKE2b-256 ab2962ce5f7c6c46b34fe520123786e66b0377dd645bfdb40c579df55add521a

See more details on using hashes here.

Release history Release notifications | RSS feed

0.5.2

2 files

0.5.1

2 files

0.4.2

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

This release

0.3.0 This release

2 files

0.1.1

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