cta-observatory / pyirf

Python IRF builder
https://pyirf.readthedocs.io/en/stable/
MIT License
15 stars 25 forks source link

Add Nearest Neighbor Searcher as Alternative for Inter-/Extrapolation #232

Closed RuneDominik closed 1 year ago

RuneDominik commented 1 year ago

This PR adds an NearestNeighborSearcher Inter-/Extrapolation class for convenience. The name was chosen to reflect that this does not do any Inter-/Extrapolation at all.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.41 :tada:

Comparison is base (b3839f1) 93.53% compared to head (83ea9aa) 93.94%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #232 +/- ## ========================================== + Coverage 93.53% 93.94% +0.41% ========================================== Files 52 54 +2 Lines 2429 2544 +115 ========================================== + Hits 2272 2390 +118 + Misses 157 154 -3 ``` | [Impacted Files](https://app.codecov.io/gh/cta-observatory/pyirf/pull/232?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cta-observatory) | Coverage Δ | | |---|---|---| | [pyirf/interpolation/base\_interpolators.py](https://app.codecov.io/gh/cta-observatory/pyirf/pull/232?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cta-observatory#diff-cHlpcmYvaW50ZXJwb2xhdGlvbi9iYXNlX2ludGVycG9sYXRvcnMucHk=) | `96.29% <ø> (ø)` | | | [pyirf/interpolation/\_\_init\_\_.py](https://app.codecov.io/gh/cta-observatory/pyirf/pull/232?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cta-observatory#diff-cHlpcmYvaW50ZXJwb2xhdGlvbi9fX2luaXRfXy5weQ==) | `100.00% <100.00%> (ø)` | | | [pyirf/interpolation/component\_estimators.py](https://app.codecov.io/gh/cta-observatory/pyirf/pull/232?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cta-observatory#diff-cHlpcmYvaW50ZXJwb2xhdGlvbi9jb21wb25lbnRfZXN0aW1hdG9ycy5weQ==) | `100.00% <100.00%> (+1.66%)` | :arrow_up: | | [pyirf/interpolation/nearest\_neighbor\_searcher.py](https://app.codecov.io/gh/cta-observatory/pyirf/pull/232?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cta-observatory#diff-cHlpcmYvaW50ZXJwb2xhdGlvbi9uZWFyZXN0X25laWdoYm9yX3NlYXJjaGVyLnB5) | `100.00% <100.00%> (ø)` | | | [...irf/interpolation/tests/test\_base\_interpolators.py](https://app.codecov.io/gh/cta-observatory/pyirf/pull/232?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cta-observatory#diff-cHlpcmYvaW50ZXJwb2xhdGlvbi90ZXN0cy90ZXN0X2Jhc2VfaW50ZXJwb2xhdG9ycy5weQ==) | `100.00% <100.00%> (ø)` | | | [...ion/tests/test\_component\_estimator\_base\_classes.py](https://app.codecov.io/gh/cta-observatory/pyirf/pull/232?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cta-observatory#diff-cHlpcmYvaW50ZXJwb2xhdGlvbi90ZXN0cy90ZXN0X2NvbXBvbmVudF9lc3RpbWF0b3JfYmFzZV9jbGFzc2VzLnB5) | `97.24% <100.00%> (+1.20%)` | :arrow_up: | | [...erpolation/tests/test\_nearest\_neighbor\_searcher.py](https://app.codecov.io/gh/cta-observatory/pyirf/pull/232?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cta-observatory#diff-cHlpcmYvaW50ZXJwb2xhdGlvbi90ZXN0cy90ZXN0X25lYXJlc3RfbmVpZ2hib3Jfc2VhcmNoZXIucHk=) | `100.00% <100.00%> (ø)` | | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/cta-observatory/pyirf/pull/232/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cta-observatory)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.