CTA simulation tools

34 views
Skip to first unread message

Gaia Verna

unread,
Mar 26, 2018, 9:49:29 AM3/26/18
to gammapy
Dear all,

I'm trying to simulate for CTA a  source (its Spectrum and its Morphology) and I would like to visualize the result on a excess-SkyImage:
I found this example http://docs.gammapy.org/dev/notebooks/cta_simulation.html.

If I have understood:
- The morphological information about target is given calling a specific source from the 3FGL catalogue:
 
target
= Target( name=source.data['Source_Name'], # from the 3FGL catalogue source class model=source.spectral_model,)

1) Is it possible to insert a simple morphology model e.g a Gaussian2D instead?

- The final result of the exercise is a study in the energy domain of the simulated counts:

 CTAObservationSimulation.simulate_obs(perf, target, obs_param)---> returns SpectrumObservation


 And SpectrumObservation is "1D spectral analysis storage class".

2) Is it possible to find a way to obtain an excess-SkyImage or something containing both spectral and morphological informations of the simulated source?

Best regards
Gaia


Christoph Deil

unread,
Mar 27, 2018, 3:06:11 AM3/27/18
to gam...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "gammapy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gammapy+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/gammapy.
For more options, visit https://groups.google.com/d/optout.

Hi Gaia,

the code you mention is only to simulate 1D spectra.

To also simulate source morphology, the way to do it is to simulate 3D sky cubes (with an energy axis).

It’s possible to script this together now with a ~ 100 line Python script, and some people have done that.

But we don’t have this properly implemented in Gammapy yet.

I’ve made an issue as a reminder to make this a development priority for us in Gammapy:

You can “watch” that issue for updates if you have a Github account, or we’ll also mention updates here on this mailing list as part of release notes for the next Gammapy version (in ~ 1 month).

Christoph

Gaia Verna

unread,
Mar 27, 2018, 9:50:32 AM3/27/18
to gam...@googlegroups.com
Thank you Christoph,
I'll follow with interest the future developments.

Regards
Gaia

2018-03-27 9:06 GMT+02:00 'Christoph Deil' via gammapy <gam...@googlegroups.com>:
On 26. Mar 2018, at 15:49, Gaia Verna <gver...@gmail.com> wrote:

Dear all,

I'm trying to simulate for CTA a  source (its Spectrum and its Morphology) and I would like to visualize the result on a excess-SkyImage:
I found this example http://docs.gammapy.org/dev/notebooks/cta_simulation.html.

If I have understood:
- The morphological information about target is given calling a specific source from the 3FGL catalogue:
 
target
= Target( name=source.data['Source_Name'], # from the 3FGL catalogue source class model=source.spectral_model,)

1) Is it possible to insert a simple morphology model e.g a Gaussian2D instead?

- The final result of the exercise is a study in the energy domain of the simulated counts:

 CTAObservationSimulation.simulate_obs(perf, target, obs_param)---> returns SpectrumObservation


 And SpectrumObservation is "1D spectral analysis storage class".

2) Is it possible to find a way to obtain an excess-SkyImage or something containing both spectral and morphological informations of the simulated source?

Best regards
Gaia



--
You received this message because you are subscribed to the Google Groups "gammapy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gammapy+unsubscribe@googlegroups.com.

Visit this group at https://groups.google.com/group/gammapy.
For more options, visit https://groups.google.com/d/optout.

Hi Gaia,

the code you mention is only to simulate 1D spectra.

To also simulate source morphology, the way to do it is to simulate 3D sky cubes (with an energy axis).

It’s possible to script this together now with a ~ 100 line Python script, and some people have done that.

But we don’t have this properly implemented in Gammapy yet.

I’ve made an issue as a reminder to make this a development priority for us in Gammapy:

You can “watch” that issue for updates if you have a Github account, or we’ll also mention updates here on this mailing list as part of release notes for the next Gammapy version (in ~ 1 month).

Christoph

--
You received this message because you are subscribed to a topic in the Google Groups "gammapy" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gammapy/ZBg1hc0Mj-A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gammapy+unsubscribe@googlegroups.com.

