JohnChiu commited on
Commit
f9ccd6b
·
1 Parent(s): 14e0055

training data gen

Browse files
Files changed (2) hide show
  1. main_validate_findpeaks.ipynb +0 -0
  2. utils.py +2 -2
main_validate_findpeaks.ipynb CHANGED
The diff for this file is too large to render. See raw diff
 
utils.py CHANGED
@@ -234,7 +234,7 @@ def find_peaks_hw(histograms, histograms_ma):
234
  nt_count_n[i, j, count] = np.sum(hist[nt_start_bin:nt_start_bin + nt_num]) + est_nt
235
 
236
  count += 1
237
-
238
  return tof_data, peak_data, noise_data, multishot_data, totalcount, nt_count_n
239
 
240
 
@@ -263,7 +263,7 @@ def select_peaks_hw(tof_data, peak_data):
263
  peak: (H, W)
264
 
265
  """
266
- peak_data = peak_data *256/48000
267
  ref_set = np.zeros_like(peak_data)
268
  for i in range(MAX_PEAKS):
269
  ref_set[...,i] = peak_data[...,i]*tof_data[...,i]*tof_data[...,i] /1200 * 6
 
234
  nt_count_n[i, j, count] = np.sum(hist[nt_start_bin:nt_start_bin + nt_num]) + est_nt
235
 
236
  count += 1
237
+ peak_data=peak_data*256/48000
238
  return tof_data, peak_data, noise_data, multishot_data, totalcount, nt_count_n
239
 
240
 
 
263
  peak: (H, W)
264
 
265
  """
266
+ # peak_data = peak_data *256/48000
267
  ref_set = np.zeros_like(peak_data)
268
  for i in range(MAX_PEAKS):
269
  ref_set[...,i] = peak_data[...,i]*tof_data[...,i]*tof_data[...,i] /1200 * 6