ConnectTool
 All Classes Namespaces Files Functions Variables Pages
Namespaces | Variables
check_polarity.py File Reference

Namespaces

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

Variables

tuple check_polarity.log_id = module_io.open_log(__file__)
 
tuple check_polarity.time_0 = datetime.datetime.today()
 
string check_polarity.help_message
 
list check_polarity.scrafts = []
 
tuple check_polarity.error_hmodel = module_io.check_hmodel(module_io.hmodel )
 
tuple check_polarity.error_cmodel = module_io.check_cmodel(module_io.cmodel )
 
tuple check_polarity.error_magtype = module_io.check_magtype(module_io.magtype)
 
tuple check_polarity.error_reftime = module_io.check_reftime(module_io.reftime)
 
dictionary check_polarity.error_scraft = {}
 
tuple check_polarity.date_in = module_timespace.Time()
 
dictionary check_polarity.times_sc = {}
 
tuple check_polarity.date_begin = date_in.datetime-datetime.timedelta(days=10)
 
 check_polarity.delta = date_in.datetime-date_begin
 
 check_polarity.ndays = delta.days
 
list check_polarity.dates = [ date_begin + i*datetime.timedelta(days=2) for i in range(0,1) ]
 
list check_polarity.polarities = [None]
 
dictionary check_polarity.ts_table = {}
 
dictionary check_polarity.ts_table_velocity = {}
 
dictionary check_polarity.error_db = {}
 
dictionary check_polarity.error_hcs = {}
 
dictionary check_polarity.error_fieldline = {}
 
dictionary check_polarity.error_param = {}
 
dictionary check_polarity.error_connectivity = {}
 
dictionary check_polarity.error_mag = {}
 
dictionary check_polarity.error_velocity = {}
 
dictionary check_polarity.error_polarity = {}
 
dictionary check_polarity.data_db = {}
 
dictionary check_polarity.data_param = {}
 
dictionary check_polarity.point_hcs = {}
 
dictionary check_polarity.point_connectivity = {}
 
dictionary check_polarity.data_mag = {}
 
dictionary check_polarity.data_velocity = {}
 
dictionary check_polarity.data_polarity = {}
 
dictionary check_polarity.path_db = {}
 
dictionary check_polarity.path_hcs = {}
 
dictionary check_polarity.path_param = {}
 
dictionary check_polarity.path_connectivity = {}
 
dictionary check_polarity.layer_connectivity = {}
 
dictionary check_polarity.layer_hcs = {}
 
dictionary check_polarity.ss_points = {}
 
tuple check_polarity.results
 
 check_polarity.present_folder = True
 
tuple check_polarity.stream = open(path_param[date],'r')
 
tuple check_polarity.path_fieldline = os.path.join(data_db[date]['dirname'],data_db[date]['file_fieldline'])
 Read its HCS file if error_db[date].error: error_hcs[date].error = True; error_hcs[date].message = 'No output found. More...
 
tuple check_polarity.fieldlines = ascii_fieldline.read(path_fieldline)
 
list check_polarity.item_names = []
 Measured polarity: sign(Br) polarity_real = np.sign(data_mag[date][0]) For Slow SW, Fast SW, Measured SW for i,mode in enumerate(['SSW','FSW','M']): if ss_point[mode] is None: continue #Corresponding HCS latitude point_hcs[date][i] = module_timespace.Coordinate() point_hcs[date][i].lon = ss_point[mode].lon point_hcs[date][i].lat = module_toolbox_num.interpolation1D([point_hcs.lon for point_hcs in points_hcs],[point_hcs.lat for point_hcs in points_hcs],point_hcs[date][i].lon) #Computed polarity: sign(lat_connectivity-lat_hcs) polarity_computed = np.sign(ss_point[mode].lat-point_hcs[date][i].lat) #Check data_polarity[date][i] = (polarity_real * polarity_computed) > 0. More...
 
list check_polarity.item_errors = []
 
int check_polarity.nerror = 0
 
list check_polarity.item_error = item_errors[i]
 
list check_polarity.operation_mode = data_db[date_in.datetime]
 
tuple check_polarity.output_dirname = module_io.output_localdir(module_io.hmodel,module_io.cmodel,module_io.reftime,operation_mode,scraft,module_io.magtype,date_in.datetime)
 
tuple check_polarity.output_basename = module_io.output_localname(module_io.hmodel,module_io.cmodel,module_io.reftime,scraft,module_io.magtype,operation_mode,date_in.datetime)
 
tuple check_polarity.path_layer_polarity = os.path.join(output_dirname,output_basename + '_layerpolarity.png')
 
list check_polarity.color = module_plot.color_connectivity[scraft]
 
string check_polarity.title = 'Parameter file path:'
 
tuple check_polarity.time_2 = datetime.datetime.today()