Advertisement
VladislavSavvateev

Untitled

Nov 3rd, 2021
1,099
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. import numpy as np
  2.  
  3. for i in range(6):
  4.     path = 'images/figure' + str(i + 1) + '.txt'
  5.     file = open(path)
  6.     mm_horizontal = float(file.readline())
  7.     file.close()
  8.  
  9.     image = np.loadtxt(path, skiprows=2)
  10.     res = mm_horizontal / image.shape[1]
  11.     print('figure' + str(i + 1) + '.txt: ' + str(res))
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement