-
Notifications
You must be signed in to change notification settings - Fork 0
/
CheckDataBlocks.py
65 lines (46 loc) · 962 Bytes
/
CheckDataBlocks.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import os
import opusFC
import numpy
import pandas as pd
from ggplot import *
import csv
# Change current working directory to where OPUS files are stored in your computer
os.chdir('file path')
# Check currect working directory
cwd = os.getcwd()
file_list = os.listdir(os.curdir)
# print(file_list)
# Loop through files in file_list
L = []
del file_list[0] # remove .DS_Store
# f = 'BEP.0'
SNM = []
INS = []
DAT = []
TIM = []
EXP = []
DUR = []
CNM = []
RES = []
ZFF = []
NPT = []
LWN = []
LXV = []
FXV = []
minY = []
maxY = []
dbs=[]
# loop of all files
count = 0
for f in file_list:
try:
dbs = opusFC.listContents(f)
count += 1
print(count,f)
print(dbs)
for i in dbs:
data = opusFC.getOpusData(f, i)
print(data.parameters)
except ValueError:
print('Cant process a non-Opus file', f)
continue