maser4py offers tools to handle low frequency radioastronomy data
Project description
About maser4py
maser4py offers modules to hande data from several space and ground radio observatory.
It comes with the following submodules:
- maser.data for radio data parsing features
- maser.plot for radio data plotting features
maser4py is developed in the framework of the MASER project.
Installation
To install the package, run the following command:
pip install maser4py
or use one of the extra options:
jupyter
for Jupyter notebook supportjupytext
for Jupyter notebook text supportdata
for maser.data submodule featuresplot
for maser.plot submodule featuresall
to install all the above
For example if you want to use maser4py
with maser.data and maser.plot submodules:
pip install maser4py[data,plot]
Usage
Examples of usage can be found in the examples
folder.
Examples can also be run as Jupyter notebooks on 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 maser4py:
git clone https://gitlab.obspm.fr/maser/maser4py.git
Then, you can install the package locally
Requirements
maser4py
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 maser4py
to read CDF files you have to install the CDF library and the spacepy.pycdf package.
Installing a local copy of maser4py
Use the following command to install the package:
poetry install
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 maser4py
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:
- Create an access token
- 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 themaser
deposition ID.
- 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>
- 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for maser4py-0.13.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c31ef4638a4a5b3d4739de601039b183b7289813887cd973e04af0b88408654c |
|
MD5 | 74cd9353d9b2415f1a18994cdade7814 |
|
BLAKE2b-256 | 09240b6173d45c5ad65f7c0e977287614726a174c3d098706eec3cb95d01188b |