1
0
forked from erosita/uds
This commit is contained in:
2024-12-02 11:14:30 +03:00
parent 233967b1fd
commit 6a960edbdc
4 changed files with 28 additions and 8 deletions

View File

@@ -81,7 +81,7 @@ for i in range(len(partII)-1):
### Survey ###
if(do_survey):
for m in tm_list:
do_evtool_esass(evlist=el+'tm{}_survey.txt'.format(m), outfile=pr+'tm{}_survey.fits'.format(m), emin=0.2, emax=10.0, rmlock=True, rusky=True)
do_evtool_esass(evlist=el+'tm{}_survey.txt'.format(m), outfile=pr+'tm{}_survey.fits'.format(m), emin=0.2, emax=10.0, rmlock=True)

View File

@@ -75,8 +75,8 @@ create_folder(outfile_dir)
local_run = True
do_init = True
do_merge = True
do_init = False
do_merge = False
do_detmask = False
do_expmap = False
do_erbox1 = False # local mode
@@ -87,6 +87,7 @@ do_erbox3 = False # map mode, with background map
do_erbackmap3 = False #
do_ersensmap = False
do_ermldet = False
do_resid = True # residuals of data and source map
do_fixcat = False # only for index=0
do_fixxmm = False # prepare forced photometry, only for index=0
do_apetool = False
@@ -105,9 +106,10 @@ comm='' # for 4XMM-DR12 forced photometry use '-xmm'
vign=True
attcorr=False
rusky=True
keylist = keylist_tm
outkey = "mosa_all_tm0{}".format('_attcorr' if (attcorr==True) else '')
keylist = keylist_survey
outkey = "mosa_survey_tm0{}".format('_attcorr' if (attcorr==True) else '')
"""
mosa_scans_tm0 -- all scans individually (keylist_scans)
@@ -156,9 +158,9 @@ if(do_merge==True):
f.close()
print(outfile_evtool)
do_check_events(events=events)
do_evtool_esass(evlist=evlist, outfile=outfile_evtool, width=width)
#if(os.path.isfile(evlist)==True):
# os.remove(evlist)
do_evtool_esass(evlist=evlist, outfile=outfile_evtool, width=width, rusky=rusky)
if(os.path.isfile(evlist)==True):
os.remove(evlist)
""" makes detmask from TM exposures """
@@ -277,6 +279,7 @@ if(do_erbackmap3==True):
if(forced==True):
mllist="{}_MaxLikSourceList_en{:02d}.forced{}{}".format(os.path.join(outfile_dir,outkey), eband[index], comm, outfile_post)
srcmap="{}_SourceMap_en{:02d}.forced{}{}".format(os.path.join(outfile_dir,outkey), eband[index], comm, outfile_post)
residmap="{}_ResidMap_en{:02d}.forced{}{}".format(os.path.join(outfile_dir,outkey), eband[index], comm, outfile_post)
""" for en1,2,3,6 give mllist from en0 as input """
#boxlist3="{}_MaxLikSourceList_en{:02d}.forced{}{}".format(os.path.join(outfile_dir,outkey), eband[0], comm, outfile_post)
@@ -300,6 +303,7 @@ if(forced==True):
else:
mllist="{}_MaxLikSourceList_en{:02d}{}".format(os.path.join(outfile_dir,outkey), eband[index], outfile_post)
srcmap="{}_SourceMap_en{:02d}{}".format(os.path.join(outfile_dir,outkey), eband[index], outfile_post)
residmap="{}_ResidMap_en{:02d}{}".format(os.path.join(outfile_dir,outkey), eband[index], outfile_post)
boxlist3 = outfile_boxlist3
fitpos_flag="fitpos_flag=yes"
fitext_flag="fitext_flag=yes"
@@ -377,7 +381,10 @@ if(do_ermldet==True):
# for a some reason, for an arbitrary energy band, ermldet break order of sources. Do this forced correction.
if(result == False):
correct_srcid_ermldet_forced(mllist)
if(do_resid==True):
do_resid_map(data=outfile_evtool, model=srcmap, outfile=residmap)
if(do_fixcat==True):
if not index == 0:
print("ERROR: You can fix only reference catalog for en0.")