final catalog ready
This commit is contained in:
@@ -44,6 +44,8 @@ import numpy as np
|
||||
import glob
|
||||
from os.path import dirname
|
||||
import inspect
|
||||
import pickle
|
||||
|
||||
import uds
|
||||
|
||||
from uds.utils import *
|
||||
@@ -75,11 +77,15 @@ do_init = False
|
||||
do_merge = False
|
||||
do_srctool = False
|
||||
do_grppha = False
|
||||
do_ecf_calc = False
|
||||
do_ecf_print = False
|
||||
do_catalog = True
|
||||
do_ecf_calc = False # for all bands
|
||||
do_ecf_print = False # for all bands
|
||||
do_catalog = False
|
||||
do_extended = False
|
||||
do_ds9reg = False
|
||||
do_xmm_catalog = False
|
||||
do_xmm_final = True
|
||||
|
||||
index=1
|
||||
index=0
|
||||
""" работаем именно в этом диапазоне, чтобы спектры покрывали все энергии """
|
||||
|
||||
vign=True
|
||||
@@ -160,9 +166,48 @@ if(do_ecf_print==True):
|
||||
print_ecf(infile=ecfout, emin=emin_kev, emax=emax_kev, eband=eband, skipfrac=10.0)
|
||||
|
||||
index=0
|
||||
|
||||
catprep="{}_SourceCatalog_en{}{}".format(os.path.join(outfile_dir,outkey), eband[index], outfile_post)
|
||||
rawcat="{}_SourceCatalog_en{}.pickle".format(os.path.join(outfile_dir,outkey), eband[index])
|
||||
if(do_catalog==True):
|
||||
make_catalog(infile=catprep, dlmin=10.0, dlmax=100000, ext_like=10, ecf=ecf[index],
|
||||
forced_xmm_sources="{}_MaxLikSourceList_en{}.xmm.pickle".format(os.path.join(outfile_dir,outkey), eband[index])
|
||||
with open(forced_xmm_sources, 'rb') as f:
|
||||
srcs_forced = pickle.load(f)
|
||||
|
||||
make_catalog(infile='../products/tm0_SourceCatalog_en0.forced.fits', rawcat=rawcat, dlmin=10.0, dlmax=100000, ext_like=1000,
|
||||
emin=emin_kev[index], emax=emax_kev[index], eband=eband[index],
|
||||
infile_en00cat=catprep,
|
||||
infile_en01cat='../products/tm0_SourceCatalog_en1.forced.fits',
|
||||
infile_en02cat='../products/tm0_SourceCatalog_en2.forced.fits',
|
||||
infile_en03cat='../products/tm0_SourceCatalog_en3.forced.fits',
|
||||
infile_en03sens='../products/tm0_SensitivityMap_dl10_en3.fits')
|
||||
infile_en06cat='../products/tm0_SourceCatalog_en6.forced.fits',
|
||||
infile_en00sens='../products/tm0_SensitivityMap_dl10_en0.fits',
|
||||
infile_en01sens='../products/tm0_SensitivityMap_dl10_en1.fits',
|
||||
infile_en02sens='../products/tm0_SensitivityMap_dl10_en2.fits',
|
||||
infile_en03sens='../products/tm0_SensitivityMap_dl10_en3.fits',
|
||||
infile_en06sens='../products/tm0_SensitivityMap_dl10_en6.fits',
|
||||
srcs_forced=srcs_forced,
|
||||
)
|
||||
|
||||
|
||||
if(do_extended==True):
|
||||
make_extended(infile=rawcat,outreg="{}_ExtendedCat_en{}.reg".format(os.path.join(outfile_dir,outkey), eband[index]))
|
||||
|
||||
if(do_ds9reg==True):
|
||||
make_final_ds9reg(infile=rawcat,outreg="{}_FinalCat_dl10.reg".format(os.path.join(outfile_dir,outkey)))
|
||||
|
||||
if(do_xmm_catalog==True):
|
||||
""" complile raw forced XMM catalog """
|
||||
make_xmm_catalog(infile_en00cat='../products/tm0_SourceCatalog_en0.forced-xmm.fits',
|
||||
infile_en01cat='../products/tm0_SourceCatalog_en1.forced-xmm.fits',
|
||||
infile_en02cat='../products/tm0_SourceCatalog_en2.forced-xmm.fits',
|
||||
infile_en03cat='../products/tm0_SourceCatalog_en3.forced-xmm.fits',
|
||||
infile_en06cat='../products/tm0_SourceCatalog_en6.forced-xmm.fits',
|
||||
forced_xmm_sources='../products/tm0_MaxLikSourceList_en0.fixed-xmm.pickle',
|
||||
outfile='../products/tm0_4XMM-DR12.pickle')
|
||||
|
||||
|
||||
if(do_xmm_final==True):
|
||||
""" make final XMM-forced catalog """
|
||||
final_xmm_catalog(infile='../products/tm0_4XMM-DR12.pickle', outfile_fits='../products/eUDS_4XMM-DR12.fits')
|
||||
|
||||
|
Reference in New Issue
Block a user