Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed-up sampling of large numbers of sky-models with MapDatasetEventSampler #5203

Open
fabiopintore opened this issue Apr 8, 2024 · 1 comment
Milestone

Comments

@fabiopintore
Copy link
Contributor

Is your feature request related to a problem? Please describe.
MapDatasetEventSampler is quite slow when sampling a very large number of sky-models (hundreds of sources).

Describe the solution you'd like
Evaluate IRF values for all models just once?

@adonath
Copy link
Member

adonath commented Apr 8, 2024

It would be good to do some profiling here and actually find out what the bottleneck is.

In general I think this is a bit tricky: when you have a large number of low flux sources, most of them do not create any event. However in general you cannot know which one. So you have to evaluate the model, sample the flux and see if you get an event or not. So you still have to evaluate the predicted counts for all source models.

The sampling of the IRFs then scales with the number of events, not the number of sources. So if you have large number of low flux sources, the IRF sampling should not significantly increase in runtime. The runtime should be completely dominated by the high flux sources, which create most of the events.

@registerrier registerrier added this to the 1.3 milestone Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants