AI package for heliophysics
Project description
The Python package aidapy centralizes and simplifies access to:
Spacecraft data from heliospheric missions
Space physics simulations
Advanced statistical tools
Machine Learning, Deep Learning algorithms, and applications
The aidapy package is part of the project AIDA (Artificial Intelligence Data Analysis) in Heliophysics funded from the European Unions Horizon 2020 research and innovation programme under grant agreement No 776262. It is distributed under the open-source MIT license.
Full documentation can be found here
Installation
The package aidapy has been tested only for Linux.
Using PyPi
aidapy is available for pip.
pip install aidapy
From sources
The sources are located on GitLab:
Clone the GitLab repo:
Open a terminal and write the below command to clone in your PC the AIDApy repo:
git clone https://gitlab.com/aidaspace/aidapy.git
cd aidapy
Create a virtual env
AIDApy needs a significant number of dependencies. The easiest way to get everything installed is to use a virtual environment.
Anaconda
You can create a virtual environment and install all the dependencies using conda with the following commands:
pip install conda
conda create -n aidapy
source activate aidapy
Virtual Env
Virtualenv can also be used:
pip install virtualenv
virtualenv AIDApy
source AIDApy/bin/activate
Install the version you want via the commands:
For the “basic” version:
python setup.py install
For the version with the ML use cases:
pip install aidapy[ml]
Test the installation in your PC by running. (Install both versions before running the tests)
python setup.py test
5) (Optional) Generate the docs: install the extra dependencies of doc and run the setup.py file:
pip install aidapy[doc]
python setup.py build_sphinx
Once installed, the doc can be generated with:
cd doc
make html
Dependencies
The required dependencies are:
Python >= 3.6
scikit-learn >= 0.21
numpy >= 1.18
scipy >= 1.4.1
matplotlib >= 3.2.1
pandas >= 1.0.3
heliopy >= 0.12
sunpy >= 1.1.2
astropy >=4.0.1
xarray >=0.15
bottleneck >= 1.3.2
heliopy-multid >= 0.0.2
Optional dependencies are:
Testing dependencies are:
pytest >= 2.8
Extra testing dependencies:
Usage
AIDApy’s high level interface has been created in order to combine simplicity with workability. In the example below, the end user downloads data from the MMS space mission for a specific time range and afterwards extracts the mean of these. Finally the timeseries are ploted in the screen.
from datetime import datetime
#AIDApy Modules
from aidapy import load_data
###############################################################################
# Define data parameters
###############################################################################
# Time Interval
start_time = datetime(2018, 4, 8, 0, 0, 0)
end_time = datetime(2018, 4, 8, 0, 1, 0)
# Dictionary of data settings: mission, product, probe, coordinates
# Currently available products: 'dc_mag', 'i_dens', and 'all'
settings = {'prod': ['dc_mag'], 'probes': ['1', '2'], 'coords': 'gse'}
###############################################################################
# Download and load desired data as aidapy timeseries
###############################################################################
xr_mms = load_data(mission='mms', start_time=start_time, end_time=end_time, **settings)
###############################################################################
# Extract a Statistical Measurement of the data
###############################################################################
xr_mms['dc_mag1'].statistics.mean()
###############################################################################
# Plot the loaded aidapy timeseries
###############################################################################
xr_mms['dc_mag1'].graphical.peek()
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
All the code must follow the instructions of STYLEGUIDE.rst. Please make sure to update tests as appropriate.
Licenses
This software (AIDApy) and the database of the AIDA project (AIDAdb) are distributed under the MIT license.
The data collections included in the AIDAdb are distributed under the Creative Commons CC BT 4.0 license.
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
File details
Details for the file aidapy-0.0.4.tar.gz
.
File metadata
- Download URL: aidapy-0.0.4.tar.gz
- Upload date:
- Size: 6.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d323d1c3775c3e6c34c41597180ecaa9dd050f7c675d41cbe07608dd7e3da44 |
|
MD5 | 055679c723cfbe47da63a40fbcd6aa8e |
|
BLAKE2b-256 | 722908e6e1cf1493a461a1232c60dd3b02ba22233ad62dc8f84019a1aa63527a |
File details
Details for the file aidapy-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: aidapy-0.0.4-py3-none-any.whl
- Upload date:
- Size: 78.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65d6051638bb335e3f621ed08c76c92eaa921f54efa50d1591f5e53b0b5d197a |
|
MD5 | f442845ed5b8261dd656957b9f13851e |
|
BLAKE2b-256 | 782daf631d6a790fd04ed5aa94f1b4f2be0548db7e8e49fe8392180ede4bc9a1 |