ConnectTool
 All Classes Namespaces Files Functions Variables Pages
Variables
connect_tool Namespace Reference

Compute connectivity maps between some or all spacecrafts and planets and solar surface. More...

Variables

tuple log_id = module_io.open_log(__file__)
 
tuple time_0 = datetime.datetime.today()
 
string help_message
 
list scrafts = []
 
tuple error_hmodel = module_io.check_hmodel(module_io.hmodel )
 
tuple error_cmodel = module_io.check_cmodel(module_io.cmodel )
 
tuple error_magtype = module_io.check_magtype(module_io.magtype)
 
tuple error_reftime = module_io.check_reftime(module_io.reftime)
 
dictionary error_scraft = {}
 
tuple date_in = module_timespace.Time()
 
dictionary times_sc = {}
 
dictionary error_orbito = {}
 
dictionary error_heliosphere = {}
 
dictionary error_time_surf = {}
 
dictionary error_find_mag = {}
 
dictionary error_find_euv171 = {}
 
dictionary error_find_euv193 = {}
 
dictionary error_read_mag = {}
 
dictionary error_read_euv171 = {}
 
dictionary error_read_euv193 = {}
 
dictionary error_mag_surf = {}
 
dictionary error_uncertainty = {}
 
dictionary error_corona = {}
 
dictionary error_connectivity = {}
 
dictionary positions_sc = {}
 
tuple ref_j2000 = module_timespace.Time()
 
dictionary ts_table = {}
 
dictionary insitu = {}
 
dictionary vhelio = {}
 
dictionary ts_path = {}
 
dictionary ts_date = {}
 
tuple db_element = database_timeserie.datetime2file(ts_table[scraft],date_in.datetime,h_accuracy = 1)
 
dictionary positions_ss = {}
 
dictionary dt_helio = {}
 
dictionary dt_corona = {}
 
dictionary dt_prop = {}
 
dictionary times_surf = {}
 
dictionary mag_found = {}
 
dictionary mag_db = {}
 
dictionary mag_datetime = {}
 
dictionary operation_mode = {}
 
dictionary euv171_found = {}
 
dictionary euv171_db = {}
 
dictionary euv171_datetime = {}
 
dictionary euv171_table = {}
 
list euv171_table_names = ['OBS_MAPS_EUV2CARMAP_SDOSTA_171','OBS_MAPS_SDO_AIA_171']
 
dictionary euv193_found = {}
 
dictionary euv193_db = {}
 
dictionary euv193_datetime = {}
 
dictionary euv193_table = {}
 
list euv193_table_names = ['OBS_MAPS_EUV2CARMAP_SDOSTA_193','OBS_MAPS_SDO_AIA_193']
 
dictionary mag_data = {}
 
dictionary euv171_data = {}
 
dictionary euv193_data = {}
 
dictionary mag_surf = {}
 
dictionary seed_points_ss = {}
 
tuple seed_points_ss_min = module_connectivity.point_distribution('GAUSSIAN',module_connectivity.nproba,positions_ss[scraft][0])
 
tuple seed_points_ss_max = module_connectivity.point_distribution('GAUSSIAN',module_connectivity.nproba,positions_ss[scraft][1])
 
dictionary fieldlines = {}
 
dictionary cube3D_path = {}
 
dictionary bss_data = {}
 
 write3d = False
 
list mag_filenames = []
 
list seed_points_ss_all = []
 
 scraft_identical = scraft
 
int i0 = 0
 
int i1 = 0
 
dictionary footpoints = {}
 
dictionary densitymaps = {}
 
dictionary polarities = {}
 
dictionary main_connect_point = {}
 
tuple densitymaps_min = module_connectivity.build_density(footpoints[scraft][0:module_connectivity.nproba])
 
tuple densitymaps_max = module_connectivity.build_density(footpoints[scraft][module_connectivity.nproba:])
 
list item_names = []
 
list item_errors = []
 
list item_error = item_errors[i]
 
int nerror = 0
 
tuple time_1 = datetime.datetime.today()
 
