def proto_0303(theABF):
abf=ABF(theABF)<EOL>abf.log.info("<STR_LIT>")<EOL>proto_avgRange(theABF,<NUM_LIT>,<NUM_LIT>)<EOL>plt.close('<STR_LIT:all>')<EOL>plt.figure(figsize=(<NUM_LIT:8>,<NUM_LIT:8>))<EOL>for sweep in abf.setsweeps():<EOL><INDENT>color='<STR_LIT:b>'<EOL>if sweep in np.array(abf.comment_sweeps,dtype=int):<EOL><INDENT>color='<STR_LIT:r>'<EOL><DEDENT>plt.plot(abf.sweepX2,abf.sweepY+<NUM_LIT:100>*sweep,color=color,alpha=<NUM_LIT>)<EOL><DEDENT>plt.margins(<NUM_LIT:0>,<NUM_LIT>)<EOL>plt.tight_layout()<EOL>frameAndSave(abf,"<STR_LIT>")<EOL>plt.close('<STR_LIT:all>')<EOL>ap=AP(abf)<EOL>ap.detect_time1=<NUM_LIT><EOL>ap.detect_time2=<NUM_LIT><EOL>ap.detect()<EOL>apCount=[]<EOL>apSweepTimes=[]<EOL>for sweepNumber,times in enumerate(ap.get_bySweep("<STR_LIT>")):<EOL><INDENT>apCount.append(len(times))<EOL>if len(times):<EOL><INDENT>apSweepTimes.append(times[<NUM_LIT:0>])<EOL><DEDENT>else:<EOL><INDENT>apSweepTimes.append(<NUM_LIT:0>)<EOL><DEDENT><DEDENT>plt.figure(figsize=(<NUM_LIT:8>,<NUM_LIT:8>))<EOL>ax1=plt.subplot(<NUM_LIT>)<EOL>plt.grid(alpha=<NUM_LIT>,ls='<STR_LIT>')<EOL>plt.plot(np.arange(len(apCount))*abf.sweepLength/<NUM_LIT>,apCount,'<STR_LIT>',ms=<NUM_LIT:15>)<EOL>comment_lines(abf)<EOL>plt.ylabel("<STR_LIT>")<EOL>plt.subplot(<NUM_LIT>,sharex=ax1)<EOL>plt.grid(alpha=<NUM_LIT>,ls='<STR_LIT>')<EOL>plt.plot(np.arange(len(apCount))*abf.sweepLength/<NUM_LIT>,apSweepTimes,'<STR_LIT>',ms=<NUM_LIT:15>)<EOL>comment_lines(abf)<EOL>plt.ylabel("<STR_LIT>")<EOL>plt.xlabel("<STR_LIT>")<EOL>plt.tight_layout()<EOL>frameAndSave(abf,"<STR_LIT>")<EOL>plt.close('<STR_LIT:all>')<EOL>
protocol: repeated IC ramps.