spectra
This commit is contained in:
@@ -29,7 +29,7 @@ print("Arches root path: {}".format(root_path))
|
|||||||
archive_dir=root_path+'/data/archive'
|
archive_dir=root_path+'/data/archive'
|
||||||
events_dir=root_path+'/data/processed'
|
events_dir=root_path+'/data/processed'
|
||||||
events_oot_dir=root_path+'/data/processed-oot'
|
events_oot_dir=root_path+'/data/processed-oot'
|
||||||
products_dir=root_path+'/products'
|
products_dir=root_path+'/products/esas'
|
||||||
ds9reg_dir=root_path+'/data/ds9reg'
|
ds9reg_dir=root_path+'/data/ds9reg'
|
||||||
|
|
||||||
fast_track=True
|
fast_track=True
|
||||||
@@ -48,7 +48,7 @@ for obsid in files:
|
|||||||
if(obsid in skip):
|
if(obsid in skip):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
work_dir = init_work_dir(obsid)
|
work_dir = init_work_dir(obsid, products_dir=products_dir)
|
||||||
print(f"\n*** jump to {work_dir} ***\n")
|
print(f"\n*** jump to {work_dir} ***\n")
|
||||||
os.chdir(work_dir)
|
os.chdir(work_dir)
|
||||||
|
|
||||||
|
@@ -27,7 +27,7 @@ print("Arches root path: {}".format(root_path))
|
|||||||
archive_dir=root_path+'/data/archive'
|
archive_dir=root_path+'/data/archive'
|
||||||
events_dir=root_path+'/data/processed'
|
events_dir=root_path+'/data/processed'
|
||||||
events_oot_dir=root_path+'/data/processed-oot'
|
events_oot_dir=root_path+'/data/processed-oot'
|
||||||
products_dir=root_path+'/products'
|
products_dir=root_path+'/products/esas'
|
||||||
ds9reg_dir=root_path+'/data/ds9reg'
|
ds9reg_dir=root_path+'/data/ds9reg'
|
||||||
|
|
||||||
create_folder(products_dir)
|
create_folder(products_dir)
|
||||||
@@ -44,7 +44,7 @@ for obsid in files:
|
|||||||
if(obsid in skip):
|
if(obsid in skip):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
work_dir = init_work_dir(obsid)
|
work_dir = init_work_dir(obsid, products_dir=products_dir)
|
||||||
print(f"\n*** jump to {work_dir} ***\n")
|
print(f"\n*** jump to {work_dir} ***\n")
|
||||||
os.chdir(work_dir)
|
os.chdir(work_dir)
|
||||||
|
|
||||||
|
@@ -27,7 +27,7 @@ print("Arches root path: {}".format(root_path))
|
|||||||
archive_dir=root_path+'/data/archive'
|
archive_dir=root_path+'/data/archive'
|
||||||
events_dir=root_path+'/data/processed'
|
events_dir=root_path+'/data/processed'
|
||||||
events_oot_dir=root_path+'/data/processed-oot'
|
events_oot_dir=root_path+'/data/processed-oot'
|
||||||
products_dir=root_path+'/products'
|
products_dir=root_path+'/products/esas'
|
||||||
ds9reg_dir=root_path+'/data/ds9reg'
|
ds9reg_dir=root_path+'/data/ds9reg'
|
||||||
|
|
||||||
create_folder(products_dir)
|
create_folder(products_dir)
|
||||||
@@ -38,19 +38,36 @@ t.run()
|
|||||||
|
|
||||||
files = glob.glob(archive_dir+'/*')
|
files = glob.glob(archive_dir+'/*')
|
||||||
|
|
||||||
|
|
||||||
for obsid in files:
|
for obsid in files:
|
||||||
obsid = os.path.basename(obsid)
|
obsid = os.path.basename(obsid)
|
||||||
|
|
||||||
if(obsid in skip):
|
if(obsid in skip):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
work_dir = init_work_dir(obsid)
|
work_dir = init_work_dir(obsid, products_dir=products_dir)
|
||||||
print(f"\n*** jump to {work_dir} ***\n")
|
print(f"\n*** jump to {work_dir} ***\n")
|
||||||
os.chdir(work_dir)
|
os.chdir(work_dir)
|
||||||
|
|
||||||
run_mosspectra('mos1S001','T T F T T F T')
|
elow='350'
|
||||||
run_mosspectra('mos2S002','T T T T T T T')
|
ehigh='1100'
|
||||||
run_pnspectra('pnS003','T T T T')
|
|
||||||
|
key='mos1S001'
|
||||||
|
run_mosspectra(key,'T T F T T F T',elow=elow,ehigh=ehigh)
|
||||||
|
run_mosback( key,'T T F T T F T')
|
||||||
|
run_bkgimsky( key,elow=elow,ehigh=ehigh)
|
||||||
|
|
||||||
|
key='mos2S002'
|
||||||
|
run_mosspectra(key,'T T T T T T T',elow=elow,ehigh=ehigh)
|
||||||
|
run_mosback( key,'T T T T T T T')
|
||||||
|
run_bkgimsky( key,elow=elow,ehigh=ehigh)
|
||||||
|
|
||||||
|
key='pnS003'
|
||||||
|
run_pnspectra(key,'T T T T',elow=elow,ehigh=ehigh)
|
||||||
|
run_pnback( key,'T T T T')
|
||||||
|
run_bkgimsky( key,elow=elow,ehigh=ehigh)
|
||||||
|
|
||||||
|
#sys.exit()
|
||||||
|
|
||||||
|
|
||||||
|
|
@@ -1,58 +0,0 @@
|
|||||||
#!/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)
|
|
||||||
|
|
||||||
run_mosback('mos1S001','T T F T T F T')
|
|
||||||
run_mosback('mos2S002','T T T T T T T')
|
|
||||||
run_pnback('pnS003','T T T T')
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@@ -27,7 +27,7 @@ print("Arches root path: {}".format(root_path))
|
|||||||
archive_dir=root_path+'/data/archive'
|
archive_dir=root_path+'/data/archive'
|
||||||
events_dir=root_path+'/data/processed'
|
events_dir=root_path+'/data/processed'
|
||||||
events_oot_dir=root_path+'/data/processed-oot'
|
events_oot_dir=root_path+'/data/processed-oot'
|
||||||
products_dir=root_path+'/products'
|
products_dir=root_path+'/products/esas'
|
||||||
ds9reg_dir=root_path+'/data/ds9reg'
|
ds9reg_dir=root_path+'/data/ds9reg'
|
||||||
|
|
||||||
create_folder(products_dir)
|
create_folder(products_dir)
|
||||||
@@ -44,7 +44,7 @@ for obsid in files:
|
|||||||
if(obsid in skip):
|
if(obsid in skip):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
work_dir = init_work_dir(obsid)
|
work_dir = init_work_dir(obsid, products_dir=products_dir)
|
||||||
print(f"\n*** jump to {work_dir} ***\n")
|
print(f"\n*** jump to {work_dir} ***\n")
|
||||||
os.chdir(work_dir)
|
os.chdir(work_dir)
|
||||||
|
|
Reference in New Issue
Block a user