string message = '('
 
dictionary sc_ref = {}
 
dictionary output_id = {}
 
tuple results
 
 present_folder = True
 
 scraft = scraft,\
 
 heliospheric_model = module_io.hmodel,\
 
 coronal_model = module_io.cmodel,\
 
 reference_time = module_io.reftime,\
 
 magnetogram_type = module_io.magtype,\
 
list date = times_sc[sc_ref[scraft]]
 
tuple current_dir = os.getcwd()
 
dictionary output_dirname = {}
 
dictionary output_basename = {}
 
dictionary path_file_connectivity = {}
 
dictionary path_file_footpoint = {}
 
dictionary path_file_fieldline = {}
 
dictionary path_file_parameter = {}
 
dictionary path_file_visible_disk = {}
 
dictionary path_file_hcs = {}
 
dictionary path_file_coronalhole = {}
 
dictionary path_file_cme = {}
 
dictionary path_file_flare = {}
 
dictionary path_file_xflare = {}
 
dictionary path_background_mag = {}
 
dictionary path_background_euv171 = {}
 
dictionary path_background_euv193 = {}
 
dictionary path_layer_subpoint = {}
 
dictionary path_layer_connectivity = {}
 
dictionary path_layer_visible_disk = {}
 
dictionary path_layer_hcs = {}
 
dictionary path_layer_frame = {}
 
dictionary path_final_legend_mag = {}
 
dictionary path_final_legend_euv171 = {}
 
dictionary path_final_legend_euv193 = {}
 
dictionary path_final_nolegend_mag = {}
 
dictionary path_final_nolegend_euv171 = {}
 
dictionary path_final_nolegend_euv193 = {}
 
dictionary path_layer_flare = {}
 
dictionary path_layer_xflare = {}
 
dictionary path_layer_cme = {}
 
dictionary path_layer_coronalhole = {}
 
dictionary error_file_connectivity = {}
 
dictionary error_file_footpoint = {}
 
dictionary error_file_fieldline = {}
 
dictionary error_file_parameter = {}
 
dictionary error_file_visible_disk = {}
 
dictionary error_file_hcs = {}
 
dictionary error_file_coronalhole = {}
 
dictionary error_file_cme = {}
 
dictionary error_file_flare = {}
 
dictionary error_file_xflare = {}
 
dictionary error_background_mag = {}
 
dictionary error_background_euv171 = {}
 
dictionary error_background_euv193 = {}
 
dictionary error_layer_subpoint = {}
 
dictionary error_layer_connectivity = {}
 
dictionary error_layer_visible_disk = {}
 
dictionary error_layer_hcs = {}
 
dictionary error_layer_frame = {}
 
dictionary error_final_legend_mag = {}
 
dictionary error_final_legend_euv171 = {}
 
dictionary error_final_legend_euv193 = {}
 
dictionary error_final_nolegend_mag = {}
 
dictionary error_final_nolegend_euv171 = {}
 
dictionary error_final_nolegend_euv193 = {}
 
dictionary error_layer_flare = {}
 
dictionary error_layer_xflare = {}
 
dictionary error_layer_cme = {}
 
dictionary error_layer_coronalhole = {}
 
tuple ifile = open(path_file_connectivity[scraft],'w')
 
list tmp = []
 
dictionary data_file_parameter = {}
 
dictionary data_background_mag = {}
 
dictionary data_background_euv171 = {}
 
dictionary data_background_euv193 = {}
 
dictionary data_layer_subpoint = {}
 
dictionary data_layer_connectivity = {}
 
dictionary data_layer_visible_disk = {}
 
list data = data_layer_visible_disk[scraft]
 
dictionary data_layer_hcs = {}
 
int ilevel = 0
 
list images_in = []
 
int i = 0
 
dictionary data_layer_flare = {}
 
list events = []
 
tuple event = module_event.Event(event_id=flare['event_id'],event_type=flare['event_type'],date_begin=datetime.datetime.strptime(flare['date_begin'],'%Y-%m-%d %H:%M:%S'),location=[flare['longitude'],flare['latitude']])
 
