Commit 159a0425 authored by Gonzalez, Miguel's avatar Gonzalez, Miguel
Browse files

Added test button and test function for testing and implementing new features.

parent b3236767
......@@ -1859,6 +1859,9 @@ pro test_function
common EV_common1, EV_struct
common EV_common2, Counts, Xdet, Ydet, Dtimer, Ctimer, Stimer, Mtimer, Dtimer_trigger, Mtimer_trigger
print, 'In test function'
;stop
; diff = dtimer[1:*] - dtimer[0:-2]
; time_intervals = (diff / EV_struct.clock) * 1e6 ;time-step in microseconds
; bin_size = 0.2 ;
......@@ -1866,17 +1869,17 @@ pro test_function
; time_axis = findgen(n_elements(time_distrib))* bin_size + 0.5 * bin_size
;select a single tube
ntube = 64
tube = where(xdet eq (ntube-1))
diff = (dtimer[tube])[1:*] - (dtimer[tube])[0:-2]
time_intervals = (diff / EV_struct.clock) * 1e6 ;time-step in microseconds
bin_size = 100
time_distrib = histogram(time_intervals, binsize = bin_size, min=0.0, max=1e5)
time_axis = findgen(n_elements(time_distrib))* bin_size + 0.5 * bin_size
;ntube = 64
;tube = where(xdet eq (ntube-1))
;diff = (dtimer[tube])[1:*] - (dtimer[tube])[0:-2]
;time_intervals = (diff / EV_struct.clock) * 1e6 ;time-step in microseconds
;bin_size = 100
;time_distrib = histogram(time_intervals, binsize = bin_size, min=0.0, max=1e5)
;time_axis = findgen(n_elements(time_distrib))* bin_size + 0.5 * bin_size
;A = [600.0, 2.e-3]
;yfit = CURVEFIT(time_axis, time_distrib, weights, A, function_name='FIT_EXP')
stop
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment