Sie sind auf Seite 1von 17

from numpy import *

from math import *

def read_texture_file ( filename ) :


f = open ( filename , r )
sphere_dict ={}
contact_dict ={}
tmp =
tmplist =[]
while tmp [0:7] < > * Sphere :
tmp = f . readline ()
sphere_dict . update ({ Np : int ( tmp . split ( ) [1])
})
tmp = f . readline ()
while tmp [0:8] < > * Contact :
tmplist = tmp . split ( )
sphere_dict [ int ( tmplist [0]) ]=[ float ( tmplist
[1]) , float ( tmplist [2]) , float ( tmplist [3]) ,
float ( tmplist [4]) ]
tmp = f . readline ()
contact_dict . update ({ Nc : int ( tmp . split ( ) [1])
, Ncb : int ( tmp . split ( ) [2]) })
tmp = f . readline ()
while tmp < > and tmp [0:1] < > * :
tmplist = tmp . split ( )
tmp0 = tmplist [4]. strip () . replace ( Vector3
( , ) . replace ( ) , ) . split ( , )
tmp1 = tmplist [5]. strip () . replace ( Vector3
( , ) . replace ( ) , ) . split ( , )
contact_dict [ int ( tmplist [0]) ]=[ int ( tmplist
[1]) , int ( tmplist [2]) , tmplist [3] , float ( tmp0
[0]) , float ( tmp0 [1]) , float ( tmp1 [0]) , float (
tmp1 [1]) ]
tmp = f . readline ()
f . close ()
NGUYEN Nho Gia Hien

return [ sphere_dict , contact_dict ]

def create_loop ( sphere_dict , contact_dict ) :


clist ={}
free_particle =[]
free_contact =[]
boundary_contact ={}
for i in contact_dict . keys () :
if type ( i ) is int :
if contact_dict [ i ][2] < > s :
boundary_contact . update ({ i :
contact_dict [ i ]})
del contact_dict [ i ]
len_free_contact0 =10
while len_free_contact0 < > len ( free_contact ) :
clist ={}
len_free_contact0 = len ( free_contact )
for point_id in sphere_dict . keys () : #
traverse all points to record every
contact based on one point and eliminate
those free particles
if type ( point_id ) is int :
one_clist =[]
for i in contact_dict . keys () :
# find
every contact pass this point
identified point_id
if type ( i ) is int :
if contact_dict [ i ][0]== point_id
or contact_dict [ i ][1]==
point_id :
one_clist . append ( i )
if len ( one_clist ) ==0 or len ( one_clist )
==1:
free_particle . append ( point_id ) ; del
NGUYEN Nho Gia Hien

sphere_dict [ point_id ]
if len ( one_clist ) ==1:
free_contact . append ( one_clist
[0]) ; del contact_dict [
one_clist [0]]
else :
clist . update ({ point_id : one_clist })
return [ clist , free_particle , free_contact ,
boundary_contact ]

def create_loop1 ( clist , sphere_dict , contact_dict ) :


angle =[]
for point_id in clist . keys () :
for i in range ( len ( clist [ point_id ])
-1) :
# set all contacts of one
point in counterclock order
for j in range ( len ( clist [
point_id ]) -i -1) :
if c1_counterclock_c2 (
contact_dict [ clist [
point_id ][ j ]] ,
contact_dict [ clist [
point_id ][ j +1]] ,
sphere_dict ) :
tmp = clist [ point_id ][ j
]; clist [ point_id ][ j
]= clist [ point_id ][ j
+1]; clist [ point_id
][ j +1]= tmp
for j in range ( len ( clist [ point_id ])
-1) :
angle . append ([ clist [ point_id ][ j
] , clist [ point_id ][ j +1] ,
point_id ])
angle . append ([ clist [ point_id ][ len (
clist [ point_id ]) -1] , clist [
point_id ][0] , point_id ])
NGUYEN Nho Gia Hien

return angle

def create_loop2 ( angle ) :


import os as Os
loop =[]
tmp_len =0
while len ( angle ) < >0 and tmp_len < > len ( angle ) :
one_loop =[]
tmp_len = len ( angle )
print len , tmp_len
start_contact = angle [0][0]
one_loop . append ( start_contact )
end_contact = angle [0][1]
joint = angle [0][2]
# print angle [0]
del angle [0]

while end_contact < > start_contact :


