-
Notifications
You must be signed in to change notification settings - Fork 0
/
multi.sh
38 lines (26 loc) · 965 Bytes
/
multi.sh
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
## Script for running C program and evaluation of the algorithm.
##########
rm eval1.txt
rm eval2.txt
FILES=/path/to/directory/with/records/*.dat
# Compile detector
gcc -o myDetector -O myDetector.c -lm -lwfdb
# For all record files run detector
for f in $FILES
do
f=$(basename $f)
f=${f%.*}
echo $f
./myDetector -r $f
bxb -r $f -a atr qrs -l eval1.txt eval2.txt
done
# Calculate aggregate statistics
sumstats eval1.txt eval2.txt >results.txt
# dat - signal recordings from the database
# atr - reference annotations from the database
# qrs - annotations of implemented algorithm
# results.txt - final statistics for reporting
# If your implementation is in Matalab, then comment out compiling and running
# the C program and just use the part for evaluation (bxb and sumstats).
# Other explanations of how to run programs and convert records and annotation
# files are described on the web-classrom under certain laboratory sessions.