generated from erosita/uds
74 lines
1.5 KiB
Python
Executable File
74 lines
1.5 KiB
Python
Executable File
#!/usr/bin/env python
|
|
|
|
from pysas.wrapper import Wrapper as w
|
|
import os, sys
|
|
from os.path import dirname
|
|
import inspect
|
|
import glob
|
|
|
|
import os.path
|
|
from os import path
|
|
import subprocess
|
|
import numpy as np
|
|
import matplotlib.pyplot as plt
|
|
from astropy.io import fits
|
|
from astropy.table import Table
|
|
from matplotlib.colors import LogNorm
|
|
|
|
import pyds9
|
|
|
|
import arches
|
|
from arches.utils import *
|
|
from arches.config import *
|
|
|
|
root_path=dirname(dirname(dirname(inspect.getfile(arches))))
|
|
print("Arches root path: {}".format(root_path))
|
|
|
|
archive_dir=root_path+'/data/archive'
|
|
events_dir=root_path+'/data/processed'
|
|
events_oot_dir=root_path+'/data/processed-oot'
|
|
products_dir=root_path+'/products'
|
|
ds9reg_dir=root_path+'/data/ds9reg'
|
|
|
|
|
|
|
|
create_folder(products_dir)
|
|
|
|
inargs = ['--version']
|
|
t = w('sasver', inargs)
|
|
t.run()
|
|
|
|
files = glob.glob(archive_dir+'/*')
|
|
|
|
for obsid in files:
|
|
obsid = os.path.basename(obsid)
|
|
|
|
if(obsid in skip):
|
|
continue
|
|
|
|
work_dir = init_work_dir(obsid)
|
|
print(f"\n*** jump to {work_dir} ***\n")
|
|
os.chdir(work_dir)
|
|
|
|
inargs = ['mos1file=mos1S001-allevc.fits',
|
|
'mos2file=mos1S002-allevc.fits',
|
|
'pnfile=pnS003-allevc.fits',
|
|
'pnootfile=pnS003-oot.fits',
|
|
'elowlist=350',
|
|
'ehighlist=1100',
|
|
'scale=0.4',
|
|
'mlmin=15',
|
|
'ratetotal=0.2',
|
|
'dist=50.',
|
|
'keepinterfiles=no',]
|
|
|
|
|
|
w('cheese', inargs).run()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|