one_loop . append ( end_contact )
for tmp in angle :
if tmp [0]== end_contact and tmp [2] < >
joint :
# print tmp ,
# raw_input ( )
end_contact = tmp [1]
joint = tmp [2]
angle . remove ( tmp )
break
one_loop . append ( end_contact )
# print one_loop
if len ( one_loop ) <=12: loop . append ( one_loop )
return loop
NGUYEN Nho Gia Hien

def c1_counterclock_c2 ( contact1 , contact2 , sphere_dict


):
# c1 opening angle bigger than c2
import math as Math
if contact1 [0]== contact2 [0]:
refcx = sphere_dict [ contact1 [0]][1]; refcy =
sphere_dict [ contact1 [0]][2]
ref1x = sphere_dict [ contact1 [1]][1]; ref1y =
sphere_dict [ contact1 [1]][2]
ref2x = sphere_dict [ contact2 [1]][1]; ref2y =
sphere_dict [ contact2 [1]][2]
elif contact1 [0]== contact2 [1]:
refcx = sphere_dict [ contact1 [0]][1]; refcy =
sphere_dict [ contact1 [0]][2]
ref1x = sphere_dict [ contact1 [1]][1]; ref1y =
sphere_dict [ contact1 [1]][2]
ref2x = sphere_dict [ contact2 [0]][1]; ref2y =
sphere_dict [ contact2 [0]][2]
elif contact1 [1]== contact2 [0]:
refcx = sphere_dict [ contact1 [1]][1]; refcy =
sphere_dict [ contact1 [1]][2]
ref1x = sphere_dict [ contact1 [0]][1]; ref1y =
sphere_dict [ contact1 [0]][2]
ref2x = sphere_dict [ contact2 [1]][1]; ref2y =
sphere_dict [ contact2 [1]][2]
elif contact1 [1]== contact2 [1]:
refcx = sphere_dict [ contact1 [1]][1]; refcy =
sphere_dict [ contact1 [1]][2]
ref1x = sphere_dict [ contact1 [0]][1]; ref1y =
sphere_dict [ contact1 [0]][2]
ref2x = sphere_dict [ contact2 [0]][1]; ref2y =
sphere_dict [ contact2 [0]][2]
cont1 =[ ref1x - refcx , ref1y - refcy ]; cont2 =[
ref2x - refcx , ref2y - refcy ]
if cont1 [1] >=0.0:
NGUYEN Nho Gia Hien

theta1 = Math . acos ( cont1 [0]/ Math . sqrt (


cont1 [0]* cont1 [0]+ cont1 [1]* cont1 [1]) )
else :
theta1 =2* Math . pi - Math . acos ( cont1 [0]/ Math
. sqrt ( cont1 [0]* cont1 [0]+ cont1 [1]*
cont1 [1]) )
if cont2 [1] >=0.0:
theta2 = Math . acos ( cont2 [0]/ Math . sqrt (
cont2 [0]* cont2 [0]+ cont2 [1]* cont2 [1]) )
else :
theta2 =2* Math . pi - Math . acos ( cont2 [0]/ Math
. sqrt ( cont2 [0]* cont2 [0]+ cont2 [1]*
cont2 [1]) )
if theta1 >= theta2 :
return True
else :
return False

def get_data ( source_file ) :


# main
sub of data collection
import copy as Copy
data = read_texture_file ( source_file )
tmpdata = Copy . deepcopy ( data )
clist = create_loop ( tmpdata [0] , tmpdata [1])
angle = create_loop1 ( clist [0] , tmpdata [0] , tmpdata
[1])
loop_list = create_loop2 ( angle )
loop_dict ={}
for i in range ( len ( loop_list ) ) :
loop_dict . update ({ i : loop_list [ i ]})
loop_dict . update ({ Nl : len ( loop_list ) })
return [ data [0] , data [1] , loop_dict , clist [1] , clist
[2] , clist [3]]
# sphere_dict , contact_dict ,
loop_dict , free_particle , free_contact ,
boundary_contact
NGUYEN Nho Gia Hien

