SWDatabase
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
Variables
test_compare_discover_ace Namespace Reference

Compare for some dates DISCOVER and ACE timeseries (insitu velocity or magnetic field). More...

Variables

string help_message
 
string var = 'vel'
 
tuple date_min = module_timespace.today_midnight-datetime.timedelta(days=10)
 
 date_max = module_timespace.today_midnight
 
 save = False
 
tuple image_path = os.path.join('dir.test','TEST','tmp.png')
 
 ymin = None
 
 ymax = None
 
tuple vmin = float(sys.argv[2])
 
tuple vmax = float(sys.argv[2])
 
string table1 = 'OBS_INSITU_VELOCITY_DISCOVER'
 
string table2 = 'OBS_INSITU_VELOCITY_ACELV4'
 
tuple ndates = int((date_max - date_min).total_seconds()/24/3600)
 
list dates = [ date_min + i*datetime.timedelta(hours=24) for i in range(0,ndates+1) ]
 
tuple fig_size = (18,9)
 
int fig_resolution = 100
 
string color1 = 'r'
 
string color2 = 'b'
 
int i = 0
 
 timeserie_glo1 = None
 
tuple db1 = database_timeserie.datetime2file(table1,date_in)
 
tuple data1 = interface_read_timeserie.read(table1,os.path.join(db1['dirname'],db1['filename']))
 
 timeserie_glo2 = None
 
tuple db2 = database_timeserie.datetime2file(table2,date_in)
 
tuple data2 = interface_read_timeserie.read(table2,os.path.join(db2['dirname'],db2['filename']))
 
tuple fig = plt.figure(num=1,figsize=fig_size,dpi=fig_resolution)
 
string title = 'Comparing DISCOVER and ACE %s from %s to %s'
 
int index1 = 3
 
int index2 = 0
 
tuple sub = plt.subplot(111)
 
string ylabel = 'Norm(V) km/s'
 

Detailed Description

Compare for some dates DISCOVER and ACE timeseries (insitu velocity or magnetic field).

Read the file in a database, and plot concatenated timeseries on the same plot.

1 Usage :
2 
3 python test_compare_discover_ace.py [options]
4 [-h] : brief help
5 -var vel/mag : compare insitu velocity or magnetic field measurement. Defaut: vel.
6 -b d1 : beginning date YYYYmmdd (today midnight - 10 days by default)
7 -e d2 : end date YYYYmmdd (today midnight by default)
8 --save : save figure
9 -o imagePath : name of output image. Default: dir.test/TEST/tmp.png
10 -ymin minVal : minimum value of the plot. Call sub.set_ylim function.
11 -ymax maxVal : maximum value of the plot. Call sub.set_ylim function.

Variable Documentation

string test_compare_discover_ace.color1 = 'r'
string test_compare_discover_ace.color2 = 'b'
tuple test_compare_discover_ace.data1 = interface_read_timeserie.read(table1,os.path.join(db1['dirname'],db1['filename']))
tuple test_compare_discover_ace.data2 = interface_read_timeserie.read(table2,os.path.join(db2['dirname'],db2['filename']))
test_compare_discover_ace.date_max = module_timespace.today_midnight
tuple test_compare_discover_ace.date_min = module_timespace.today_midnight-datetime.timedelta(days=10)
list test_compare_discover_ace.dates = [ date_min + i*datetime.timedelta(hours=24) for i in range(0,ndates+1) ]
tuple test_compare_discover_ace.db1 = database_timeserie.datetime2file(table1,date_in)
tuple test_compare_discover_ace.db2 = database_timeserie.datetime2file(table2,date_in)
tuple test_compare_discover_ace.fig = plt.figure(num=1,figsize=fig_size,dpi=fig_resolution)
int test_compare_discover_ace.fig_resolution = 100
tuple test_compare_discover_ace.fig_size = (18,9)
string test_compare_discover_ace.help_message
Initial value:
1 = """
2 \nCompare for some dates DISCOVER and ACE timeseries (insitu velocity or magnetic field).\n
3 Usage :\n
4 python test_compare_discover_ace [options]
5 [-h] : brief help
6 -var vel/mag : compare insitu velocity or magnetic field measurement. Defaut: vel.
7 -b d1 : beginning date YYYYmmdd (today midnight - 10 days by default)
8 -e d2 : end date YYYYmmdd (today midnight by default)
9 --save : save figure
10 -o imagePath : name of output image. Default: dir.test/TEST/tmp.png
11 -ymin minVal : minimum value of the plot. Call sub.set_ylim function.
12 -ymax maxVal : maximum value of the plot. Call sub.set_ylim function.
13 """
int test_compare_discover_ace.i = 0
list test_compare_discover_ace.image_path = os.path.join('dir.test','TEST','tmp.png')
int test_compare_discover_ace.index1 = 3
int test_compare_discover_ace.index2 = 0
tuple test_compare_discover_ace.ndates = int((date_max - date_min).total_seconds()/24/3600)
test_compare_discover_ace.save = False
tuple test_compare_discover_ace.sub = plt.subplot(111)
string test_compare_discover_ace.table1 = 'OBS_INSITU_VELOCITY_DISCOVER'
string test_compare_discover_ace.table2 = 'OBS_INSITU_VELOCITY_ACELV4'
test_compare_discover_ace.timeserie_glo1 = None
test_compare_discover_ace.timeserie_glo2 = None
string test_compare_discover_ace.title = 'Comparing DISCOVER and ACE %s from %s to %s'
list test_compare_discover_ace.var = 'vel'
tuple test_compare_discover_ace.vmax = float(sys.argv[2])
tuple test_compare_discover_ace.vmin = float(sys.argv[2])
string test_compare_discover_ace.ylabel = 'Norm(V) km/s'
test_compare_discover_ace.ymax = None
test_compare_discover_ace.ymin = None