forked from xmm/arches
ReadMe
This commit is contained in:
@@ -8,7 +8,7 @@ det_pix_as=0.05
|
|||||||
""" Arches core R=15 arcsec """
|
""" Arches core R=15 arcsec """
|
||||||
arches_ra=266.4595833
|
arches_ra=266.4595833
|
||||||
arches_dec=-28.8219444
|
arches_dec=-28.8219444
|
||||||
arches_Rmax_as=15
|
arches_Rmax_as=130
|
||||||
|
|
||||||
pn_threshold = 0.2
|
pn_threshold = 0.2
|
||||||
mos_threshold=[0.2,0.3]
|
mos_threshold=[0.2,0.3]
|
||||||
|
@@ -108,7 +108,7 @@ def plotLC(plt,threshold,fileName):
|
|||||||
else:
|
else:
|
||||||
print("File not found "+fileName+"\n")
|
print("File not found "+fileName+"\n")
|
||||||
|
|
||||||
def init_work_dir(obsid):
|
def init_work_dir(obsid,products_dir=None):
|
||||||
|
|
||||||
import arches
|
import arches
|
||||||
|
|
||||||
@@ -117,7 +117,6 @@ def init_work_dir(obsid):
|
|||||||
|
|
||||||
archive_dir=root_path+'/data/archive'
|
archive_dir=root_path+'/data/archive'
|
||||||
events_dir=root_path+'/data/processed'
|
events_dir=root_path+'/data/processed'
|
||||||
products_dir=root_path+'/products'
|
|
||||||
ds9reg_dir=root_path+'/data/ds9reg'
|
ds9reg_dir=root_path+'/data/ds9reg'
|
||||||
|
|
||||||
create_folder(products_dir)
|
create_folder(products_dir)
|
||||||
@@ -175,7 +174,7 @@ def get_det_coords(ra,dec,image,key):
|
|||||||
dety=float(dy)
|
dety=float(dy)
|
||||||
return detx,dety
|
return detx,dety
|
||||||
|
|
||||||
def run_mosspectra(key,ccds,check=True):
|
def run_mosspectra(key,ccds,check=True,elow="350",ehigh="1100"):
|
||||||
|
|
||||||
eventfile = f'{key}-allevc.fits'
|
eventfile = f'{key}-allevc.fits'
|
||||||
|
|
||||||
@@ -217,13 +216,24 @@ def run_mosspectra(key,ccds,check=True):
|
|||||||
'withregion=yes', f'regionfile={region_fn}',
|
'withregion=yes', f'regionfile={region_fn}',
|
||||||
'keepinterfiles=yes',
|
'keepinterfiles=yes',
|
||||||
'pattern=12',
|
'pattern=12',
|
||||||
'elow=350',
|
f'elow={elow}',
|
||||||
'ehigh=1100',
|
f'ehigh={ehigh}',
|
||||||
f'ccds="{ccds}"',]
|
f'ccds="{ccds}"',]
|
||||||
|
|
||||||
w('mosspectra', inargs).run()
|
w('mosspectra', inargs).run()
|
||||||
|
|
||||||
def run_pnspectra(key,quads,check=True):
|
|
||||||
|
def run_bkgimsky(key,elow="350",ehigh="1100"):
|
||||||
|
# convert background image in det coordinates (e.g. mos1S001-bkgimdet-350-1100.fits) to sky coordinates
|
||||||
|
# runs after mosback!
|
||||||
|
bkgimsky = f'{key}-bkgimdet-{elow}-{ehigh}.fits'
|
||||||
|
inargs = [f'intemplate={key}-fovimsky-{elow}-{ehigh}.fits',
|
||||||
|
f'inimage={key}-bkgimdet-{elow}-{ehigh}.fits',
|
||||||
|
f'outimage={key}-bkgimsky-{elow}-{ehigh}.fits',
|
||||||
|
'withdetxy=false', 'withskyxy=false',]
|
||||||
|
w('rotdet2sky', inargs).run()
|
||||||
|
|
||||||
|
def run_pnspectra(key,quads,check=True,elow="350",ehigh="1100"):
|
||||||
eventfile = f'{key}-allevc.fits'
|
eventfile = f'{key}-allevc.fits'
|
||||||
|
|
||||||
(detx,dety)=get_det_coords(arches_ra,arches_dec,f'{key}-fovimt.fits',key)
|
(detx,dety)=get_det_coords(arches_ra,arches_dec,f'{key}-fovimt.fits',key)
|
||||||
@@ -265,8 +275,8 @@ def run_pnspectra(key,quads,check=True):
|
|||||||
f'regionfile={region_fn}',
|
f'regionfile={region_fn}',
|
||||||
'keepinterfiles=yes',
|
'keepinterfiles=yes',
|
||||||
'pattern=0',
|
'pattern=0',
|
||||||
'elow=350',
|
f'elow={elow}',
|
||||||
'ehigh=1100',
|
f'ehigh={ehigh}',
|
||||||
f'quads="{quads}"',]
|
f'quads="{quads}"',]
|
||||||
|
|
||||||
w('pnspectra', inargs, ).run()
|
w('pnspectra', inargs, ).run()
|
||||||
@@ -319,6 +329,6 @@ def group_spectrum(key=None, group_min=25, oot=False):
|
|||||||
fxcm.write('ign bad\n')
|
fxcm.write('ign bad\n')
|
||||||
fxcm.write('cpd /xs\n')
|
fxcm.write('cpd /xs\n')
|
||||||
fxcm.write('setpl en\n')
|
fxcm.write('setpl en\n')
|
||||||
fxcm.write('@../../data/xspec/wabs_apec_cflux.xcm\n')
|
fxcm.write('@../../../data/xspec/wabs_apec_cflux.xcm\n')
|
||||||
fxcm.write('pl lda delchi\n')
|
fxcm.write('pl lda delchi\n')
|
||||||
fxcm.close()
|
fxcm.close()
|
||||||
|
@@ -1,9 +1,21 @@
|
|||||||
|
Вне зависимости от того, будет запускаться SAS или ESAS, необходимо запустить первую команду:
|
||||||
|
|
||||||
### 01_init_events.py
|
### 01_init_events.py
|
||||||
|
|
||||||
Создает списки событий и помещает их в ```arches/data/processed```
|
Создает списки событий и помещает их в ```arches/data/processed```
|
||||||
Оригинальные файлы со списками событий задаются в файлах ```uds/data/evtlists/*.txt```
|
Оригинальные файлы со списками событий задаются в файлах ```arches/data/archive```
|
||||||
|
|
||||||
### 02_merge_events.py
|
## ESAS
|
||||||
|
|
||||||
|
### 02_esas_image.py
|
||||||
|
|
||||||
|
### 03_esas_cheese.py
|
||||||
|
|
||||||
|
### 04_esas_spectra.py
|
||||||
|
|
||||||
|
Запускает [mos,pn]spectra/[mos,pn]back
|
||||||
|
|
||||||
|
### 05_esas_group_spectra.py
|
||||||
|
|
||||||
|
Делает групировку спектров
|
||||||
|
|
||||||
Создает объедененный список событий и помещает его в ```uds/products```. Этот список событий нужен, в основном для извлечения спектров с помощью ```srctool```.
|
|
||||||
|
Reference in New Issue
Block a user