forked from erosita/uds
evening job
This commit is contained in:
@@ -34,7 +34,7 @@ totexp=0.0
|
||||
for tmkey in keylist_tm.keys():
|
||||
print("TM{} in work... init events".format(tmkey))
|
||||
for datakey in keylist_tm[tmkey]:
|
||||
print("--> {}".format(datakey))
|
||||
#print("--> {}".format(datakey))
|
||||
""" Запускаем полностью в холостом режиме, нам нужно получить только названия файлов """
|
||||
outfile_evtool,outfile_expmap=init_events(key=datakey, eband_index=eband[index],
|
||||
infile_dir=infile_dir,
|
||||
@@ -51,7 +51,10 @@ for tmkey in keylist_tm.keys():
|
||||
expmaps.append(outfile_expmap)
|
||||
tstart, tstop = read_tstart_tstop(infile=outfile_evtool)
|
||||
totexp=totexp+(tstop-tstart)
|
||||
print("{} {} {} {}".format(outfile_evtool,tstart,tstop,(tstop-tstart)/1000))
|
||||
print("{}, {} -- {}, {} -- {}, {:.2f} ks".format(outfile_evtool,tstart,tstop,
|
||||
mission2date_utc(tstart),
|
||||
mission2date_utc(tstop),
|
||||
(tstop-tstart)/1000))
|
||||
|
||||
print("\n***\n*** Total exposure: {:.1f} ks\n***".format(totexp))
|
||||
|
||||
|
@@ -52,7 +52,7 @@ do_evtool_esass(evlist=el+'tm6.txt', outfile=pr+'tm6_obs_3.fits', gti='62067699
|
||||
do_badpix_tm6(filename=pr+'tm6_obs_3.fits')
|
||||
"""
|
||||
# TM7
|
||||
do_evtool_esass(evlist=el+'tm7.txt', outfile=pr+'tm7_obs_1.fits', gti='621043136. 621052416.', emin=0.2, emax=10.0, region=region)
|
||||
do_evtool_esass(evlist=el+'tm7.txt', outfile=pr+'tm7_obs_1.fits', gti='621043136. 621052416.', emin=0.2, emax=10.0, region=region, rmlock=True)
|
||||
#do_evtool_esass(evlist=el+'tm7.txt', outfile=pr+'tm7_obs_2.fits', gti='621110272. 621117952.', region=region)
|
||||
|
||||
|
||||
|
@@ -20,18 +20,25 @@ from uds.config import *
|
||||
outkey="mosa_tm0"
|
||||
|
||||
""" find UDS root dir """
|
||||
root_path=dirname(dirname(dirname(inspect.getfile(uds))))
|
||||
|
||||
#root_path=dirname(dirname(dirname(inspect.getfile(uds))))
|
||||
root_path='..'
|
||||
|
||||
print("UDS root path: {}".format(root_path))
|
||||
|
||||
infile_dir=root_path+'/data/processed'
|
||||
outfile_dir=root_path+'/products'
|
||||
|
||||
create_folder(outfile_dir)
|
||||
|
||||
index=5
|
||||
index=5 # select energy band
|
||||
|
||||
do_init = True
|
||||
do_merge = True
|
||||
do_adapt = False # requires CIAO
|
||||
#do_rate = True
|
||||
|
||||
vign=True
|
||||
|
||||
events=[]
|
||||
expmaps=[]
|
||||
@@ -44,10 +51,11 @@ for tmkey in keylist_tm.keys():
|
||||
infile_dir=infile_dir,
|
||||
outfile_dir=outfile_dir,
|
||||
do_init=do_init,
|
||||
do_obsmode=True,
|
||||
do_center=True,
|
||||
do_evtool=True,
|
||||
do_obsmode=False,
|
||||
do_center=False,
|
||||
do_evtool=False,
|
||||
do_expmap=True,
|
||||
vign=vign,
|
||||
ra_cen=ra_cen, de_cen=de_cen,
|
||||
emin_kev=emin_kev[index],
|
||||
emax_kev=emax_kev[index])
|
||||
@@ -56,11 +64,23 @@ for tmkey in keylist_tm.keys():
|
||||
|
||||
""" Собираем общий список событий """
|
||||
outfile_evtool="{}_EventList_en{}.fits".format(os.path.join(outfile_dir,outkey), eband[index])
|
||||
outfile_expmap="{}_ExposureMap_en{}.fits".format(os.path.join(outfile_dir,outkey), eband[index])
|
||||
|
||||
if (vign==True):
|
||||
outfile_expmap="{}_ExposureMap_en{}.vign.fits".format(os.path.join(outfile_dir,outkey), eband[index])
|
||||
else:
|
||||
outfile_expmap="{}_ExposureMap_en{}.novign.fits".format(os.path.join(outfile_dir,outkey), eband[index])
|
||||
|
||||
if(do_merge==True):
|
||||
do_evtool_esass(events=events, outfile=outfile_evtool)
|
||||
do_expmap_ftools(expmaps=expmaps, outfile=outfile_expmap)
|
||||
|
||||
outfile_adapt="{}_ImageAdapt_en{}.fits".format(os.path.join(outfile_dir,outkey), eband[index])
|
||||
function='gaussian'
|
||||
outfile_adapt="{}_ImageAdapt_en{}.{}.fits".format(os.path.join(outfile_dir,outkey), eband[index], function)
|
||||
if(do_adapt==True):
|
||||
do_adapt_ciao(infile=outfile_evtool, outfile=outfile_adapt)
|
||||
|
||||
do_adapt_ciao(infile=outfile_evtool, outfile=outfile_adapt, expmap=outfile_expmap, function=function, expcut=100)
|
||||
|
||||
"""
|
||||
outfile_rate="{}_RateAdapt_en{}.fits".format(os.path.join(outfile_dir,outkey), eband[index])
|
||||
if(do_rate==True):
|
||||
make_rate_map(cntmap=outfile_adapt, expmap=outfile_expmap, outfile=outfile_rate)
|
||||
"""
|
||||
|
@@ -318,7 +318,7 @@ def runme(datakey):
|
||||
#hdulist = fits.open(detmask)
|
||||
#w = WCS(hdulist[0].header)
|
||||
#w.wcs.crval=wcslist[datakey]
|
||||
crossmatch_shu2019(catprep,dlmin=10,refimage=detmask,crval=wcslist[datakey],
|
||||
crossmatch_shu2019(catprep,dlmin=10,refimage=events[ii],crval=wcslist[datakey],
|
||||
catalog=root_path+"/data/Gaia_unWISE/Gaia_unWISE_UDS.fits.catalog")
|
||||
|
||||
"""
|
||||
@@ -362,13 +362,13 @@ def runme(datakey):
|
||||
wcs_update(outfile_evtool[ii],crval=wcslist[key],transformfile=xfm)
|
||||
"""
|
||||
|
||||
#runme("tm7_obs_1")
|
||||
|
||||
runme("tm7_obs_1")
|
||||
|
||||
"""
|
||||
for tmkey in keylist_tm.keys():
|
||||
print("TM{} in work... init events".format(tmkey))
|
||||
for datakey in keylist_tm[tmkey]:
|
||||
print("--> {}".format(datakey))
|
||||
runme(datakey)
|
||||
|
||||
"""
|
||||
|
||||
|
@@ -16,6 +16,13 @@ source <MY PATH>/eSASS4EDR/bin/esass-init.csh
|
||||
|
||||
Попутно этот скрипт унифицирует оригинальные списки событий для последующей обработки. А именно, корректируются слова OBS_MODE=POINING/SURVEY в зависимости от типа наблюдения и производится центрирование на одни и те же координаты с помощью команды ```radec2xy```.
|
||||
|
||||
Для запуска адаптивного сглаживания ```do_adapt = True``` требуется запустить окружение ```ciao```, так как нужна команда ```dmimgadapt```
|
||||
|
||||
```
|
||||
conda activate ciao-4.15
|
||||
source <MY PATH>/eSASS4EDR/bin/esass-init.csh
|
||||
```
|
||||
|
||||
### 03_init_obs.py
|
||||
|
||||
|
||||
@@ -23,3 +30,4 @@ source <MY PATH>/eSASS4EDR/bin/esass-init.csh
|
||||
2) Запускает ```erbox``` в три этапа, чтобы получить рабочий список источников для ```ermldet```.
|
||||
3) Запускает ```ermldet```
|
||||
4) Делает кросс-корреляцию с каталогом Gaia-unWISE ```do_cross_match=True```, которая создает три файла: ```.cross``` -- все пересечения, и ```.ref``` / ```.src``` -- входные каталоги для последующей команды ```wcs_match```
|
||||
|
||||
|
15
scripts/expmaps.txt
Normal file
15
scripts/expmaps.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
../products/tm5_obs_1_ExposureMap_en5.fits,0,0
|
||||
../products/tm5_obs_2_ExposureMap_en5.fits,0,0
|
||||
../products/tm6_obs_1_ExposureMap_en5.fits,0,0
|
||||
../products/tm6_obs_2_badpix_ExposureMap_en5.fits,0,0
|
||||
../products/tm6_obs_3_badpix_ExposureMap_en5.fits,0,0
|
||||
../products/tm6_park_1_ExposureMap_en5.fits,0,0
|
||||
../products/tm6_park_2_ExposureMap_en5.fits,0,0
|
||||
../products/tm6_park_3_ExposureMap_en5.fits,0,0
|
||||
../products/tm6_park_4_ExposureMap_en5.fits,0,0
|
||||
../products/tm6_scan_1_ExposureMap_en5.fits,0,0
|
||||
../products/tm6_scan_2_ExposureMap_en5.fits,0,0
|
||||
../products/tm6_scan_3_ExposureMap_en5.fits,0,0
|
||||
../products/tm6_scan_4_ExposureMap_en5.fits,0,0
|
||||
../products/tm7_obs_1_ExposureMap_en5.fits,0,0
|
||||
../products/tm7_obs_2_ExposureMap_en5.fits,0,0
|
Reference in New Issue
Block a user