dictionary data_layer_xflare = {}
 
dictionary data_layer_cme = {}
 
dictionary data_layer_coronalhole = {}
 
tuple path = os.path.join(db_element['dirname'],db_element['filename'])
 
list item_paths = []
 
dictionary args = {}
 
list item_path = item_paths[i]
 
tuple time_2 = datetime.datetime.today()
 

Detailed Description

Compute connectivity maps between some or all spacecrafts and planets and solar surface.

Define a scraft reference for ALL case.

Overwrite fieldlines for scraft in scrafts: ifile = open('QSLsquasher/output/fieldline_s_s_min.ascii'%(scraft,times_sc[scraft][0].datetime.strftime('YmdTHMS')),'r') fieldlines[scraft][0:module_connectivity.nproba] = ascii_fieldline.read_v0(ifile) ifile.close() ifile = open('QSLsquasher/output/fieldline_s_s_max.ascii'%(scraft,times_sc[scraft][0].datetime.strftime('YmdTHMS')),'r') fieldlines[scraft][module_connectivity.nproba:] = ascii_fieldline.read_v0(ifile) ifile.close()

Get the footpoint on source surface of a magnetic fieldline passing through a point in the heliosphere and compute propagation delays. Get solar wind velocity Vhelio for a specific time and position in the heliosphere.
If available in SW Timeserie Database, take the measured value. Insitu mode.
If not available, assumed a minimum and maximum for slow and fast solar wind (cf module_heliosphere). Not insitu mode.
Timeserie Database is composed of AMDA timeseries : solar wind speed at some SC/planet. Only AMDA database, not updated.
Add data from ACE Science Center + Discovr real solar wind data deep space climate.
.

Author
M. Indurain
R. Pinto
Date
2019

Initialisation

Log ID: Open log file logs/log_YYYYMMDD and write header log.
Connection to Output DB. If does not exist, create it.

Input

Usage:
python connect_tool.py -hmodel heliospheric_model -cmodel coronal_model -magtype magnetic_type -reftime reference_time -sc sc_name -y year -m month -d day -H hour
where:

Read and check connect_tool arguments in module_io.
Compute the input date.
Init Spice orbitography.
Add a new simulation if Output DB.

Parameters
[in]inputarguments
[out]times_sc
[out]module_iosimulation variables (all_mode, hmodel, cmodel, magtype, reftime, year, month, day, hour, all_mode)

Orbitography.

SPICE library is used to get the position of a spacecraft (SC) or a planet in the HelioGraphic Coordinate system (HGC).
Module_orbito is the interface between Connect_tool and SPICE.

Parameters
[in]module_io.scraft
[in]times_sc
[out]positions_sc

Heliospheric reconstruction

About the in_situ mode.
If Vhelio found, insitu mode. All variables are a 1-element list (positions_ss[sc], times_ss[sc], density_maps[sc]) or a Nproba-element list (seedpoints_ss[sc], fieldlines[sc], footpoints[sc]).
Else, Vhelio = [Vslow,Vfast]. All variables are a 2-element list (positions_ss[sc], times_ss[sc], density_maps[sc]) or a 2Nproba-element list (seedpoints_ss[sc], fieldlines[sc], footpoints[sc]).

Set module_heliosphere parameters.
Call wanted heliospheric model through the interface_heliosphere.
Get the footpoint on the source surface (positions_ss[sc]) of an heliospheric magnetic fieldline ending at the position of SC/Planet (positions_sc[sc]). Uses different models:

Compute propagation delays (dt_helio[sc]) between source surface and SC/planet.

Parameters
[in]module_io.hmodel
[in]times_sc
[in]positions_sc
[out]velio
[out]insitu
[out]ts_path,ts_date
[out]positions_ss
[out]dt_helio

Boundary condition

Get propagation delay between Sc/Planet and solar surface (dt_prop[sc]).
Propagation delay between Source Surface and Sun surface is not neglected. Vcorona = module_corona.vcorona (100 km/s).
dt_corona[sc] = 2.5 Rs/Vcorona
dt_prop[sc] = dt_helio[sc] + dt_corona[sc]
Get time on solar surface (times_surf[sc]), according to reftime_mode.

