Skip to content

Commit

Permalink
Plots: better fit normalization in hist_bg, try2
Browse files Browse the repository at this point in the history
  • Loading branch information
tritemio committed May 5, 2017
1 parent a4902be commit ddede30
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fretbursts/burst_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1570,9 +1570,8 @@ def hist_bg_single(d, i=0, binwidth=1e-4, tmax=0.01, bins=None,
bg_rate = manual_rate
else:
bg_rate = d.bg_from(ph_sel)[i][period]
# with 4 the tau_th cuts enough tail most of the times
tau_th = bg_rate * 1e-6 / 4

i_max = np.nonzero(hist['counts'] > 0)[0][-1]
tau_th = hist['t_ax'][i_max] / 3
i_tau_th = np.searchsorted(hist['t_ax'], tau_th)
counts_integral = hist['counts'][i_tau_th:].sum()
y_fit = np.exp(- hist['t_ax'] * bg_rate)
Expand Down

0 comments on commit ddede30

Please sign in to comment.