Comments (5)
From my experience with TS maps, I think it's a good choice to use brentq in combination with multiprocessing. Sensitivity computation for TS maps is missing as well, I'll open a separate issue for that.
from gammapy.
The sensitivity_on_off
method does not exist anymore, I think it's functionality was mostly replaced by the SensitivityEstimator
class. Closing this issue.
from gammapy.
@adonath - The issue / task really is still the there, only sensitivity_on_off
was renamed excess_matching_significance
in the meantime.
Currently we use numpy.vectorize
at
gammapy/gammapy/stats/poisson.py
Lines 600 to 603 in 55ea4c8
and execute all the code for this computation using Python scalar numbers.
I.e. there's a ton of Python overhead - moving to Cython should speed up by ~ 100x
It's the same thing as you have for the TS map computation - there you wrote it in Cython.
It's not a trivial task because currently the implementation is based on scipy.optimize.fsolve
- I think that is callable from Cython, but only from the latest Scipy version, i.e. not available for us yet.
@adonath - Up to you if you want to re-open or keep this issue closed. It's certainly not urgent - but some day (can be next year) - this should be implemented in a fast way, and probably code duplication with the TS map code removed (by moving the stats part of that code to gammapy.stats
and sharing as much as possible for these 1-dim amplitude fit tasks.
from gammapy.
Thanks @cdeil, you are right, I didn't notice the re-name of the function.
I just checked what the SensitivityEstimator
does and I doubt a highly optimised version of this code is needed. Computing the minimal excess needed for a given significance for O(~30) energy bins should always be less than one second. The TS map computation does this for O(~1e4-1e6) pixels, which is a completely different magnitude. In the case of the SensitivityEstimator
even a "brute-force" grid minimisation (30 energy bins and ~100 bins in flux / excess) with Numpy should be efficient and precise enough.
For me it's rather the question, whether the code should be shared e.g. with the FluxPointsEstimator
or be re-written based on SED likelihood profiles, such that we can compute sensitivity curves for 1D and 3D datasets as well. I can make a reminder issue for this.
from gammapy.
Yes, a faster version would only be needed for sensitivity maps with ~ 1e6 pixels, not sensitivity spectra with @ 10 pixels. I'm not sure how to best avoid code (and test effort) duplication among the various use cases for 1D optimisation within Gammapy. Not high priority, thus the label here was "wishlist".
from gammapy.
Related Issues (20)
- Documenting/improving the manipulation of covariance with CompoundSpectralModel HOT 3
- Coherent handling of metadata for the IRF classes HOT 2
- Propagation of the observation metadata within the MapDatasetMaker
- Propagation of metadata in MapDataset.cutout
- Handling of metadata within the SafeMaskMaker HOT 2
- Handling of the metadata within the FoVBackgroundMaker HOT 2
- Propagation and reduction of the metadata in MapDataset.stack HOT 4
- Use of a central jupyter with different kernel
- Fix the sherpa installation HOT 5
- `plot_regions` fails when using linewidth with a `PointSpatialModel` and extended spatial model
- Acceptance is not properly propagated during MapDatasetOnOff stacking HOT 1
- Adding a metadata in the datasets precising the origin of the background data
- Returning Alpha Map from 'ExcessMapEstimator' HOT 2
- Consistency with 'references' in docstrings
- Exposure correction for `MapDataset.to_region_map_dataset()`
- FluxPoints.write() is ignoring overwrite when file extension is not FITS
- Writing `EventList` with `Observation.write` set `MJDREFI` and `MJDREFF` to 0
- Consistency between MapDataset.stack and Datasets.stack_reduce HOT 3
- MapDatasetOnOff Conversion - Issues with Definition of Alpha
- FluxPointsEstimator fails if no edisp is set
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gammapy.