Get the good Magmap/Magcube according to time_surf.

Set operation mode. According time_today, time_surf and Magmap/Cube3D availability.
Extended Forecast. If Magmap/Cube3D not available, take the most recent. Up to Nextended.
Get the good euv/white light maps according to time_surf.
Read magnetic data and euv/white light maps.
Get magnetogram data at solar surface.
For PFSS coronal reconstruction : magsurf[sc] = magmap[sc]
For CUBE coronal reconstruction : magsurf[sc] = magcube[sc][level = 0 + epsilon]

Parameters
[in]module_io.reftime,module_io.magtype
[in]times_sc
[in]dt_helio
[out]times_surf= times_sc (if reftime = SCTIME) or time_surf = times_ss (if reftime = SUNTIME)
[out]operation_mode
[out]mag_db,mag_data,mag_identical
[out]euv171_db,euv171_data,euv171_identical,...,wl_db,wl_data,wl_identical
[out]mag_surf

Uncertainty

Compute a point distribution on source surface to assess uncertainties of heliospheric reconstruction.
This leads to the creation of some seed points on the source surface for corona reconstruction.
Seedpoint list has Nproba points (in_situ mode) or 2*Nproba points (not in_situ mode).

Parameters
[in]positions_ss
[out]seed_points_ss[0:module_connectivity.nproba]list of Coordinate objects in vhelio-measured case.
[out]seed_points_ss[0:2* module_connectivity.nproba] list of Coordinate objects in vhelio-min and vhelio-max case.

Coronal reconstruction

Compute the magnetic fieldlines starting from seed points on the source surface, down to solar surface.
Set coronal model parameters (magmap/magcube, seedpoint_ss).
Call wanted coronal model through interface_corona.
Compute coronal fieldlines corresponding to the given seedpoint_ss.
Compute the magnetic field at the source surface (needed for HCS computing)

Parameters
[in]module_io.cmodel
[in]module_io.magtype
[in]mag_db
[in]seed_points_ss
[out]fieldlines
[out]bss_data

Connectivity

Compute fieldline polarity and connectivity probability on this hardcoded grid.
Rearrange all the footpoints of coronal fieldlines into 2D bins on solar surface and associates a probability density.
For each bin of this hardcoded grid, its associated density is: $\dfrac{\text{N fieldline in this bin}}{\text{N fieldline total}}$.

Parameters
[in]fieldlines
[out]densitymaps[0]in vhelio-measured case.
[out]densitymaps[0:1]for vhelio-min and vhelio-max case.
[out]footpoints
[out]main_connect_point
[out]polarities

Database

Add this simulation to the DB. Each Sc/planet is its own sc_ref. Ohterwise, define a scraft reference for ALL case. See All case sc_ref.
If sc_ref not found in ALL case, continue with module_io.all_mode desactivated

Outputs

Ccreate outputs arborescence:

Local connectivity file

Write a file containing all footpoint of the connectivity map and their associated density.
Footpoints are regrouped on this hardcoded grid.
Footpoint coordinates given with HelioGraphic Coordinate system and HelioProjective Coordinate system.
If not in_situ, footpoint for slow solar wind then footpoint for fast solar wind.
Footpoints are sorted with decreasing probability.
Format is defined here.

Parameters
[in]densitymaps
[out]file_connectivity,:localdir/localname + connectivity + .ascii or .tar

Footpoints file

Write the list of all fieldline footpoints.
These footpoints are ordered like this: [fp(sc0,vhelio measured),...] or [fp(sc0,vhelio min),fp(sc0,vhelio max),...].
Only for developpers (to re-compute an image), not for CONNECT_WEB.

Parameters
[out]file_footpoint,:localdir/localname + _fp + .ascii

Local fieldline file

Write a file containing all fieldline computed.
Format is defined here.

Simulation parameters file

