Skip to content

Commit

Permalink
adding the deadtime calculations to be done in the gaussian_fit() fun…
Browse files Browse the repository at this point in the history
…ction since after that all data that is needed for process_psds() is then included in the .dat files. The dat files can be saved after running gaussian_fit()
  • Loading branch information
johbackm committed Dec 13, 2023
1 parent d70c55a commit f2e7f94
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pysp2/util/peak_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from scipy.optimize import curve_fit
from .DMTGlobals import DMTGlobals

from .deadtime import deadtime

def _do_fit_records(my_ds, i, num_trig_pts, debug=True):
if debug and i % 1000 == 0:
Expand Down Expand Up @@ -355,6 +355,8 @@ def gaussian_fit(my_ds, config, parallel=False, num_records=None):

OneofEvery=np.zeros(num_records, dtype='float64') + int(config['Acquisition']['1 of Every'])
my_ds['OneofEvery'] = (('event_index'), OneofEvery)
#calculate the deadtime relative bias and add it to the Dataset
my_ds=deadtime(my_ds, config)

print(str(num_records) + ' records processed in ' + str(time.time()-start_time) + ' s')
return my_ds
Expand Down

0 comments on commit f2e7f94

Please sign in to comment.