XMM-Newton SAS Home Page
XMM-Newton Science Analysis System


edetect_stack (edetect_stack-0.8.1) [xmmsas_20230412_1735-21.0.0]


Algorithm

sub edetect_stack {

    # prepare
    read parameters and files
    choose energy conversion factors
    define pointing ids, using header keywords
    check whether pointings are overlapping
    derive reference coordinate system and actual image size

    # SOURCE-DETECTION FILES PER OBSERVATION
    loop over observations

        # set reference coordinate system,  if "runattcalc" is set
        set summary file
        copy event files to working directory
        call attcalc per instrument

        # produce images,  if "runevselectimages" is set
        define filtering expression
        call evselect per instrument per energy band

        # produce exposure maps,  if "runeexpmap" is set
        call eexpmap without vignetting correction per instrument per energy band
        if esplinemap fitmethod is "model"
            call eexpmap with vignetting correction per instrument per energy band
        end if

        # produce detection masks,  if "runemask" is set
        choose energy band of exposure image
        call emask per instrument

        # produce local-mode eboxdetect source list,  if "runeboxdetectlocal" is set
        determine minimum imagebuffersize from header keywords
        call eboxdetect in local mode

        # produce background maps,  if "runesplinemap" is set
        choose fitmethod
        call esplinemap per instrument per energy band

        # produce map-mode eboxdetect source list,  if "runeboxdetectstack" is set
        determine minimum imagebuffersize from header keywords if not yet known
        call eboxdetect in map mode

        # produce sensitivity maps,  if "runesensmap" is set
        call esensmap per instrument per energy band

        # produce informational mosaic images,  if "runemosaic" is set
        call emosaic in different constellations

    end loop over pointing ids

    # STACKED SOURCE DETECTION

    # produce map-mode eboxdetect source list,  if "runeboxdetectstack" is set
    create mosaic images per instrument and energy band
    call eboxdetect in map mode on mosaicked input files
    srcmatch the results with the map-mode eboxdetect lists per pointing

    # produce intermediate emldetect source list,  if "runemldetect" is set
    determine minimum imagebuffersize from header keywords
    call emldetect

    # create final source list,  if "finalize" is set
    sub stack_sourcelist {
        calculate summary lines per pointing and in total
        keep only detections whose detection likelihood is above mlmin
            (in total or in at least one pointing)
        write final fits table
    }

}



XMM-Newton SOC -- 2023-04-16