Revision | 8d54d703377c5a92f00becf50a9c184fb4fb3d39 (tree) |
---|---|
Zeit | 2009-09-11 00:30:46 |
Autor | lorenzo |
Commiter | lorenzo |
Some changes to these codes to make it easier to work with them and analyze the data.
@@ -337,45 +337,39 @@ | ||
337 | 337 | |
338 | 338 | |
339 | 339 | |
340 | -read=0 | |
341 | - | |
342 | -if (read==1): | |
343 | - | |
344 | - for arg in sys.argv[1:]: | |
345 | - | |
346 | - time_edge_list=p.load(arg) | |
347 | 340 | |
348 | - time_edge_list=time_edge_list.astype("int") | |
341 | +for arg in sys.argv[1:]: | |
349 | 342 | |
350 | - bootcount_data=p.load("tag_and_boot_every_20_sec.dat") | |
351 | - bootcount_data=bootcount_data.astype("int") | |
352 | - print "time to use the new function" | |
353 | - bootcount_cut=resize_bootcount_file2(time_edge_list, bootcount_data) | |
354 | - print "new function is done" | |
355 | - p.save("boot_count_cut.dat",bootcount_cut, fmt='%d') | |
343 | + time_edge_list=p.load(arg) | |
356 | 344 | |
357 | -elif (read==0): | |
345 | +time_edge_list=time_edge_list.astype("int") | |
346 | + | |
347 | +bootcount_data=p.load("tag_and_boot_every_20_sec.dat") | |
348 | +bootcount_data=bootcount_data.astype("int") | |
349 | +print "time to use the new function" | |
350 | +bootcount_cut=resize_bootcount_file2(time_edge_list, bootcount_data) | |
351 | +print "new function is done" | |
352 | +p.save("boot_count_cut.dat",bootcount_cut, fmt='%d') | |
358 | 353 | |
359 | 354 | |
360 | 355 | |
361 | - for arg in sys.argv[1:]: | |
362 | - | |
363 | - time_edge_list=p.load(arg) | |
364 | 356 | |
365 | 357 | |
366 | - time_edge_list=time_edge_list.astype("int") | |
367 | - time_edge_list_reshaped=duplicate_and_mix_array(time_edge_list) | |
368 | - time_edge_list_reshaped=time_edge_list_reshaped.astype("int") | |
369 | - p.save("edge_list_reshaped.dat",time_edge_list_reshaped, fmt='%d') | |
370 | 358 | |
371 | - resized_tag_boot_list=p.load("boot_count_cut.dat") | |
372 | - resized_tag_boot_list=resized_tag_boot_list.astype("int") | |
373 | - | |
374 | - # time_and_boot_edge_list= \ | |
375 | - # associate_boot_to_tag_improved(resized_tag_boot_list,time_edge_list_reshaped) | |
376 | 359 | |
377 | - time_and_boot_edge_list= \ | |
378 | - associate_boot_to_tag_improved2(resized_tag_boot_list,time_edge_list_reshaped) | |
360 | +# time_edge_list=time_edge_list.astype("int") | |
361 | +time_edge_list_reshaped=duplicate_and_mix_array(time_edge_list) | |
362 | +time_edge_list_reshaped=time_edge_list_reshaped.astype("int") | |
363 | +p.save("edge_list_reshaped.dat",time_edge_list_reshaped, fmt='%d') | |
364 | + | |
365 | +# resized_tag_boot_list=p.load("boot_count_cut.dat") | |
366 | +# resized_tag_boot_list=resized_tag_boot_list.astype("int") | |
367 | + | |
368 | +# time_and_boot_edge_list= \ | |
369 | + # associate_boot_to_tag_improved(resized_tag_boot_list,time_edge_list_reshaped) | |
370 | + | |
371 | +time_and_boot_edge_list= \ | |
372 | + associate_boot_to_tag_improved2(bootcount_cut,time_edge_list_reshaped) | |
379 | 373 | |
380 | 374 | |
381 | 375 |
@@ -2,7 +2,7 @@ | ||
2 | 2 | import scipy as s |
3 | 3 | import pylab as p |
4 | 4 | import numpy as n |
5 | -import sys | |
5 | + | |
6 | 6 | |
7 | 7 | |
8 | 8 |