XENONnT / appletree

A high-performance program simulates and fits response of XENON
BSD 3-Clause "New" or "Revised" License
8 stars 2 forks source link

Nearest neighbor interpolator #168

Closed zihaoxu98 closed 4 months ago

zihaoxu98 commented 4 months ago

This PR adds nearest neighbor interpolator, in case where the inverse distance weighting (IDW) does not make sense any more.

To use it, add method="NN" in the Map. For example,

apt.config.Map(
    name='test_map',
    default='map_file.json',
    method='NN',
)
coveralls commented 4 months ago

Pull Request Test Coverage Report for Build 9483108512

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
appletree/config.py 11 17 64.71%
appletree/interpolation.py 8 28 28.57%
<!-- Total: 19 45 42.22% -->
Files with Coverage Reduction New Missed Lines %
appletree/config.py 23 83.4%
<!-- Total: 23 -->
Totals Coverage Status
Change from base Build 9481588762: -0.7%
Covered Lines: 2359
Relevant Lines: 2774

💛 - Coveralls
coveralls commented 4 months ago

Pull Request Test Coverage Report for Build 9483112472

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
appletree/config.py 12 16 75.0%
appletree/interpolation.py 8 28 28.57%
<!-- Total: 20 44 45.45% -->
Totals Coverage Status
Change from base Build 9481588762: -0.7%
Covered Lines: 2359
Relevant Lines: 2774

💛 - Coveralls