ch_ref_array = np.array(160*[160])

ref_chNo_l = 
ref_chNo_r = 

nCh = prb.chs.shape[0]
l_electrodes = prb.chs[:nCh//2]
r_electrodes = prb.chs[nCh//2:]

l_electrodes

r_electrodes

ch_ref_array[l_electrodes] = ref_chNo_l
ch_ref_array[r_electrodes] = ref_chNo_r

ctrl.fpga.set_channel_ref(ch_ref_array)

"""
Explanation: 0. Set the reference channel
use command to decide which electrode to be the reference channel
spiketag report mua.bin spk.bin prb_v3.prb
End of explanation
"""


ctrl.set_threshold(beta=4)

ctrl.fpga.thres[ref_chNo_l] = -20000.
ctrl.fpga.thres[ref_chNo_r] = -20000.

ctrl.fpga.thres[95:128] = -20000.

"""
Explanation: 1. Set the threshold
End of explanation
"""


