Skip to main content

AI package for heliophysics

Project description

LicenseMIT LicenseCC Pipeline PyPi CoverageReport PylintScore DocSphinx Maintenance

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:

https://gitlab.com/aidaspace/aidapy

  1. 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
  1. 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
  1. 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]
  1. 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:

Optional dependencies are:

Testing dependencies are:

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


Download files

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

Source Distribution

aidapy-0.0.4.tar.gz (6.9 MB view hashes)

Uploaded Source

Built Distribution

aidapy-0.0.4-py3-none-any.whl (78.7 kB view hashes)

Uploaded Python 3

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