-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrun_checker.py
More file actions
75 lines (59 loc) · 3.27 KB
/
run_checker.py
File metadata and controls
75 lines (59 loc) · 3.27 KB
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
66
67
68
69
70
71
72
73
74
75
import time
import numpy as np
import os
from glob import glob
import checkStatusFunctions
import statusPage
import sys
import argparse
import datetime
#parser = argparse.ArgumentParser(description=__doc__,formatter_class=argparse.RawDescriptionHelpFormatter)
#parser.add_argument('--season', help='Season number', type=int)
#args = parser.parse_args()
#season=str(args.season)
import make_Mastermaster
def checker(season):
seaTim=open('seasonTime'+season+'.txt','r') #season num \n date_time
seTi=seaTim.readlines()
#print(seTi)
seaTim.close()
season=seTi[0].split('\n')[0]
time=seTi[1]
#print(season)
#print(time)
print('./forcephoto/output/dp'+season+'/'+time+'_DESY'+season)
#statusList=checkStatusFunctions.checkStatus('status'+season+'.txt',season,time)
#print(statusList)
statusList = []
txtfile = open('PostProcStatus'+str(season)+'.txt', 'r')
lines = txtfile.read().split('\n')
txtfile.close()
for line in lines:
statusList.append(line)
statusPage.statusPage(statusList,season)
# if not os.path.isdir('./html_files'):
# os.makedirs('./html_files')
# os.system('mv PostProc_statusPage'+str(season)+'.html html_files/')
os.system('rsync -a PostProc_statusPage'+str(season)+'.html [email protected]:/des_web/www/html/desgw/post-processing-all/')
os.system('rsync -a theProtoATC_'+str(season)+'*.html [email protected]:/des_web/www/html/desgw/post-processing-all/')
os.system('rsync -a masterHTML'+str(season)+'.html [email protected]:/des_web/www/html/desgw/post-processing-all/')
os.system('rsync -a LightCurve_des_real*.png [email protected]:/des_web/www/html/desgw/post-processing-all/')
os.system('rsync -a fakemltest_'+str(season)+'*.png [email protected]:/des_web/www/html/desgw/post-processing-all/')
os.system('rsync -a fullmap_'+str(season)+'*.png [email protected]:/des_web/www/html/desgw/post-processing-all/')
os.system('rsync -a -r GifAndFitsstamps* [email protected]:/des_web/www/html/desgw/post-processing-all/')
print("copied html to codemanager")
# make_Mastermaster.mastermaster('masterHTML'+str(season)+'.html', 'Post Proc', season) original
date = datetime.date.today()
today = date.strftime("%Y%m%d")
make_Mastermaster.mastermaster('masterHTML'+str(season)+'.html', 'Post Proc', today, season)
return("Run checker done")
def public(season):
#candidate page
os.system('rsync -aP theProtoATC_'+str(season)+'*.html [email protected]:/des_web/www/html/desgw/post-processing-all/')
#link to cand page
os.system('rsync -aP masterHTML'+str(season)+'.html [email protected]:/des_web/www/html/desgw/post-processing-all/')
#plots and things for cands
os.system('rsync -a LightCurve_des_real*.png [email protected]:/des_web/www/html/desgw/post-processing-all/')
os.system('rsync -a fakemltest_'+str(season)+'*.png [email protected]:/des_web/www/html/desgw/post-processing-all/')
os.system('rsync -a fullmap_'+str(season)+'*.png [email protected]:/des_web/www/html/desgw/post-processing-all/')
os.system('rsync -a -r GifAndFitsstamps* [email protected]:/des_web/www/html/desgw/post-processing-all/')