Functions | |
def | polarity_1 |
def | polarity_2 |
Variables | |
string | scraft = 'STA' |
float | rss = 2.5 |
tuple | date_min = datetime.datetime(2019,11,1,0) |
tuple | date_max = datetime.datetime(2019,12,5,12) |
int | delay = 12 |
plot = True | |
string | frame_spice = 'IAU_SUN' |
tuple | folder_test = os.path.join('dir.test','TEST') |
tuple | ndates = int((date_max - date_min).total_seconds()/delay/3600) |
list | dates = [ date_min + i*datetime.timedelta(hours=delay) for i in range(0,ndates+1) ] |
list | times = [] |
tuple | time_in = module_timespace.Time() |
string | obs_mag = 'OBS_INSITU_MAG_STEREOA' |
string | obs_vel = 'OBS_INSITU_VELOCITY_STEREOA' |
string | observer = 'SUN' |
list | point_sc = positions_iau_sun[i] |
int | delta_max = 3 |
list | v_wind = data_v[3] |
tuple | vector_mag_iausun = module_timespace.Coordinate() |
bx = vector_mag_hee.x | |
by = vector_mag_hee.y | |
bz = vector_mag_hee.z | |
list | bnorm = data_b[3] |
success = polarity2 | |
tuple | sun = sub.scatter(0,0,color = 'y') |
tuple | text_sun = sub.text(0,0,'Sun') |
tuple | sc_ex = point_sc.r*math.sin(math.pi/2-point_sc.lat*module_common.deg2rad) |
tuple | sc_ey = point_sc.r*math.sin(math.pi/2-point_sc.lat*module_common.deg2rad) |
tuple | sc_norm = math.sqrt(sc_ex**2+sc_ey**2) |
tuple | sc = sub.scatter(sc_ex,sc_ey) |
tuple | ex = sub.arrow(sc_ex,sc_ey,1,0,length_includes_head=True,head_width=0.1,head_length=0.1) |
tuple | ey = sub.arrow(sc_ex,sc_ey,0,1,length_includes_head=True,head_width=0.1,head_length=0.1) |
tuple | text_ex = sub.text(sc_ex+1,sc_ey ,'ex') |
tuple | text_ey = sub.text(sc_ex ,sc_ey+1,'ey') |
tuple | u = sub.arrow(sc_ex,sc_ey, math.cos(point_sc.lon*module_common.deg2rad), math.sin(point_sc.lon*module_common.deg2rad),length_includes_head=True,head_width=0.1,head_length=0.1,color='b') |
tuple | ephi = sub.arrow(sc_ex,sc_ey,-math.sin(point_sc.lon*module_common.deg2rad), math.cos(point_sc.lon*module_common.deg2rad),length_includes_head=True,head_width=0.1,head_length=0.1,color='b') |
tuple | mephi = sub.arrow(sc_ex,sc_ey, math.sin(point_sc.lon*module_common.deg2rad),-math.cos(point_sc.lon*module_common.deg2rad),length_includes_head=True,head_width=0 ,head_length=0 ,color='b',linestyle='dashed') |
tuple | text_u = sub.text(sc_ex+math.cos(point_sc.lon*module_common.deg2rad),sc_ey+math.sin(point_sc.lon*module_common.deg2rad),'u') |
tuple | text_ephi = sub.text(sc_ex-math.sin(point_sc.lon*module_common.deg2rad),sc_ey+math.cos(point_sc.lon*module_common.deg2rad),'ephi') |
tuple | b_spiral_norm = math.sqrt(b_spiral_ex**2+b_spiral_ey**2) |
tuple | b_spiral = sub.arrow(sc_ex,sc_ey,b_spiral_ex/b_spiral_norm,b_spiral_ey/b_spiral_norm,length_includes_head=True,head_width=0.1,head_length=0.1,color='k') |
tuple | text_b_spiral = sub.text(sc_ex+b_spiral_ex/b_spiral_norm,sc_ey+b_spiral_ey/b_spiral_norm,'Bparker \nPsi_p = %7.2f'%(psi_parker)) |
tuple | b_perp1 = sub.arrow(sc_ex,sc_ey, dx, dy,length_includes_head=True,color='k',linestyle='dashdot',linewidth=3) |
tuple | b_perp2 = sub.arrow(sc_ex,sc_ey,-dx,-dy,length_includes_head=True,color='k',linestyle='dashdot',linewidth=3) |
tuple | point = sub.scatter(x_list[i]/sc_norm,y_list[i]/sc_norm,color='k',marker = '.') |
string | color = 'green' |
tuple | b = sub.arrow(sc_ex,sc_ey,bx/bnorm,by/bnorm,length_includes_head=True,head_width=0.1,head_length=0.1,color = color) |
string | command = 'eog %s/test_polarity_*.png' |
def test_polarity.polarity_1 | ( | bx, | |
by, | |||
bz, | |||
point | |||
) |
def test_polarity.polarity_2 | ( | bx, | |
by, | |||
vwind, | |||
point | |||
) |
tuple test_polarity.b = sub.arrow(sc_ex,sc_ey,bx/bnorm,by/bnorm,length_includes_head=True,head_width=0.1,head_length=0.1,color = color) |
tuple test_polarity.b_perp1 = sub.arrow(sc_ex,sc_ey, dx, dy,length_includes_head=True,color='k',linestyle='dashdot',linewidth=3) |
tuple test_polarity.b_perp2 = sub.arrow(sc_ex,sc_ey,-dx,-dy,length_includes_head=True,color='k',linestyle='dashdot',linewidth=3) |
tuple test_polarity.b_spiral = sub.arrow(sc_ex,sc_ey,b_spiral_ex/b_spiral_norm,b_spiral_ey/b_spiral_norm,length_includes_head=True,head_width=0.1,head_length=0.1,color='k') |
tuple test_polarity.b_spiral_norm = math.sqrt(b_spiral_ex**2+b_spiral_ey**2) |
list test_polarity.bnorm = data_b[3] |
list test_polarity.bx = vector_mag_hee.x |
list test_polarity.by = vector_mag_hee.y |
list test_polarity.bz = vector_mag_hee.z |
string test_polarity.color = 'green' |
string test_polarity.command = 'eog %s/test_polarity_*.png' |
tuple test_polarity.date_max = datetime.datetime(2019,12,5,12) |
tuple test_polarity.date_min = datetime.datetime(2019,11,1,0) |
list test_polarity.dates = [ date_min + i*datetime.timedelta(hours=delay) for i in range(0,ndates+1) ] |
int test_polarity.delay = 12 |
int test_polarity.delta_max = 3 |
tuple test_polarity.ephi = sub.arrow(sc_ex,sc_ey,-math.sin(point_sc.lon*module_common.deg2rad), math.cos(point_sc.lon*module_common.deg2rad),length_includes_head=True,head_width=0.1,head_length=0.1,color='b') |
tuple test_polarity.ex = sub.arrow(sc_ex,sc_ey,1,0,length_includes_head=True,head_width=0.1,head_length=0.1) |
tuple test_polarity.ey = sub.arrow(sc_ex,sc_ey,0,1,length_includes_head=True,head_width=0.1,head_length=0.1) |
tuple test_polarity.folder_test = os.path.join('dir.test','TEST') |
string test_polarity.frame_spice = 'IAU_SUN' |
tuple test_polarity.mephi = sub.arrow(sc_ex,sc_ey, math.sin(point_sc.lon*module_common.deg2rad),-math.cos(point_sc.lon*module_common.deg2rad),length_includes_head=True,head_width=0 ,head_length=0 ,color='b',linestyle='dashed') |
string test_polarity.obs_mag = 'OBS_INSITU_MAG_STEREOA' |
string test_polarity.obs_vel = 'OBS_INSITU_VELOCITY_STEREOA' |
string test_polarity.observer = 'SUN' |
test_polarity.plot = True |
list test_polarity.point_sc = positions_iau_sun[i] |
float test_polarity.rss = 2.5 |
test_polarity.sc_ex = point_sc.r*math.sin(math.pi/2-point_sc.lat*module_common.deg2rad) |
test_polarity.sc_ey = point_sc.r*math.sin(math.pi/2-point_sc.lat*module_common.deg2rad) |
string test_polarity.scraft = 'STA' |
test_polarity.success = polarity2 |
tuple test_polarity.sun = sub.scatter(0,0,color = 'y') |
tuple test_polarity.text_b_spiral = sub.text(sc_ex+b_spiral_ex/b_spiral_norm,sc_ey+b_spiral_ey/b_spiral_norm,'Bparker \nPsi_p = %7.2f'%(psi_parker)) |
tuple test_polarity.text_ephi = sub.text(sc_ex-math.sin(point_sc.lon*module_common.deg2rad),sc_ey+math.cos(point_sc.lon*module_common.deg2rad),'ephi') |
tuple test_polarity.text_sun = sub.text(0,0,'Sun') |
tuple test_polarity.text_u = sub.text(sc_ex+math.cos(point_sc.lon*module_common.deg2rad),sc_ey+math.sin(point_sc.lon*module_common.deg2rad),'u') |
list test_polarity.time_in = module_timespace.Time() |
list test_polarity.times = [] |
tuple test_polarity.u = sub.arrow(sc_ex,sc_ey, math.cos(point_sc.lon*module_common.deg2rad), math.sin(point_sc.lon*module_common.deg2rad),length_includes_head=True,head_width=0.1,head_length=0.1,color='b') |
list test_polarity.v_wind = data_v[3] |
tuple test_polarity.vector_mag_iausun = module_timespace.Coordinate() |