Package: aidapy
The Python packageaidapycentralizes and simplifies access to:Spacecraft data from heliospheric missionsSpace physics simulationsAdvanced statistical toolsMachine Learning, Deep Learning algorithms, and applicationsTheaidapypackage 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 foundhereInstallationThe package aidapy has been tested only for Linux.Using PyPiaidapyis available for pip.pipinstallaidapyFrom sourcesThe sources are located onGitLab:https://gitlab.com/aidaspace/aidapyClone the GitLab repo:Open a terminal and write the below command to clone in your PC the
AIDApy repo:gitclonehttps://gitlab.com/aidaspace/aidapy.gitcdaidapyCreate a virtual envAIDApy needs a significant number of dependencies. The easiest
way to get everything installed is to use a virtual environment.AnacondaYou can create a virtual environment and install all the dependencies usingcondawith the following commands:pipinstallcondacondacreate-naidapysourceactivateaidapyVirtual EnvVirtualenvcan also be used:pipinstallvirtualenvvirtualenvAIDApysourceAIDApy/bin/activateInstall the version you want via the commands:For the “basic” version:pythonsetup.pyinstallFor the version with the ML use cases:pipinstallaidapy[ml]Test the installation in your PC by running. (Install both versions before running the tests)pythonsetup.pytest5) (Optional) Generate the docs: install the extra dependencies of doc and run
thesetup.pyfile:pipinstallaidapy[doc]pythonsetup.pybuild_sphinxOnce installed, the doc can be generated with:cddocmakehtmlDependenciesThe required dependencies are:Python>= 3.6scikit-learn>= 0.21numpy>= 1.18scipy>= 1.4.1matplotlib>= 3.2.1pandas>= 1.0.3heliopy>= 0.12sunpy>= 1.1.2astropy>=4.0.1xarray>=0.15bottleneck>= 1.3.2heliopy-multid>= 0.0.2Optional dependencies are:pytorch>= 1.4skorch>= 0.8.0Testing dependencies are:pytest>= 2.8Extra testing dependencies:coverage>= 4.4pylint>= 1.6.0UsageAIDApy’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 themeanof these. Finally the timeseries are
ploted in the screen.fromdatetimeimportdatetime#AIDApy Modulesfromaidapyimportload_data################################################################################ Define data parameters################################################################################ Time Intervalstart_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()ContributingPull 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.LicensesThis software (AIDApy) and the database of the AIDA project (AIDAdb) are
distributed under theMITlicense.The data collections included in the AIDAdb are distributed under the
Creative CommonsCC BT
4.0license.