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

Initialize context from backend #156

Closed zihaoxu98 closed 7 months ago

zihaoxu98 commented 7 months ago

This PR adds a class method that allows context to be initialized from a backend file. The continue_fitting is also modified a bit for better experience.

If you have a backend from a fitting, and want to continue, now you just need to

tree = apt.Context.from_backend('./backend.h5')
tree.continue_fitting(iteration=10)

The original backend file will be appended to new walkers.

coveralls commented 7 months ago

Pull Request Test Coverage Report for Build 8583100372

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
appletree/context.py 25 27 92.59%
<!-- Total: 26 28 92.86% -->
Totals Coverage Status
Change from base Build 8582131298: 0.3%
Covered Lines: 2300
Relevant Lines: 2691

💛 - Coveralls