lena-lin/cta_transient_search

True start slice

Closed this issue · 1 comments

Difference between simulated start and first trigger is often 1, while first trigger is earlier than simulated start. Possible reason in np.where ?
evaluation.py / count_tp_fp_fn():
rt, = np.where(np.diff(ts==1)), with ts beeing cube[trigger_index], a list of False and true trigger values.

Test: a = [false,false,false,true,false]
np.where(np.diff(a==1)) results in 2 but first trigger should be at the index 3

Add +1 option in branch Find_Position

len(np.diff(a)) < len(a)
---> Add +1 for correct start slice