forked from telegraphic/leda_analysis_2016
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathplots.sh
51 lines (44 loc) · 1.57 KB
/
plots.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
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh
# Create many PNG images and a Web page that links to them
# Open the file plots.html in a browser to view
path_to_files="/mnt/md0/total-power/2018" # outrigger h5 files
echo -n > plots.html
for f in /mnt/md0/total-power/2018/outriggers_2018-03-10_11H56M37S.h5 #`ls $path_to_files/*.h5`
do
echo "$f --------------"
fout=`basename $f`
echo "<p>$fout</p>" >> plots.html
for pol in A B
do
if python 01_plot_waterfall.py $f --pol $pol --save --noshow
then
fout=`echo $f | sed s/\.h5/\_${pol}.png/`
fout=`basename $fout`
echo "<img src=$fout><br>" >> plots.html
else echo "<p>$f $pol waterfall Failed</p>" >> plots.html
fi
if python 01_plot_waterfall.py $f --pol $pol --flag --save --noshow
then
fout=`echo $f | sed s/\.h5/\_${pol}_flagged.png/`
fout=`basename $fout`
echo "Flagged<p><img src=$fout><br>" >> plots.html
else echo "<p>$f $pol flagged waterfall Failed</p>" >> plots.html
fi
done
if python plot_peaks.py $f --save --noshow
then
fout=`echo $f | sed s/\.h5/.png/`
fout=`basename $fout`
echo "<p>----------------<br>Max(channel) by channel<p><img src=peaks_$fout><br>" >> plots.html
else echo "<p>$f $pol peaks Failed</p>" >> plots.html
fi
if python plot_peaks.py $f --save --noshow --flag
then
fout=`echo $f | sed s/\.h5/\_flagged.png/`
fout=`basename $fout`
echo "Max(channel) by channel Flagged<p><img src=peaks_$fout><br>" >> plots.html
else echo "<p>$f $pol flagged peaks Failed</p>" >> plots.html
fi
echo "<hr color=red>" >> plots.html
done
exit