This file contains all important variables used for image computing.
Structure for Sc/Planet case: 'scName': dict
Structure for ALL case: 'scName1': dict, 'scNameN': dict
Dictionnary has some key values: scraft, hmodel, cmodel...

Parameters
[out]file_parameter,:localdir/localname + _param + .yml

Background images

Build background layer using plot_common.map2D routine.
Error supported:

Subpoint layer

No error supported in Sc/Planet case.
Errors supported in ALL case:

Connectivity layer

No error supported in Sc/Planet case.
Errors supported in ALL case:

Visible disk layer and file

No error supported in Sc/Planet case.
Errors supported in ALL case:

HCS layer and file

No error supported in Sc/Planet case.
Errors supported in ALL case:

Frame layer

Build frame (axis + title + legend) No error supported.

Final images

Total image with background mag/euv171/euv193: Merge all previous layers into a non transparent image.
Error supported:

Flare layer and file

Look for flare. No error supported in Sc/Planet case.
Errors supported in ALL case:

X-Flare layer and file

Look for X-flare. No error supported in Sc/Planet case.
Errors supported in ALL case:

CME layer and file

Look for cme. No error supported in Sc/Planet case.
Errors supported in ALL case:

Coronal hole layer

Look for coronal data. No error supported in Sc/Planet and All case.

Coronal hole file

Write the list of all coronal holes.

Parameters
[out]file_coronalhole,:localdir/localname + _filecoronalhole + .ascii

Database feeding and output summary

Fill all the fields of the Output DB. Recap about output files/layers errors

Close

Close orbitography and log files.

Initialisation

Log ID: Open log file logs/log_YYYYMMDD.

Input

Usage:
python connect_tool.py -hmodel heliospheric_model -cmodel coronal_model -magtype magnetic_type -reftime reference_time -y year -m month -d day -H hour
where:

Read and check connect_tool arguments in module_io.
Compute the input date
Init Spice orbitography

Parameters
[in]inputarguments
[out]times_sc
[out]module_iosimulation variables (all_mode, hmodel, cmodel, magtype, reftime, year, month, day, hour, all_mode)

Heliospheric reconstruction

About the in_situ mode.
If Vhelio found, insitu mode. All variables are a 1-element list (positions_ss[sc], times_ss[sc], density_maps[sc]) or a Nproba-element list (seedpoints_ss[sc], fieldlines[sc], footpoints[sc]).
Else, Vhelio = [Vslow,Vfast]. All variables are a 2-element list (positions_ss[sc], times_ss[sc], density_maps[sc]) or a 2Nproba-element list (seedpoints_ss[sc], fieldlines[sc], footpoints[sc]).

Set module_heliosphere parameters.
Call wanted heliospheric model through the interface_heliosphere.
Get the footpoint on the source surface (positions_ss[sc]) of an heliospheric magnetic fieldline ending at the position of SC/Planet (positions_sc[sc]). Uses different models:

Compute propagation delays (dt_helio[sc]) between source surface and SC/planet.

Parameters
[in]module_io.hmodel
[in]times_sc
[in]positions_sc
[out]velio
[out]insitu
[out]positions_ss
[out]dt_helio

Connectivity

Compute connectivity probability on this hardcoded grid.
Rearrange all the footpoints of coronal fieldlines into 2D bins on solar surface and associates a probability density.
For each bin of this hardcoded grid, its associated density is: $\dfrac{\text{N fieldline in this bin}}{\text{N fieldline total}}$.

Parameters
[out]fieldlines
[in]densitymaps[0]in vhelio-measured case.
[in]densitymaps[0:1]for vhelio-min and vhelio-max case.
[in]footpoints

Outputs

Define scraft reference for ALL case and create outputs arborescence.


See All case sc_ref. If sc_ref not found, continue with module_io.all_mode desactivated

Footpoints file

Write the list of all fieldline footpoints.
These footpoints are ordered like this: [fp(sc0,vhelio measured),...] or [fp(sc0,vhelio min),fp(sc0,vhelio max),...].
Only for developpers (to re-compute an image), not for CONNECT_WEB.

