Skip to content

Commit 1cf2d27

Browse files
committed
more work on status reports
1 parent ce7b8fd commit 1cf2d27

2 files changed

Lines changed: 2 additions & 89 deletions

File tree

archive/analysis/getLogData.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ echo "the entire night was uncalibrated (indicated by the 'skipping' warning).</
6262
echo "<p>To interpret these data, see " >> $logfile
6363
echo "<a href=https://github.com/markmac99/ukmon-pitools/wiki/UKMON-Pi-Toolset-FAQ#Interpreting_the_Uncalibrated_Report>here</a></p>" >> $logfile
6464
echo "<pre>" >> $logfile
65-
grep "Skipping" $lastmtch >> $logfile
65+
grep "Skipping" $lastmtch | egrep -v "directory|pickle" >> $logfile
6666
echo "</pre>" >> $logfile
6767

6868
echo "<h2 id=fails>Failed Match Report</h2>" >> $logfile

archive/ukmon_pylib/reports/getSolutionStati.py

Lines changed: 1 addition & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -5,93 +5,6 @@
55
import sys
66

77

8-
def getSolutionStati(fname):
9-
with open(fname, 'r') as inf:
10-
lis = inf.readlines()
11-
# find start of interesting data
12-
totnew = 0
13-
totchk = 0
14-
gotnew = 0
15-
gotchk = 0
16-
chktraj = False
17-
newtraj = False
18-
for li in lis:
19-
# check for new data for existing solns
20-
if 'Checking trajectory at ' in li and chktraj is False:
21-
thistraj = li
22-
chktraj = True
23-
totchk += 1
24-
continue
25-
if 'Checking trajectory at ' in li and chktraj is True:
26-
spls = thistraj.strip().split(' ')
27-
print(f'{spls[3]} {spls[4]} no new data')
28-
totchk += 1
29-
thistraj = li
30-
chktraj = True
31-
continue
32-
if "New Trajectory solution failed" in li and chktraj is True:
33-
spls = thistraj.strip().split(' ')
34-
print(f'{spls[3]} {spls[4]} no improvement')
35-
chktraj = False
36-
continue
37-
if "Shower:" in li and chktraj is True:
38-
spls = thistraj.strip().split(' ')
39-
spl2 = li.strip().split(' ')
40-
try:
41-
if spl2[3] == '...':
42-
shwr = 'Spo'
43-
else:
44-
shwr = spl2[3]
45-
except:
46-
if spl2[1] == '...':
47-
shwr = 'Spo'
48-
else:
49-
shwr = spl2[1]
50-
51-
print(f'{spls[3]} {spls[4]} updated as {shwr}')
52-
gotchk += 1
53-
chktraj = False
54-
continue
55-
56-
# check for new groups
57-
if "Observations:" in li:
58-
thistraj = None
59-
newtraj = True
60-
totnew += 1
61-
continue
62-
if "Observations:" not in li and newtraj is True and thistraj is None:
63-
thistraj = li
64-
continue
65-
if "-------" in li and newtraj is True:
66-
spls = thistraj.strip().split(' ')
67-
print(f'{spls[3]} {spls[4]} not matched')
68-
newtraj = False
69-
thistraj = None
70-
continue
71-
if "Shower:" in li and newtraj is True:
72-
spls = thistraj.strip().split(' ')
73-
spl2 = li.strip().split(' ')
74-
try:
75-
if spl2[3] == '...':
76-
shwr = 'Spo'
77-
else:
78-
shwr = spl2[3]
79-
except:
80-
if spl2[1] == '...':
81-
shwr = 'Spo'
82-
else:
83-
shwr = spl2[1]
84-
print(f'{spls[3]} {spls[4]} solved as {shwr}')
85-
gotnew += 1
86-
newtraj = False
87-
thistraj = None
88-
continue
89-
if "SOLVING RUN DONE" in li:
90-
break
91-
92-
return totnew, totchk, gotnew, gotchk
93-
94-
958
def parseDistriblog(logname):
969
lis = open(logname,'r').readlines()
9710
dta = [x for x in lis if ('added to fails' in x or ('saved' in x and 'to' in x)) and ('CorrelateEngine' in x or 'CorrelateRMS' in x)]
@@ -102,4 +15,4 @@ def parseDistriblog(logname):
10215

10316
if __name__ == '__main__':
10417
fname = sys.argv[1]
105-
print(parseDistriblog(fname))
18+
parseDistriblog(fname)

0 commit comments

Comments
 (0)