generated from erosita/uds
setup
This commit is contained in:
38
scripts/01_init_events.py
Executable file
38
scripts/01_init_events.py
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from pysas.wrapper import Wrapper as w
|
||||
import os, sys
|
||||
|
||||
from arches.utils import *
|
||||
from arches.config import *
|
||||
|
||||
root_path=dirname(dirname(dirname(inspect.getfile(arches))))
|
||||
print("Arches root path: {}".format(root_path))
|
||||
|
||||
sys.exit()
|
||||
|
||||
root='/data/xmm'
|
||||
|
||||
inargs = ['--version']
|
||||
t = w('sasver', inargs)
|
||||
t.run()
|
||||
|
||||
obsid='0862470501'
|
||||
local_ccf=f'{root}/work/{obsid}/ccf.cif'
|
||||
work_dir=f'{root}/work/{obsid}'
|
||||
|
||||
os.environ['SAS_ODF'] = f'{root}/arc/{obsid}/odf/'
|
||||
|
||||
if not os.path.exists(work_dir):
|
||||
os.makedirs(work_dir)
|
||||
|
||||
os.chdir(work_dir)
|
||||
|
||||
if not os.path.exists(local_ccf):
|
||||
w('cifbuild', []).run()
|
||||
else:
|
||||
print("Skip cifbuild, SAS_CCF = {}".format(local_ccf))
|
||||
|
||||
os.environ['SAS_CCF'] = local_ccf
|
||||
|
||||
print(os.environ['SAS_CCF'])
|
Reference in New Issue
Block a user