#^^^^^^^^^^^^^^^^^^^^^^^^ data_collection
^^^^^^^^^^^^^^^^^^^^^^^^^^
# vvvvvvvvvvvvvvvvvvvvvvvv data_analysis_processing
vvvvvvvvvvvvvvvvvvvvvvvvv
# here backwards is the way to detect all loops (
no need to take care unless you interest )
# from here onwards is the loop analysis
processing
# important note : from the outcome of function
data_processing , you can get all analysing
results
def data_processing ( source_file ) :
#
# most important three data containers input in
this sub --- sphere_dict , contact_dict ,
loop_dict
# most important output is loop_data , which
contant basic informations ( like sideNumber ,
area , loopTensor , centroidPosition , etc .) of each
loop
# loop_data ={ id_l :[ H ( loopTensor ) , s_num ( sideNumber )
, direction ( loopDirection ) , elongation (
elongationRatio ) , area , isconvex , void_ratio ,
centroid ( loopCentroid x , y ) ] , ...}
tmp = get_data ( source_file )
sphere_dict = tmp [0]
# sphere_dict ={ Np :
np , id_p :[ radius ,x ,y , z ] , ...}
contact_dict = tmp [1]
# contact_dict ={ Nc
: nc , Ncb : ncb ( contact with boundary ) , id_c :[
id_p1 , id_p2 , s or b ( spheres contact or
boundary contact ) ] ,...}
loop_dict = tmp [2]
# loop_dict ={ Nl : nl
, id_l =[ id_c0 , id_c1 , id_c2 , id_c3 , id_c0 ] , ...}
free_particle = tmp [3]
free_contact = tmp [4]
loop_data ={}
NGUYEN Nho Gia Hien

for i in loop_dict . keys () :


if type ( i ) is int :
tmp1 = edgelist_to_pointlist ( loop_dict [ i ] ,
sphere_dict , contact_dict )
pointlist = tmp1 [0]
isconvex = tmp1 [1]
s_num = len ( loop_dict [ i ]) -1
H = matrix ([[0.0 ,0.0] ,
[0.0 ,0.0]])
F = matrix ([[0.0 ,0.0] ,
[0.0 ,0.0]])
area =0.0
centroid =[0.0 ,0.0]
for j in range ( len ( pointlist ) ) :
if ( j == len ( pointlist ) -1) :
point0 =[ sphere_dict [ pointlist [ j ]][1] ,
sphere_dict [ pointlist [ j ]][2]]
point1 =[ sphere_dict [ pointlist [0]][1] ,
sphere_dict [ pointlist [0]][2]]
id1 = pointlist [ j ]; id2 = pointlist [0]
else :
point0 =[ sphere_dict [ pointlist [ j ]][1] ,
sphere_dict [ pointlist [ j ]][2]]
point1 =[ sphere_dict [ pointlist [ j +1]][1] ,
sphere_dict [ pointlist [ j +1]][2]]
id1 = pointlist [ j ]; id2 = pointlist [ j +1]
branch =( matrix ( point1 ) - matrix ( point0 ) )
length = linalg . norm ( branch )
H = H + branch . T * branch / length / length
id_contact = getContact ( id1 , id2 , contact_dict
)
tmp = contact_dict [ id_contact ]
force = matrix ([ tmp [3]+ tmp [5] , tmp [4]+ tmp
[6]])
if id2 == tmp [0]: force = -1.0* force
F = F + force . T * branch
tmp = point0 [0]* point1 [1] - point1 [0]* point0
[1]
NGUYEN Nho Gia Hien

area += tmp
centroid [0]+=( point0 [0]+ point1 [0]) * tmp
centroid [1]+=( point0 [1]+ point1 [1]) * tmp
area =0.5* area
centroid [0]= centroid [0]/6.0/ area
centroid [1]= centroid [1]/6.0/ area
area = - area
F = F / area
tmp1 = linalg . eig ( F ) [0]
mesoq = abs (( tmp1 [0] - tmp1 [1]) /( tmp1 [0]+ tmp1 [1])
)
# raw_input ( str ( tmp1 [0]) + + str ( tmp1 [1]) +
+ str ( mesoq ) )
direction = getDirection ( H )
D =H -0.5*( H [0 ,0]+ H [1 ,1])
elongation = sqrt ( D [0 ,0]* D [0 ,0]+ D [0 ,1]* D [0 ,1]+ D
[1 ,0]* D [1 ,0]+ D [1 ,1]* D [1 ,1]) /( H [0 ,0]+ H
[1 ,1])
loop_data . update ({ i :[ H , s_num , direction ,
elongation , area , isconvex , void ( area ,
pointlist , sphere_dict ) , centroid , mesoq ]})
F = matrix ([[0.0 ,0.0] ,
[0.0 ,0.0]])
for i in contact_dict . keys () :
if type ( i ) is int :
if contact_dict [ i ][2]== s :
tmppoint0 = sphere_dict [ contact_dict [
i ][0]]
point0 =[ tmppoint0 [1] , tmppoint0 [2]]
tmppoint1 = sphere_dict [ contact_dict [
i ][1]]
point1 =[ tmppoint1 [1] , tmppoint1 [2]]
branch = matrix ( point1 ) - matrix ( point0
)
length = linalg . norm ( branch )
F = F + branch . T * branch / length / length
Np = sphere_dict [ Np ]; Np_free = len ( free_particle )
Nc = contact_dict [ Nc ] - contact_dict [ Ncb ]; Nc_free
NGUYEN Nho Gia Hien

