Change request #1567

Make cstsdist behavior consistent with parameter interface

Added by Knödlseder Jürgen about 9 years ago. Updated almost 7 years ago.

Status:ClosedStart date:11/05/2015
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:1.5.0
Duration:

Description

While writing the cstsdist user documentation, I think I discovered an inconsistency between the script and the parameter interface. From the parameter interface, I would have guessed that I can either provide an event list, a counts cube or an observation definition file. Specifically, for the counts cube I would have expected from the expcube, psfcube, and bkgcube parameters that the script works also on binned data.

However, I see that script derives from enumbins parameter whether a binned or unbinned simulation should be performed, but I cannot see support for simulation of a stacked analysis. Specifically for that purpose, a ctools is in fact missing (there was issue #544 that develop ctpoisson).

My proposal would be to have cstsdist also work on stacked event cubes. For that purpose, a model cube would need first to be computed (using ctmodel) based on the input model. The script should then simulate counts cubes from that model cube instead


Recurrence

No recurrence.

History

#1 Updated by Mayer Michael about 9 years ago

Does ctobssim work on model cubes?

#2 Updated by Knödlseder Jürgen about 9 years ago

No. ctobssim always produces event lists from an observation definition (either specified by the parameters or an XML file).

#3 Updated by Mayer Michael about 9 years ago

I understand, so the idea is to simulate and bin the events afterwards.

#4 Updated by Knödlseder Jürgen about 9 years ago

Mayer Michael wrote:

I understand, so the idea is to simulate and bin the events afterwards.

No, I would by-pass the ctobssim step for binned analysis and replace it by a (unique) ctmodel step, followed by a simulation of the counts cube using the following code:

    # Allocate random number generator
    ran = gammalib.GRan()

    # Load model map
    map = gammalib.GSkymap(modmap)

    # Randomize
    for i in range(map.npix()):
        map[i] = ran.poisson(map[i])

#5 Updated by Mayer Michael about 9 years ago

Sounds good.

#6 Updated by Knödlseder Jürgen over 8 years ago

  • Target version set to 1.2.0

#7 Updated by Knödlseder Jürgen almost 8 years ago

  • Target version changed from 1.2.0 to 1.3.0

#8 Updated by Knödlseder Jürgen over 7 years ago

  • Target version changed from 1.3.0 to 1.4.0

#9 Updated by Knödlseder Jürgen over 7 years ago

  • Target version changed from 1.4.0 to 1.5.0

#10 Updated by Knödlseder Jürgen almost 7 years ago

The parameter interface was considerably revised, in particular the following parameters were removed: ra, dec, rad, coordsys, proj, emin, emax, enumbins, tmin, tmax, npix and binsz.

The inobs parameter is now always queried.

The script now reads in an observation or an observation container and derives the TS distribution for a source based on that observation container. So far the script supports unbinned, binned and stacked observations. If an observation definition XML file is specified the script assumes that all observations are event lists. On/Off observations are not yet supported.

#11 Updated by Knödlseder Jürgen almost 7 years ago

  • Status changed from New to Pull request
  • Assigned To set to Knödlseder Jürgen
  • % Done changed from 0 to 100

#12 Updated by Knödlseder Jürgen almost 7 years ago

  • Status changed from Pull request to Closed

Merged into devel.

Also available in: Atom PDF