From f4dd103091ad97f2ea5a3d96d72fe3443a7bf912 Mon Sep 17 00:00:00 2001 From: stefano scardigli Date: Thu, 2 Nov 2023 11:19:20 +0100 Subject: [PATCH 1/2] Updating wiki files, n'artra volta! --- docs/source/.DS_Store | Bin 6148 -> 0 bytes docs/source/aspis.rst | 6 +- docs/source/aspis/webapp.rst | 78 ------- docs/source/caesar.rst | 20 +- docs/source/index.rst | 8 +- docs/source/products/data/.DS_Store | Bin 6148 -> 0 bytes docs/source/products/data/1A_unitov_mag.rst | 207 ----------------- docs/source/products/data/1B_unitov_vel.rst | 208 ------------------ docs/source/products/data/2_unitov_halpha.rst | 208 ------------------ docs/source/products/data/3_unitov_RandD.rst | 80 ------- .../products/data/48D_ingv_LMPalert.rst | 113 ---------- .../products/data/49A_ingv_Swarm_LoL_maps.rst | 118 ---------- .../products/data/49B_ingv_Swarm_LoL_ts.rst | 118 ---------- 13 files changed, 16 insertions(+), 1148 deletions(-) delete mode 100644 docs/source/.DS_Store delete mode 100644 docs/source/aspis/webapp.rst delete mode 100644 docs/source/products/data/.DS_Store delete mode 100644 docs/source/products/data/1A_unitov_mag.rst delete mode 100644 docs/source/products/data/1B_unitov_vel.rst delete mode 100644 docs/source/products/data/2_unitov_halpha.rst delete mode 100644 docs/source/products/data/3_unitov_RandD.rst delete mode 100644 docs/source/products/data/48D_ingv_LMPalert.rst delete mode 100644 docs/source/products/data/49A_ingv_Swarm_LoL_maps.rst delete mode 100644 docs/source/products/data/49B_ingv_Swarm_LoL_ts.rst diff --git a/docs/source/.DS_Store b/docs/source/.DS_Store deleted file mode 100644 index 5e2895f95244e6493fd593d284d80c029dfe612d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK!A=`75FJARrwAzrkT`I##5GbAKuCzo64D=F5gedOci9M5-Kg*IdpS1{&(y@tD$`Nox<}O8mooB4ZO=al z+x=E$aaYEf7slkffvO|i~;}v diff --git a/docs/source/aspis.rst b/docs/source/aspis.rst index 510ae99..adf1f2e 100644 --- a/docs/source/aspis.rst +++ b/docs/source/aspis.rst @@ -1,6 +1,5 @@ ASPIS ===== -(ASi sPace weather InfraStructure) The Italian Space Agency has produced a Space Weather (SWE) roadmap **([RD-2])** for a long-term strategy to support the future scientific research of SWE, and the development of a related national scientific data centre @@ -49,9 +48,10 @@ Interactive Archive (MMIA), the SED (Spectral Energy Distribution) Tool and MATI .. toctree:: :caption: ASPIS documentation - aspis/webapp - ASPIS.py library + webapp + aspis_py .. autosummary:: .. toctree:: generated + ASi sPace weather InfraStructure. diff --git a/docs/source/aspis/webapp.rst b/docs/source/aspis/webapp.rst deleted file mode 100644 index 164d48d..0000000 --- a/docs/source/aspis/webapp.rst +++ /dev/null @@ -1,78 +0,0 @@ -Web Application ---------------- - - -Intro -^^^^^ - -ASPIS webapp aims to provide an easy, user friendly, access to the data contained in the DATABASE. -ASPIS webapp will be suited with tools able to easy access and visualize data. Technically, ASPIS -web-app will access to database using a set of dedicated API (GET) who will act as middleware to the -Database queries. A key feature will be the function to visualize several data-set in the same page. The -feature, strongly related to the casual-chain [ref. 1] concept is designed to take into account the standard -work-flow of the Space Weather community while they are inspecting correlation and liked phenomena -inside different products. A small and protected amount of server-side and/or client side models should -be run over visualized data for simple and light computation, notwithstanding the intention of the web-app -is to facilitate the data exploration and cross-visualization. Users will be encouraged to implement heavy -computations and advanced data handling using ASPIS.py [ref. 9] libraries. - -Functionalities -^^^^^^^^^^^^^^^ - -The web-app will be accessible using a common web browser. Basic functionalities are expected to be -public and will be open to the community: - -• Search in the archive based on several keys -• Time based queries -• Spatial queries -• Data visualization -• Data comparison (Multiple plots) -• Access to the Causal-chains -• Causal-chain visualization with multiple plots. -• Quick citation extraction tools based on visualized data. - -Advanced functionalities will be protected and will be accessible only to user identification: - -• Save search results -• Save data visualization settings -• Run internal, server-side, ASPIS models over an identified data-set -• (optional) Light computation of model and data comparison - -The Access Control List (ACL) will be provided by the ASPIS machines (Fig. 5) - -Time-based multi-plot visualization -................................... - -Time is a key link between the most of data-sets provided. So, graphical representation of data shall be -able to facilitate a time-based comparison between the series visualized by a common timeline. In this -way, every relationship between time-based plots can be easily found by the user. - -Spatial visualization -..................... - -Data-set are generated by instruments spatially referenced by acquisition site (ex. the instrument is -physically mounted on a Spacecraft or on Earth ), by target position (ex. The instrument target is the -Sun) and by line of sight (ex. the instrument acquire 20 square deg in a direction of the sky). This info -can be used to facilitate the user to visualize: -• Instruments positions in a specified time span -• Targets positions in a specified time span -• Targets coverage in instruments line of sights. -• Visualization of specific phenomena in different reference systems - -Event-chain visualization -......................... - -Causal-chains (ref. 1) will get a special section in the webapp. Causal-chains will take advantage from the -other basic visualization plots and can be associated here as a pre-defined organization of data subsets -plots. Web-app dedicated section will be able to list and search all causal-chains. Web-app will be able -to advise the user if, in a nominal visualization plot, the data subset is part of a know causal-chain and -propose a suitable visualization of such a causal-chain. - -Data proximity suggestions -.......................... - -User would be prompt by the system in case other data-sets, respect to ones already visualized, will -have a "proximity" (in terms of observed target, data coherence, data meaning, spatial nearness ) and -are available in the ASPIS Database system for the observed time-span or in a relevant subsequent time -(to consider propagation of the phenomena to other instruments). - diff --git a/docs/source/caesar.rst b/docs/source/caesar.rst index 6fc06fa..3e17de7 100644 --- a/docs/source/caesar.rst +++ b/docs/source/caesar.rst @@ -1,29 +1,32 @@ CAESAR -====== +===== +.. _intro: + +Intro +------------- The Italian Space Agency (ASI) funds the CAESAR_ (Comprehensive spAce wEather Studies for the ASPIS prototype Realization) project. The project, officially started on December 21st and lasting 25 months, responds to a call created by the agreement between ASI and the National Institute of Astrophysics (INAF) aimed at carrying out "Study activities for the scientific community of Space Weather for population of the ASPIS scientific data center ". -.. _description: - -What is CAESAR? ---------------- +.. _description +Description +---------------- **CAESAR** (Comprehensive Space Weather Studies for the ASPIS Prototype Realization) is a project supported by the Italian Space Agency and the National Institute of Astrophysics through the ASI-INAF n.2020-35-HH.0 agreement for the development of the ASPIS prototype of scientific data centre for Space Weather. .. image:: assets/images/CAESAR_logo_fullsize_color.png :height: 220 :alt: Alternative text -Check out the :doc:`caesar` section for further information, including the details on :ref:`ASPIS` the project. +Check out the :doc:`CAESAR` section for further information, including the details on :ref:`ASPIS` the project. To read about the latest news of the project please, visit the website `CAESAR project `_ -.. _project: +.. _project The project ------------ +---------------- The aim of the project is the creation, within the ASI Space Science Data Center, of a scientific center for the collection, processing and distribution of Space Weather data to the Italian scientific community, called ASPIS_ (ASI Space Weather Infrastructure). CAESAR_ will design and build a prototype of ASPIS_ populated with high scientific level data and products. @@ -44,7 +47,6 @@ Prospect... .. _CAESAR: https://caesar.iaps.inaf.it/ -.. _ASPIS: https://www.asi.it diff --git a/docs/source/index.rst b/docs/source/index.rst index 2233b29..0c576e2 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -21,6 +21,8 @@ Contents :glob: aspis + webapp + aspis_py caesar products/main @@ -31,12 +33,6 @@ Contents
-.. toctree:: - :maxdepth: 4 - - genindex - search - .. note:: diff --git a/docs/source/products/data/.DS_Store b/docs/source/products/data/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 Date: Wed, 8 Nov 2023 14:15:46 +0100 Subject: [PATCH 2/2] nuovo commit --- docs/source/aspis_py.rst | 191 +++++++++++++++++++++++++++++++++++++++ docs/source/webapp.rst | 75 +++++++++++++++ 2 files changed, 266 insertions(+) create mode 100644 docs/source/aspis_py.rst create mode 100644 docs/source/webapp.rst diff --git a/docs/source/aspis_py.rst b/docs/source/aspis_py.rst new file mode 100644 index 0000000..3df3e70 --- /dev/null +++ b/docs/source/aspis_py.rst @@ -0,0 +1,191 @@ +ASPIS.py library +---------------- + +Intro +^^^^^ + +ASPIS.py is a library of code that allows access to the data contained in ASPIS database and other +various astrophysics community databases, to perform client-side specific analyses of this data and to +visualize it. The data available are of two types: data in the internal database produced by the CAESAR +community and information on external data in other databases. Along with access to the data, the +ASPIS.py library contains code packages that can be imported as library objects, with which to perform +analysis and/or visualization of the data. + +The criterion of ASPIS.py is to act as a collector for the data and analysis software of the astrophysics +community and to foster cooperation within the community. In fact, one can use the data and analysis +methods developed by the community and, likewise, share one’s own data and methods. Indeed, we +have defined a standard template in ASPIS.py for generic data analysis code, and provide a how-to for +developers in the astrophysics community to convert their own code into the standard template, making it +easily usable for the entire ASPIS.py community in a standard way. In this way ASPIS.py’s primary goal +is to promote collaboration and cooperation within the astrophysics community. It facilitates the sharing +of data and analysis methods among researchers, enabling them to benefit from each other’s work. In +summary, ASPIS.py is a tool designed to streamline the access, analysis, and sharing of astrophysical +data and analysis methods within the astrophysics community. It aims to enhance collaboration and +standardization, making it easier for researchers to work with and build upon each other’s work in the +field of astrophysics. + +Functions +^^^^^^^^^^^^^^^^^^ + +The functions of the ASPIS.py module are conceived to implement the following key components of the +ASPIS service: + +1. Access for Advanced Users: ASPIS.py is designed to cater to advanced users in the astrophysics +community. It offers a set of functions that can be executed programmatically through a Python +interpreter. This capability allows users to perform more complex computations and analysis tasks, +surpassing the limitations of a web application. + +2. Basic Visualization Tools: While ASPIS.py provides basic visualization tools/functions, it also en- +courages users to leverage other freely available modules like Sunpy and Astropy for more ad- +vanced visualization needs. This approach ensures compatibility and flexibility. + +3. Ready-to-Use Python Snippets: ASPIS.py intends to provide ready-to-use Python code snippets. +These snippets are designed to assist entry-level users, making it easier for them to get started +with the module. Advanced users can further customize these code snippets to suit their specific +research requirements. + +4. Integration with User Programs: The expectation is that advanced users of ASPIS.py will seam- +lessly integrate the functions provided by the module into their own analysis and visualization pro- +grams. This promotes flexibility and allows users to tailor their solutions to their research needs. + +5. Structured Information in the Database: ASPIS.py relies on structured information within the database. +This information likely includes details about various astrophysical entities such as phenomena, +data descriptions, and chains, which are essential for conducting meaningful analyses. + +6. Data Outside the Database: ASPIS.py is designed to work with data that exists outside the database +but corresponds to the descriptions available within the database. This flexibility allows researchers +to combine data from various sources to enhance their analysis. +In summary, ASPIS.py is a versatile tool that caters to both entry-level and advanced users in the +astrophysics community. It provides functions for querying, visualizing, analyzing, and modeling astro- +physical data. The inclusion of code snippets and use case examples simplifies the usage for a broad +range of researchers, and advanced users can extend and customize the functionality to meet their spe- +cific research objectives. + +Installation +^^^^^^^^^^^^ + +To install ASPIS.py, a user typically needs to follow these general steps. Please note that the specific +installation process may vary depending on the availability and distribution method of ASPIS.py. The user +has to ensure that Python is installed on the system before proceeding. The user can install ASPIS.py +using pip, which is the Python package manager: + +``sudo -H pip3 install aspis-0.1.7-py3-none-any.whl`` + +The command is used to install a Python package from a Wheel file (.whl) using pip3 with adminis- +trative privileges (via sudo). The specific package being installed is "aspis-0.1.7-py3-none-any.whl". + +Here’s a breakdown of the command: + +* sudo: It is used to run the pip3 command with superuser privileges, which may be necessary for system-wide installations. +* -H: This flag is used to set the home directory to the target user’s home directory. It can help avoid potential issues with environment variables when using sudo. +* pip3: This is the Python package manager for Python 3. +* install: It’s the pip command to install packages. +* aspis-0.1.7-py3-none-any.whl: This is Wheel file that you want to install. + +If everything is set up correctly, running this command install the ASPIS package version 0.1.7 from +the provided Wheel file. + +Use case example +^^^^^^^^^^^^^^^^ + +Here we show an example of the way a user can use a specific product of the ASPIS.py library. +from aspis import products as aps +from datetime import datetime + +product input: + +``V0 = 1846 #* u.km / u.s`` + +``sigma_V0 = 362 #* u.km / u.s`` + +``Time_UTC = datetime ( 2017 , 9 , 6 , 14 , 1 , 0)`` + +call the class: + +``obj = aps . pdbm ()`` + +compute the CME: + +``obj . fit (V0 , sigma_V0 , Time_UTC )`` + +compute the CME on target = Earth: + +``obj . predict ()`` + +plot: + +``plt = obj . plot ( savefig = True )`` + +``plt = obj . plot ( type = ’ Travel time ’, savefig = True )`` + +``plt = obj . plot ( type = ’ ICME velocity ’, savefig = True )`` + +This example code performs the following steps: + +#. Import necessary modules and classes from the "aspis" library. +#. Define input parameters, namely the initial velocity (V0), its uncertainty (sigma_V0), and a times-tamp (Time_UTC). +#. Create an instance of the "pdbm" class from the "aspis.products" module. +#. Use this instance to compute the CME (Coronal Mass Ejection) model parameters based on the provided input. +#. Predict the behavior of the CME when it reaches its target, which is the Earth in this case. +#. Generate and save plots related to the CME modeling and prediction including "Travel time" and "ICME velocity." + +Additionally, it’s essential to check the specific classes and methods used in the script to understand +their usage and any additional requirements for proper execution. + +Code snippets and standardization +................................. + +The idea of ASPIS.py is that code developed by different members of the astrophysics community in contiguous +fields can be made available to each other and shared in exactly the same way as is usually done +with data. In the area of data, standardization of formats and thus the use of databases in which to store +information in a consistent and shared manner has been adopted for years. As for software, the situation +is more complex because codes have very heterogeneous characteristics among themselves and code +groupings still have strong limitations. Inspired by some recent experiences aimed at standardizing the +use of codes and comparing the performance of different methods on the same data, ASPIS.py aims to +provide a structural scheme with the ability to make the use of code developed by different members of +the astrophysics community for even different purposes available to the entire community. + +In particular, ASPIS provides four main functions: + +``class < class_name >:`` + +``def __init__ ( self ) -> None :`` + +``# initialize parameters`` + +``def process ( self ):`` + +``# process data`` + +``def run ( self ):`` + +``# run method`` + +``def plot ( self ):`` + +``# plot results`` + +These functions have been thought with the following purposes: + +* the "init" function is used to instantiate the object that will perform the data analysis by initializing the necessary parameters + +* the "process" function is for analyzing the data according to a predetermined pattern + +* the "run" function is for using the predetermined model + +* the "plot" function is for making visible the parameters, data used and outputs of the model + +All four functions are parameterizable so as to ensure that complex codes that depend on parameter +structures can be framed in the ASPIS system and can therefore perform tasks according to different +patterns. +The proposed structure is based on the following consideration: advanced methods for data analysis +in the field of astrophysics (and beyond) fall into two main classes: methods supported by a physical +model and those that lack it. The former are estimation problems - direct or inverse - for which the +"process" function should be implemented as the procedure for solving the inverse problem, meaning that +the optimization method that solves the inverse problem should be implemented in this part. In the "run" +section, the code that, conversely, solves the forward problem should be inserted. Regarding methods of +data analysis without a model, namely estimation or statistical learning methods, the "process" and "run" +functions correspond, respectively, to the training or learning process of the introduced (non-physical) +model and to the prediction procedure associated with the trained model. This concept resembles the +“fit” and “predict” methods of the “scikit-learn” library used in the significantly more homogeneous case of +matrix problem diff --git a/docs/source/webapp.rst b/docs/source/webapp.rst new file mode 100644 index 0000000..cfbdbe9 --- /dev/null +++ b/docs/source/webapp.rst @@ -0,0 +1,75 @@ +ASPIS Web Application +--------------------- + + +Intro +^^^^^ + +ASPIS webapp aims to provide an easy, user friendly, access to the data contained in the DATABASE. +ASPIS webapp will be suited with tools able to easy access and visualize data. Technically, ASPIS +web-app will access to database using a set of dedicated API (GET) who will act as middleware to the +Database queries. A key feature will be the function to visualize several data-set in the same page. The +feature, strongly related to the casual-chain [ref. 1] concept is designed to take into account the standard +work-flow of the Space Weather community while they are inspecting correlation and liked phenomena +inside different products. A small and protected amount of server-side and/or client side models should +be run over visualized data for simple and light computation, notwithstanding the intention of the web-app +is to facilitate the data exploration and cross-visualization. Users will be encouraged to implement heavy +computations and advanced data handling using ASPIS.py [ref. 9] libraries. + +Functionalities +^^^^^^^^^^^^^^^ + +The web-app will be accessible using a common web browser. Basic functionalities are expected to be +public and will be open to the community: + +• Search in the archive based on several keys +• Time based queries +• Spatial queries +• Data visualization +• Data comparison (Multiple plots) +• Access to the Causal-chains +• Causal-chain visualization with multiple plots. +• Quick citation extraction tools based on visualized data. +Advanced functionalities will be protected and will be accessible only to user identification: +• Save search results +• Save data visualization settings +• Run internal, server-side, ASPIS models over an identified data-set +• (optional) Light computation of model and data comparison +The Access Control List (ACL) will be provided by the ASPIS machines (Fig. 5) + +Time-based multi-plot visualization +................................... + +Time is a key link between the most of data-sets provided. So, graphical representation of data shall be +able to facilitate a time-based comparison between the series visualized by a common timeline. In this +way, every relationship between time-based plots can be easily found by the user. + +Spatial visualization +..................... + +Data-set are generated by instruments spatially referenced by acquisition site (ex. the instrument is +physically mounted on a Spacecraft or on Earth ), by target position (ex. The instrument target is the +Sun) and by line of sight (ex. the instrument acquire 20 square deg in a direction of the sky). This info +can be used to facilitate the user to visualize: +• Instruments positions in a specified time span +• Targets positions in a specified time span +• Targets coverage in instruments line of sights. +• Visualization of specific phenomena in different reference systems + +Event-chain visualization +......................... + +Causal-chains (ref. 1) will get a special section in the webapp. Causal-chains will take advantage from the +other basic visualization plots and can be associated here as a pre-defined organization of data subsets +plots. Web-app dedicated section will be able to list and search all causal-chains. Web-app will be able +to advise the user if, in a nominal visualization plot, the data subset is part of a know causal-chain and +propose a suitable visualization of such a causal-chain. + +Data proximity suggestions +.......................... + +User would be prompt by the system in case other data-sets, respect to ones already visualized, will +have a "proximity" (in terms of observed target, data coherence, data meaning, spatial nearness ) and +are available in the ASPIS Database system for the observed time-span or in a relevant subsequent time +(to consider propagation of the phenomena to other instruments). + -- GitLab