Gaia Verna

unread,
Feb 18, 2019, 8:23:11 AM2/18/19
to gam...@googlegroups.com
Hi Christoph,

following your suggestion, I passed to simulate 3D sky cubes for CTA.
I followed this tutorial:
my goal would be to do a region-based analysis (with reflected background method) starting from the simulated counts cube.
For this type of analysis I have found this example in which data from HESS are used:
I have some issues trying to connect the output of the 3D simulation and the input that this type of analysis requires.
Probably there is a straightforward method that I miss: do you know some references?
I can also try to implement something by myself but I need some hints about the easiest logic to follow...
 thank you very much,

Gaia

You received this message because you are subscribed to a topic in the Google Groups "gammapy" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gammapy/ZBg1hc0Mj-A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gammapy+u...@googlegroups.com.

Axel Donath

unread,
Feb 19, 2019, 11:45:06 AM2/19/19
to gammapy
Hi Gaia,

the 1D spectral analysis is based on estimating the background from event lists, given an ON region and an
exclusion region. So what you are trying to achieve is not easily possible with Gammapy, because we cannot
simulate event lists yet.

Currently we are working on implementing an event sampler for Gammapy, but it will not become available before
Gammapy v0.12 (mid May 2019). If you're willing to put a little effort in, you could run the `ReflectedRegionsFinder`
to find the reflected regions and sum the events of the simulated counts cube. Then you could compute the exposure
ratios and create an `SpectrumObservation` object for every observation, But I would not recommend to go this way
and propose to wait or do a 3D analysis using a `SkyDisk` as a spatial model instead.

Axel
To unsubscribe from this group and stop receiving emails from it, send an email to gammapy+unsubscribe@googlegroups.com.

Visit this group at https://groups.google.com/group/gammapy.
For more options, visit https://groups.google.com/d/optout.

Hi Gaia,

the code you mention is only to simulate 1D spectra.

To also simulate source morphology, the way to do it is to simulate 3D sky cubes (with an energy axis).

It’s possible to script this together now with a ~ 100 line Python script, and some people have done that.

But we don’t have this properly implemented in Gammapy yet.

I’ve made an issue as a reminder to make this a development priority for us in Gammapy:

You can “watch” that issue for updates if you have a Github account, or we’ll also mention updates here on this mailing list as part of release notes for the next Gammapy version (in ~ 1 month).

Christoph

--
You received this message because you are subscribed to a topic in the Google Groups "gammapy" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gammapy/ZBg1hc0Mj-A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gammapy+unsubscribe@googlegroups.com.

Gaia Verna

unread,
Feb 21, 2019, 7:53:55 AM2/21/19
to gammapy
Hi Axel,

thank you for the explanation and for your suggestions:
I had already tried the first approach running the `ReflectedRegionsFinder` and trying to find out the number of counts in the ON and OFF regions for a given energy coordinate, but I have some problems with the method 'get_by_coord' applied to the counts map.
I'll still work on it and anyway I'll go further with a 3D analysis.

cheers,
Gaia
To unsubscribe from this group and stop receiving emails from it, send an email to gammapy+u...@googlegroups.com.

Visit this group at https://groups.google.com/group/gammapy.
For more options, visit https://groups.google.com/d/optout.

Hi Gaia,

the code you mention is only to simulate 1D spectra.

To also simulate source morphology, the way to do it is to simulate 3D sky cubes (with an energy axis).

It’s possible to script this together now with a ~ 100 line Python script, and some people have done that.

But we don’t have this properly implemented in Gammapy yet.

I’ve made an issue as a reminder to make this a development priority for us in Gammapy:

You can “watch” that issue for updates if you have a Github account, or we’ll also mention updates here on this mailing list as part of release notes for the next Gammapy version (in ~ 1 month).

Christoph

--
You received this message because you are subscribed to a topic in the Google Groups "gammapy" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gammapy/ZBg1hc0Mj-A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gammapy+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages