From e7919202cfb02c2a0dc7ea5c45a35a7aa428f16f Mon Sep 17 00:00:00 2001 From: chiara Date: Wed, 25 Sep 2024 21:33:31 +0200 Subject: [PATCH] minor --- hexsample/source.py | 5 +++-- scripts/analyze_sim.py | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hexsample/source.py b/hexsample/source.py index 553f03e..1f7e158 100644 --- a/hexsample/source.py +++ b/hexsample/source.py @@ -305,8 +305,9 @@ def plot(self) -> None: """Plot the continuum spectrum for 1e4 generated photons. """ # pylint: disable=invalid-name - plt.hist(self.rvs(10000), density=True, width=0.0001, color='black') - setup_gca(xlabel='Energy [eV]', ylabel='pdf', logy=True, grids=True) + energies_ = self.rvs(10000) + plt.hist(energies_, density=True, color='tab:blue') + setup_gca(xlabel='Energy [eV]', ylabel='PDF', logy=True, grids=True) class Source: diff --git a/scripts/analyze_sim.py b/scripts/analyze_sim.py index 8f4f4f3..7f94458 100644 --- a/scripts/analyze_sim.py +++ b/scripts/analyze_sim.py @@ -39,6 +39,8 @@ def analyze_sim(thick : int, noise : int) -> None: """ thr = 2 * noise file_path = f'/Users/chiara/hexsampledata/hxsim_recon.h5' + #file_path = f'/Users/chiara/hexsampledata/sim_HexagonalLayout.ODD_Rum_0enc_srcsigma200um_recon.h5' + #file_path = f'/Users/chiara/hexsampledata/sim_{thick}um_{noise}enc_recon_nn2_thr{thr}.h5' recon_file = ReconInputFile(file_path) #Constructing the 1px mask cluster_size = recon_file.column('cluster_size')