= len ( free_contact ) ; Nl = loop_dict [ Nl ]


L =2.0* float ( Nc ) / float ( Nl ) ; Z =2.0* float ( Nc ) / float (
Np ) ;
F =(2.0/ float ( Np ) ) * F
A = abs ( linalg . eig ( F ) [0][0] - linalg . eig ( F ) [0][1])
global_feature =[ F ,A ,L ,Z , Np , Np_free , Nc , Nc_free , Nl ]
return [ global_feature , loop_data , loop_dict ,
sphere_dict , contact_dict ]
def getContact ( id1 , id2 , contact_dict ) :
id_c = -1
for i in contact_dict . keys () :
if type ( i ) is int :
if contact_dict [ i ][0]== id1 and contact_dict [ i
][1]== id2 :
id_c = i
break
if contact_dict [ i ][1]== id1 and contact_dict [ i
][0]== id2 :
id_c = i
break
return id_c
def getDirection ( H ) :
tmp = linalg . eig ( H )
sig =[ tmp [0][0] , tmp [0][1]]
# eigV =[[ tmp [1][0 ,0] , tmp [1][1 ,0]] ,[ tmp [1][0 ,1] , tmp
[1][1 ,1]]] sqrt (3.0)
if sig [0] >= sig [1]:
direction = atan2 ( tmp [1][1 ,0] , tmp [1][0 ,0])
else :
direction = atan2 ( tmp [1][1 ,1] , tmp [1][0 ,1])
direction = direction *180.0/ pi
if direction <0.0: direction +=180.0
return direction
def void ( area , pointlist , sphere_dict ) :
sphereArea =0.0
NGUYEN Nho Gia Hien

10

for j in range ( len ( pointlist ) ) :


if ( j == len ( pointlist ) -1) :
point0 =[ sphere_dict [ pointlist [j -1]][1] ,
sphere_dict [ pointlist [j -1]][2]]
point1 =[ sphere_dict [ pointlist [ j ]][1] ,
sphere_dict [ pointlist [ j ]][2]]
point2 =[ sphere_dict [ pointlist [0]][1] ,
sphere_dict [ pointlist [0]][2]]
elif ( j ==0) :
point0 =[ sphere_dict [ pointlist [ len (
pointlist ) -1]][1] , sphere_dict [
pointlist [ len ( pointlist ) -1]][2]]
point1 =[ sphere_dict [ pointlist [ j ]][1] ,
sphere_dict [ pointlist [ j ]][2]]
point2 =[ sphere_dict [ pointlist [ j +1]][1] ,
sphere_dict [ pointlist [ j +1]][2]]
else :
point0 =[ sphere_dict [ pointlist [j -1]][1] ,
sphere_dict [ pointlist [j -1]][2]]
point1 =[ sphere_dict [ pointlist [ j ]][1] ,
sphere_dict [ pointlist [ j ]][2]]
point2 =[ sphere_dict [ pointlist [ j +1]][1] ,
sphere_dict [ pointlist [ j +1]][2]]
vector0 = matrix ( point0 ) - matrix ( point1 ) ;
vector1 = matrix ( point2 ) - matrix ( point1 )
angle0 = atan2 ( vector0 [0 ,1] , vector0 [0 ,0])
*180.0/ pi
if angle0 <0.0: angle0 = angle0 +360.0
angle1 = atan2 ( vector1 [0 ,1] , vector1 [0 ,0])
*180.0/ pi
if angle1 <0.0: angle1 = angle1 +360.0
if angle1 < angle0 : angle1 =360.0+ angle1
counterclock = angle1 - angle0
sphereArea += counterclock /360.0* pi *
sphere_dict [ pointlist [ j ]][0]*
sphere_dict [ pointlist [ j ]][0]
# return ( area - sphereArea ) / area
return area - sphereArea
NGUYEN Nho Gia Hien

11

