Replies: 1 comment
-
strain_list=[]
crop = 80
row = 20
for n in range(1,20):
if n <10:
DicMap = hrdic.Map(DicFilePath, "B0000{}.txt".format(n))
Displacement = DicMap.xd.reshape(np.shape(DicMap))
Position = DicMap.xc.reshape(np.shape(DicMap))
print(n)
displacement = np.mean(Displacement[crop:-crop,crop:row+crop])- np.mean(Displacement[crop:-crop,-crop-row:-crop])
position = np.mean(Position[crop:-crop,crop:row+crop])- np.mean(Position[crop:-crop,-crop-row:-crop])
strain_list.append(abs(displacement)/abs(position))
else:
DicMap = hrdic.Map(DicFilePath, "B000{}.txt".format(n))
Displacement = DicMap.xd.reshape(np.shape(DicMap))
Position = DicMap.xc.reshape(np.shape(DicMap))
print(n)
displacement = np.mean(Displacement[crop:-crop,crop:row+crop])- np.mean(Displacement[crop:-crop,-crop-row:-crop])
position = np.mean(Position[crop:-crop,crop:row+crop])- np.mean(Position[crop:-crop,-crop-row:-crop])
strain_list.append(abs(displacement)/abs(position))
strain_list
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hi everyone,
working on master branch v 0.93.6
i wanted to calculate the average stain in the loading direction for each region of interest (ROI) for each step. Working with Dongchen we got the code below. please could someone double check it make sense. :)
Beta Was this translation helpful? Give feedback.
All reactions