Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
chiaratomaiuolo committed Sep 25, 2024
1 parent 1f6046e commit e791920
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hexsample/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 2 additions & 0 deletions scripts/analyze_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit e791920

Please sign in to comment.