def edgelist_to_pointlist ( edge_list , sphere_dict ,


contact_dict ) :
# convert edges of one
loop to vertexes chain in order
point_list =[]
isconvex = True
for i in range ( len ( edge_list ) -1) :
if isconvex == True :
if ( contact_dict [ edge_list [ i ]][0]==
contact_dict [ edge_list [ i +1]][0]) :
point_list . append ( contact_dict [
edge_list [ i ]][0])
A = sphere_dict [ contact_dict [ edge_list [
i ]][1]]
B = sphere_dict [ contact_dict [ edge_list [
i ]][0]]
C = sphere_dict [ contact_dict [ edge_list [
i +1]][1]]
elif ( contact_dict [ edge_list [ i ]][0]==
contact_dict [ edge_list [ i +1]][1]) :
point_list . append ( contact_dict [
edge_list [ i ]][0])
A = sphere_dict [ contact_dict [ edge_list [
i ]][1]]
B = sphere_dict [ contact_dict [ edge_list [
i ]][0]]
C = sphere_dict [ contact_dict [ edge_list [
i +1]][0]]
elif ( contact_dict [ edge_list [ i ]][1]==
contact_dict [ edge_list [ i +1]][0]) :
point_list . append ( contact_dict [
edge_list [ i ]][1])
A = sphere_dict [ contact_dict [ edge_list [
i ]][0]]
B = sphere_dict [ contact_dict [ edge_list [
i ]][1]]
C = sphere_dict [ contact_dict [ edge_list [
NGUYEN Nho Gia Hien

12

i +1]][1]]
elif ( contact_dict [ edge_list [ i ]][1]==
contact_dict [ edge_list [ i +1]][1]) :
point_list . append ( contact_dict [
edge_list [ i ]][1])
A = sphere_dict [ contact_dict [ edge_list [
i ]][0]]
B = sphere_dict [ contact_dict [ edge_list [
i ]][1]]
C = sphere_dict [ contact_dict [ edge_list [
i +1]][0]]
else :
raw_input ( wrong : not linked edge )
S =( A [1] - C [1]) *( B [2] - C [2]) -( A [2] - C [2]) *( B
[1] - C [1])
if S >0: isconvex = False
else :
if ( contact_dict [ edge_list [ i ]][0]==
contact_dict [ edge_list [ i +1]][0]) :
point_list . append ( contact_dict [
edge_list [ i ]][0])
elif ( contact_dict [ edge_list [ i ]][0]==
contact_dict [ edge_list [ i +1]][1]) :
point_list . append ( contact_dict [
edge_list [ i ]][0])
elif ( contact_dict [ edge_list [ i ]][1]==
contact_dict [ edge_list [ i +1]][0]) :
point_list . append ( contact_dict [
edge_list [ i ]][1])
elif ( contact_dict [ edge_list [ i ]][1]==
contact_dict [ edge_list [ i +1]][1]) :
point_list . append ( contact_dict [
edge_list [ i ]][1])
else :
raw_input ( wrong : not linked edge )
return [ point_list , isconvex ]
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
NGUYEN Nho Gia Hien

13

data_analysis_processing
^^ ^^ ^^^ ^^ ^^^ ^^ ^^^ ^^ ^^^ ^^ ^^^ ^^ ^^^ ^^ ^^^ ^^ ^

# analyse all files in folder with left subString


leftstr and put the results into subFolder ./
summary
# you can try the results of the code by the trial
data source dev =0.25 _0 .168 _0 .012. txt (0.168
denote porosity , 0.012 axial strain )
# another important thing is how to get the data
source , like dev =0.25 _0 .168 _0 .012. txt , from any
strain state in yade simulation :
# please call the function get_texture ( write_file ,
filename , transient_status ) at the file atteched
deviatoric . py whenever you want to save the
texture data
def record_all_files ( leftstr ) :
import os
strlen = len ( leftstr )
try :
f1 = open ( ./ summary / summary_ + leftstr + _1 + .
csv , w )
except :
os . makedirs ( summary )
f1 = open ( ./ summary / summary_ + leftstr + _1 + .
csv , w )
f1 . write ( e22 ,q , ev , porosity , L3 , q_3 , area_3 , L4 , q_4 ,
area_4 , L5 , q_5 , area_5 , L6 , q_6 , area_6 , L7 , q_7 ,
area_7 , L8 , q_8 , area_8 , L9 , q_9 , area_9 , L10 , q_10 ,
area_10 + \ n )
for i in os . listdir ( ./ ) :
if i [: strlen ]== leftstr : # and 0.0 <= float ( i
[15:20]) <0.025:# and ( float ( i [15:20]) -0.001)
%0.002 <1 e -6:
# read file control
print processing file , i
status ={}
f = open (i , r )
NGUYEN Nho Gia Hien

