File tree Expand file tree Collapse file tree 1 file changed +25
-2
lines changed Expand file tree Collapse file tree 1 file changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -304,6 +304,13 @@ def getArgs():
304
304
action = "store_true"
305
305
)
306
306
307
+ parser .add_argument ('--time' ,
308
+ type = str ,
309
+ default = '0:' ,
310
+ help = 'Time ranges' ,
311
+ required = False
312
+ )
313
+
307
314
parser .add_argument ('--diameter' ,
308
315
type = float ,
309
316
help = 'Reference diamter or length for the case (mm)' ,
@@ -340,6 +347,15 @@ def getArgs():
340
347
args = getArgs ()
341
348
flagProcess = args .process
342
349
flagPdf = args .pdf
350
+ [startTime , endTime ] = args .time .split (":" )
351
+ if endTime == '' :
352
+ endTime = 1.0e6
353
+ else :
354
+ endTime = float (endTime )
355
+ if startTime == '' :
356
+ startTime = 0.0
357
+ else :
358
+ startTime = float (startTime )
343
359
344
360
if (not flagProcess ) and (not flagPdf ):
345
361
print (" It seems that you didn't give me any flags\n " )
@@ -355,7 +371,14 @@ def getArgs():
355
371
sys .exit ()
356
372
357
373
planes = os .listdir (cloud )
358
- times = os .listdir (cloud + planes [0 ])
374
+ timeDirs = os .listdir (cloud + planes [0 ])
375
+
376
+ times = []
377
+ for time in timeDirs :
378
+ if isFloat (time ):
379
+ if float (time ) >= startTime and float (time ) <= endTime :
380
+ times .append (time )
381
+
359
382
360
383
for plane in planes :
361
384
data = []
@@ -364,7 +387,7 @@ def getArgs():
364
387
fileName = cloud + '/' + plane + '/' + time + '/statistic.dat'
365
388
var , subdata = readData (fileName )
366
389
data .extend (subdata )
367
- # print(time)
390
+ print (time )
368
391
369
392
if (flagProcess ):
370
393
process (plane , var ,data )
You can’t perform that action at this time.
0 commit comments