if ((np.mod((UTB_fourth_l[g]-UTB_fourth_l[0]),5)>0.5andnp.mod((UTB_fourth_l[g]-UTB_fourth_l[0]),5)<4.5)or(np.mod((UTB_fourth_l[g]-UTB_fourth_l[0]),5)>5)):
D.append(g)
fordinsorted(D,reverse=True):
delQF_fourth[d]
QF_fifth=QF_fourth
QF_OK=QF_fifth
NUM=len(QF_OK)# Number of pulses
print(NUM)
if (NUM>7):
N_Pulses_Indicator_DU.append(1.5)
elif (NUM<8andNUM>3):
N_Pulses_Indicator_DU.append(0.5)
elif (NUM<4andNUM>0):
N_Pulses_Indicator_DU.append(-0.5)
elif (NUM==0):
N_Pulses_Indicator_DU.append(-1.5)
except (TypeError,ValueError):# TypeError if no data found for a certain piezo, ValueError if there are zero data for a certain piezo