Skip to content

Commit

Permalink
fix: made small change to ceria calib fig and added title
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfverberg committed Mar 4, 2024
1 parent c8cab60 commit 8745c0f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions CHAP/edd/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,8 @@ def calibrate(self,
import matplotlib.pyplot as plt

fig, axs = plt.subplots(2, 2, sharex='all', figsize=(11, 8.5))
fig.suptitle(
f'Detector {detector.detector_name} Ceria Calibration')

# Upper left axes: Input data & best fits
axs[0,0].set_title('Ceria Calibration Fits')
Expand Down Expand Up @@ -918,11 +920,11 @@ def calibrate(self,
axs[1,1].set_xlabel('Energy (keV)')
axs[1,1].set_ylabel('Energy (keV)')
axs[1,1].plot(fit_E0, uniform_fit_centers,
marker='o', label='Single Strain')
linestyle='', marker='o', label='Single Strain')
axs[1,1].plot(fit_E0, unconstrained_fit_centers,
linestyle='', marker='o', label='Unconstrained')
axs[1,1].plot(slope_correction * unconstrained_fit_centers + intercept_correction,
unconstrained_fit_centers,
axs[1,1].plot(fit_E0,
slope_correction*_fit_E0 + intercept_correction,
color='C1', label='Unconstrained: Linear Fit')
axs[1,1].legend()

Expand Down

0 comments on commit 8745c0f

Please sign in to comment.