max_y = list_of_segments[s_n].analogsignals[0][t_p] t_p = t_p + 1 max_values.append(max_y) #print('The length of the seg is ' + str(len(segs[s_n].analogsignals[0])) + ' for current signal') #print('The max current is ' + str(max_y)) return max_values abf_file_name = './data/input/18227014.abf' abf = AxonIO(abf_file_name) #print file info print(abf.read_protocol) #count segments n_seg = abf.segment_count(block_index=0) print('Found ' + str(n_seg) + ' segments.') # Generate an array containing segments segs = get_segments(abf) print(segs[15]) # Visually check the values of the analog signal # in seg[15]. print(segs[15].analogsignals[0]) a_seg_1 = np.array(segs[15].analogsignals[0]) plt.plot(a_seg_1, 'r-o') plt.show() # Get the time point at which the voltage step # t1_step = t_start_vstep(segs[15]) t1_step = 18000