nuees


SUBMITTED BY: bitcoinsachen

DATE: Oct. 22, 2016, 7:48 p.m.

FORMAT: Python 3

SIZE: 1.2 kB

HITS: 658

  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. """
  4. Created on Mon Oct 17 16:24:09 2016
  5. @author: asdf
  6. @Matrikelnummer: 1525911
  7. @Seminar: Wissenschaftliches Programmieren in Python
  8. """
  9. import numpy as np
  10. mypath= 'imsil_out'
  11. from os import listdir
  12. onlyfiles= [f for f in listdir(mypath) if f.endswith('.out')] #suche datein mit der Endung .out im ordner mypath
  13. #print('filelist: ',onlyfiles)
  14. """for daten in i:
  15. i=i+1
  16. i=0"""
  17. tiltliste=onlyfiles
  18. yieldliste = onlyfiles
  19. laenge = len(onlyfiles)-1
  20. i=0
  21. while i <=laenge:
  22. file = mypath+'/'+onlyfiles[i]
  23. searchfile = open(file, "r")
  24. for line in searchfile:
  25. if "tilt=" in line:
  26. # print (line)
  27. auslesen = line
  28. sss=auslesen[18:23]
  29. if " | Backscattered |" in line:
  30. zweilesen = line
  31. # print(zweilesen)
  32. searchfile.close()
  33. # print(line)
  34. liste[i]=auslesen[18:23]
  35. yieldliste[i]=zweilesen[35:40]
  36. #print(auslesen[18:23])
  37. if i > 13:
  38. break
  39. i=i+1
  40. print('tilt list:',liste)
  41. print('yield field', yieldliste)
  42. #print(auslesen[18:23])
  43. #print(f)

comments powered by Disqus