ConnectTool
 All Classes Namespaces Files Functions Variables Pages
Readme

Brief

Computes the magnetic connectivity point at the solar surface for different spacecrafts, times and magnetograms.
Times can be in the past (SCIENCE mode) or in the future (FORECAST/EXTENDED mode).
Creates for each case an image based on the magnetogram with different points of connectivity, according to the different assumptions made.
Details.

  1. All observed and forecast magnetograms, velocity files... are stored in an external database (SWD).
  2. All created images are stored in dir.output and registered in a local database (Output DB).
  3. Connect_tool web interface give visual access to this local database.

Installation

Download repository:

git clone https://gitlab.irap.omp.eu/motcor_tools/CONNECT-TOOL_V3_MOTCOR.git

Requirements:

See Gitlab: https://gitlab.irap.omp.eu/motcor_tools/SWD_V3_MOTCOR.git
or Documentation page: http://userpages.irap.omp.eu/~mindurain/doc_swd/index.html).

See Gitlab: https://gitlab.irap.omp.eu/motcor_models/CORFIELD_MOTCOR.git
or Documentation page: http://userpages.irap.omp.eu/~mindurain/doc_corfield/index.html).

  1. First of all, create a virtualenv with Python3. Try virtualenv -p python3 venv
  2. Activate your virtualenv : source venv/bin/activate
  3. Then install all requirements with the command pip:
pip install numpy
pip install spacepy --no-deps
pip install matplotlib spiceypy astropy paramiko sunpy netcdf4 Pillow pyyaml

Before launch

  1. Change the path of CORFIELD repository in dir.corona/module_corona.py:
    path_corfield_pfss = '/where/LocalCorfield/repository/is' 
  2. Change the path of SWD repository in set_path:
    path_swd='/where/LocalSWD/repository/is' 
  3. Update python path. Type in console:
source venv/bin/activate
eval `./set_path`

To see if it worked:

python3 -c "import sys; print(sys.path)"

Launch

Once virtualenv is activated, and eval set_path done, compute connectivity like this:

python dir.main/connect_tool.py -y 2018 -m 11 -d 1 -H 0 -reftime SCTIME -cmodel PFSS -magtype WSO -sc ALL

It will compute connectivity at 2018 Nov 1st at midnight for all Sc/Planet, using PFSS coronal reconstruction and WSO magnetogram.

Outputs

There are in dir.output/HMODEL/CMODEL/REFTIME/OPERATIONMODE/SC_MAGTYPE_DATE where:

Documentation

Documentation of Connect-tool can be found here: http://userpages.irap.omp.eu/~mindurain/doc_connect-tool/index.html.
Otherwise, to create documentation, change path_swd value in dir.doc/Doxyfile with the same path as in set_path.
Then type:

doxygen dir.doc/Doxyfile
or
call_doxygen

Html outputs are in html/index.html.

Latex files are in latex/ folder. For creating the Latex equivalent of Html outputs run:

cd latex
pdflatex refman.tex