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

Plotter for MCMC diagnostics #146

Closed zihaoxu98 closed 8 months ago

zihaoxu98 commented 8 months ago

This PR adds a class called Plotter, which can generate the needed plots to diagnose MCMC result. Currently, there are four plots: burn-in, marginal posterior, corner, and auto corr plot for convergence check (see emcee doc)

To use it,

from appletree import Plotter

file_name = '/project2/lgrandi/mhliu0001/ambe_fit_backend/fit_ambe_sr0_with_outliers.h5'
plotter = Plotter(file_name)
plotter.make_all_plots()

Note that a long iteration will slow down the plotting, especially the corner plot.

coveralls commented 8 months ago

Pull Request Test Coverage Report for Build 8168645414

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
appletree/plot.py 188 200 94.0%
<!-- Total: 190 202 94.06% -->
Totals Coverage Status
Change from base Build 8158759385: 1.3%
Covered Lines: 2263
Relevant Lines: 2660

💛 - Coveralls
dachengx commented 8 months ago

I added some tests of the plotting function.