This commit is contained in:
2025-04-22 12:05:09 +03:00
parent 8a29c9bcf1
commit efe9b1000a
4 changed files with 63 additions and 3 deletions

38
scripts/01_init_events.py Executable file
View 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'])