14

tmp = f . readline ()
if tmp [:4]== * e22 :
status . update ({ e22 : float ( tmp . split (
) [1]) })
tmp = f . readline ()
status . update ({ q : float ( tmp . split (
) [1]) })
tmp = f . readline ()
status . update ({ ev : float ( tmp . split (
) [1]) })
tmp = f . readline ()
status . update ({ porosity : float ( tmp .
split ( ) [1]) })
f . close ()
tmp = data_processing ( i )
statistics ={1:0 ,2:0 ,3:0 , q_3 :0.0 ,
area_3 :0.0 ,4:0 , q_4 :0.0 , area_4
:0.0 ,\
5:0 , q_5 :0.0 ,
area_5
:0.0 ,6:0 , q_6
:0.0 , area_6
:0.0 ,\
7:0 , q_7 :0.0 ,
area_7
:0.0 ,8:0 , q_8
:0.0 , area_8
:0.0 ,\
9:0 , q_9 :0.0 ,
area_9
:0.0 ,10:0 ,
q_10 :0.0 ,
area_10 :0.0}
for j in tmp [1]. keys () :
try :
if tmp [1][ j ][5]== True or
include_inconvex :
NGUYEN Nho Gia Hien

15

statistics [ tmp [1][ j


][1]]+=1
statistics [ q_ + str ( tmp
[1][ j ][1]) ]+= tmp [1][ j
][8]
statistics [ area_ + str ( tmp
[1][ j ][1]) ]+= tmp [1][ j
][4]
except :
print too large : , tmp [1][ j
][1]
if statistics [3] < >0: statistics [ q_3
]= statistics [ q_3 ]/ statistics [3]
if statistics [4] < >0: statistics [ q_4
]= statistics [ q_4 ]/ statistics [4]
if statistics [5] < >0: statistics [ q_5
]= statistics [ q_5 ]/ statistics [5]
if statistics [6] < >0: statistics [ q_6
]= statistics [ q_6 ]/ statistics [6]
if statistics [7] < >0: statistics [ q_7
]= statistics [ q_7 ]/ statistics [7]
if statistics [8] < >0: statistics [ q_8
]= statistics [ q_8 ]/ statistics [8]
if statistics [9] < >0: statistics [ q_9
]= statistics [ q_9 ]/ statistics [9]
if statistics [10] < >0: statistics [ q_10
]= statistics [ q_10 ]/ statistics
[10]
status . update ({ statistics : statistics
})
f1 . write ( str ( status [ e22 ]) + , + str (
status [ q ]) + , + str ( status [ ev ])
+ , + str ( status [ porosity ]) + , )
f1 . write ( str ( status [ statistics ][3])
+ , + str ( status [ statistics ][ q_3
]) + , + str ( status [ statistics ][
area_3 ]) + , )
f1 . write ( str ( status [ statistics ][4])
NGUYEN Nho Gia Hien

16

+ , + str ( status [ statistics ][ q_4


]) + , + str ( status [ statistics ][
area_4 ]) + , )
f1 . write ( str ( status [ statistics ][5])
+ , + str ( status [ statistics ][ q_5
]) + , + str ( status [ statistics ][
area_5 ]) + , )
f1 . write ( str ( status [ statistics ][6])
+ , + str ( status [ statistics ][ q_6
]) + , + str ( status [ statistics ][
area_6 ]) + , )
f1 . write ( str ( status [ statistics ][7])
+ , + str ( status [ statistics ][ q_7
]) + , + str ( status [ statistics ][
area_7 ]) + , )
f1 . write ( str ( status [ statistics ][8])
+ , + str ( status [ statistics ][ q_8
]) + , + str ( status [ statistics ][
area_8 ]) + , )
f1 . write ( str ( status [ statistics ][9])
+ , + str ( status [ statistics ][ q_9
]) + , + str ( status [ statistics ][
area_9 ]) + , )
f1 . write ( str ( status [ statistics ][10])
+ , + str ( status [ statistics ][ q_10
]) + , + str ( status [ statistics ][
area_10 ]) + \n )
else :
f . close ()
f1 . close ()
record_all_files ( dev =0.25 )

NGUYEN Nho Gia Hien

17

Das könnte Ihnen auch gefallen