Parameters
[out]file_fp,:localdir/localname + _fp + .ascii

Simulation parameters file

This file contains all important variables used for image computing.

Parameters
[out]file_param,:localdir/localname + _param + .ascii

Images

Final connectivity image with plotmap_type background.

Parameters
[out]XXX_plot,:Artist object
[out]XXX_path,:Absolute path of the created image
[out]XXX_error,:dictonnary ('error': boolean + 'message: string)
[out]background_mag_XXX[sc,all]Magnetic background
[out]layer_connectivity_XXX[sc,all]Layer with connectivity points

Variable Documentation

dictionary connect_tool.args = {}
dictionary connect_tool.bss_data = {}
connect_tool.coronal_model = module_io.cmodel,\
dictionary connect_tool.cube3D_path = {}
tuple connect_tool.current_dir = os.getcwd()
list connect_tool.data = data_layer_visible_disk[scraft]
dictionary connect_tool.data_background_euv171 = {}
dictionary connect_tool.data_background_euv193 = {}
dictionary connect_tool.data_background_mag = {}
dictionary connect_tool.data_file_parameter = {}
dictionary connect_tool.data_layer_cme = {}
dictionary connect_tool.data_layer_connectivity = {}
dictionary connect_tool.data_layer_coronalhole = {}
dictionary connect_tool.data_layer_flare = {}
dictionary connect_tool.data_layer_hcs = {}
dictionary connect_tool.data_layer_subpoint = {}
dictionary connect_tool.data_layer_visible_disk = {}
dictionary connect_tool.data_layer_xflare = {}
list connect_tool.date = times_sc[sc_ref[scraft]]
tuple connect_tool.date_in = module_timespace.Time()
tuple connect_tool.db_element = database_timeserie.datetime2file(ts_table[scraft],date_in.datetime,h_accuracy = 1)
dictionary connect_tool.densitymaps = {}
tuple connect_tool.densitymaps_max = module_connectivity.build_density(footpoints[scraft][module_connectivity.nproba:])
dictionary connect_tool.dt_corona = {}
dictionary connect_tool.dt_helio = {}
dictionary connect_tool.dt_prop = {}
dictionary connect_tool.error_background_euv171 = {}
dictionary connect_tool.error_background_euv193 = {}
dictionary connect_tool.error_background_mag = {}
tuple connect_tool.error_cmodel = module_io.check_cmodel(module_io.cmodel )
dictionary connect_tool.error_connectivity = {}
dictionary connect_tool.error_corona = {}
dictionary connect_tool.error_file_cme = {}
dictionary connect_tool.error_file_connectivity = {}
dictionary connect_tool.error_file_coronalhole = {}
dictionary connect_tool.error_file_fieldline = {}
dictionary connect_tool.error_file_flare = {}
dictionary connect_tool.error_file_footpoint = {}
dictionary connect_tool.error_file_hcs = {}
dictionary connect_tool.error_file_parameter = {}
dictionary connect_tool.error_file_visible_disk = {}
dictionary connect_tool.error_file_xflare = {}
dictionary connect_tool.error_final_legend_euv171 = {}
dictionary connect_tool.error_final_legend_euv193 = {}
dictionary connect_tool.error_final_legend_mag = {}
dictionary connect_tool.error_final_nolegend_euv171 = {}
dictionary connect_tool.error_final_nolegend_euv193 = {}
dictionary connect_tool.error_final_nolegend_mag = {}
dictionary connect_tool.error_find_euv171 = {}
dictionary connect_tool.error_find_euv193 = {}
dictionary connect_tool.error_find_mag = {}
dictionary connect_tool.error_heliosphere = {}
tuple connect_tool.error_hmodel = module_io.check_hmodel(module_io.hmodel )
dictionary connect_tool.error_layer_cme = {}
dictionary connect_tool.error_layer_connectivity = {}
dictionary connect_tool.error_layer_coronalhole = {}
dictionary connect_tool.error_layer_flare = {}
dictionary connect_tool.error_layer_frame = {}
dictionary connect_tool.error_layer_hcs = {}
dictionary connect_tool.error_layer_subpoint = {}
dictionary connect_tool.error_layer_visible_disk = {}
dictionary connect_tool.error_layer_xflare = {}
dictionary connect_tool.error_mag_surf = {}
tuple connect_tool.error_magtype = module_io.check_magtype(module_io.magtype)
dictionary connect_tool.error_orbito = {}
dictionary connect_tool.error_read_euv171 = {}
dictionary connect_tool.error_read_euv193 = {}
dictionary connect_tool.error_read_mag = {}
tuple connect_tool.error_reftime = module_io.check_reftime(module_io.reftime)
dictionary connect_tool.error_scraft = {}
dictionary connect_tool.error_time_surf = {}
dictionary connect_tool.error_uncertainty = {}
dictionary connect_tool.euv171_data = {}
dictionary connect_tool.euv171_datetime = {}
dictionary connect_tool.euv171_db = {}
dictionary connect_tool.euv171_found = {}
dictionary connect_tool.euv171_table = {}
list connect_tool.euv171_table_names = ['OBS_MAPS_EUV2CARMAP_SDOSTA_171','OBS_MAPS_SDO_AIA_171']
dictionary connect_tool.euv193_data = {}
dictionary connect_tool.euv193_datetime = {}
dictionary connect_tool.euv193_db = {}
dictionary connect_tool.euv193_found = {}
dictionary connect_tool.euv193_table = {}
list connect_tool.euv193_table_names = ['OBS_MAPS_EUV2CARMAP_SDOSTA_193','OBS_MAPS_SDO_AIA_193']
tuple connect_tool.event = module_event.Event(event_id=flare['event_id'],event_type=flare['event_type'],date_begin=datetime.datetime.strptime(flare['date_begin'],'%Y-%m-%d %H:%M:%S'),location=[flare['longitude'],flare['latitude']])
list connect_tool.events = []
dictionary connect_tool.fieldlines = {}
dictionary connect_tool.footpoints = {}
connect_tool.heliospheric_model = module_io.hmodel,\
string connect_tool.help_message
Initial value:
1 = """
2 Usage :\n
3 python connect_tool.py -sc sc_name -hmodel heliospheric_model -cmodel coronal_model -magtype magnetic_type -reftime reference_time -sc sc_name -y year -m month -d day -H hour
4 [-h] : brief help
5 scName : SC/Planet name. May have multiple names (-sc Name1 -sc Name2...). PSP,STA,EARTH,ALL. Default PSP
6 heliospheric_model : Heliospheric model. PARKER. Default PARKER.
7 coronal_model : Coronal model. PFSS,MFM. Default PFSS.
8 magnetic_type : Type of magnetic data. WSO,NSO,ADAPT for PFSS coronal model. Default WSO. DUMFRIC for MFM coronal model. Default DUMFRIC.
9 reference_time : Referential time. SCTIME,SUNTIME. Default SCTIME.
10 year : year in UTC. Default today UTC year.
11 month : month in UTC. Default today UTC month.
12 day : day in UTC. Default today UTC day.
13 hour : hour in UTC. Default 0.
14 """
int connect_tool.i = 0
connect_tool.i0 = 0
int connect_tool.i1 = 0
tuple connect_tool.ifile = open(path_file_connectivity[scraft],'w')
int connect_tool.ilevel = 0
list connect_tool.images_in = []
dictionary connect_tool.insitu = {}
list connect_tool.item_error = item_errors[i]
list connect_tool.item_errors = []
list connect_tool.item_names = []
list connect_tool.item_path = item_paths[i]
list connect_tool.item_paths = []
tuple connect_tool.log_id = module_io.open_log(__file__)
dictionary connect_tool.mag_data = {}
dictionary connect_tool.mag_datetime = {}
dictionary connect_tool.mag_db = {}
list connect_tool.mag_filenames = []
dictionary connect_tool.mag_found = {}
dictionary connect_tool.mag_surf = {}
connect_tool.magnetogram_type = module_io.magtype,\
dictionary connect_tool.main_connect_point = {}
string connect_tool.message = '('
int connect_tool.nerror = 0
list connect_tool.operation_mode = {}
dictionary connect_tool.output_basename = {}
dictionary connect_tool.output_dirname = {}
dictionary connect_tool.output_id = {}
tuple connect_tool.path = os.path.join(db_element['dirname'],db_element['filename'])
dictionary connect_tool.path_background_euv171 = {}
dictionary connect_tool.path_background_euv193 = {}
dictionary connect_tool.path_background_mag = {}
dictionary connect_tool.path_file_cme = {}
dictionary connect_tool.path_file_connectivity = {}
dictionary connect_tool.path_file_coronalhole = {}
dictionary connect_tool.path_file_fieldline = {}
dictionary connect_tool.path_file_flare = {}
dictionary connect_tool.path_file_footpoint = {}
dictionary connect_tool.path_file_hcs = {}
dictionary connect_tool.path_file_parameter = {}
dictionary connect_tool.path_file_visible_disk = {}
dictionary connect_tool.path_file_xflare = {}
dictionary connect_tool.path_final_legend_euv171 = {}
dictionary connect_tool.path_final_legend_euv193 = {}
dictionary connect_tool.path_final_legend_mag = {}
dictionary connect_tool.path_final_nolegend_euv171 = {}
dictionary connect_tool.path_final_nolegend_euv193 = {}
dictionary connect_tool.path_final_nolegend_mag = {}
dictionary connect_tool.path_layer_cme = {}
dictionary connect_tool.path_layer_connectivity = {}
dictionary connect_tool.path_layer_coronalhole = {}
dictionary connect_tool.path_layer_flare = {}
dictionary connect_tool.path_layer_frame = {}
dictionary connect_tool.path_layer_hcs = {}
dictionary connect_tool.path_layer_subpoint = {}
dictionary connect_tool.path_layer_visible_disk = {}
dictionary connect_tool.path_layer_xflare = {}
dictionary connect_tool.polarities = {}
dictionary connect_tool.positions_sc = {}
dictionary connect_tool.positions_ss = {}
connect_tool.present_folder = True
tuple connect_tool.ref_j2000 = module_timespace.Time()
connect_tool.reference_time = module_io.reftime,\
tuple connect_tool.results
Initial value:
1 = module_db.find_element(module_db.database_table,connector,cursor,\
2  scraft = scraft,\
3  heliospheric_model = module_io.hmodel,\
4  coronal_model = module_io.cmodel,\
5  reference_time = module_io.reftime,\
6  magnetogram_type = module_io.magtype,\
7  operation_mode = operation_mode[sc_ref[scraft]],\
8  date = times_sc[sc_ref[scraft]][0].datetime.strftime('%Y-%m-%d %H:%M:%S'))
def find_element
Find an element in a table.
Definition: module_db.py:257
dictionary connect_tool.sc_ref = {}
string connect_tool.scraft = scraft,\
connect_tool.scraft_identical = scraft
list connect_tool.scrafts = []
dictionary connect_tool.seed_points_ss = {}
list connect_tool.seed_points_ss_all = []
tuple connect_tool.seed_points_ss_max = module_connectivity.point_distribution('GAUSSIAN',module_connectivity.nproba,positions_ss[scraft][1])
tuple connect_tool.seed_points_ss_min = module_connectivity.point_distribution('GAUSSIAN',module_connectivity.nproba,positions_ss[scraft][0])
tuple connect_tool.time_0 = datetime.datetime.today()
tuple connect_tool.time_1 = datetime.datetime.today()
tuple connect_tool.time_2 = datetime.datetime.today()
dictionary connect_tool.times_sc = {}
dictionary connect_tool.times_surf = {}
list connect_tool.tmp = []
dictionary connect_tool.ts_date = {}
dictionary connect_tool.ts_path = {}
dictionary connect_tool.ts_table = {}
dictionary connect_tool.vhelio = {}
connect_tool.write3d = False