def cb_active_plot(self,start_ms,stop_ms,line_color='<STR_LIT:b>'):
<EOL>k_min_idx = np.nonzero(np.ravel(np.array(self.DSP_tic)*<NUM_LIT:1000> < start_ms))[<NUM_LIT:0>]<EOL>if len(k_min_idx) < <NUM_LIT:1>:<EOL><INDENT>k_min = <NUM_LIT:0><EOL><DEDENT>else:<EOL><INDENT>k_min = k_min_idx[-<NUM_LIT:1>]<EOL><DEDENT>k_max_idx = np.nonzero(np.ravel(np.array(self.DSP_tic)*<NUM_LIT:1000> > stop_ms))[<NUM_LIT:0>]<EOL>if len(k_min_idx) < <NUM_LIT:1>:<EOL><INDENT>k_max= len(self.DSP_tic)<EOL><DEDENT>else:<EOL><INDENT>k_max = k_max_idx[<NUM_LIT:0>]<EOL><DEDENT>for k in range(k_min,k_max):<EOL><INDENT>if k == <NUM_LIT:0>:<EOL><INDENT>plt.plot([<NUM_LIT:0>,self.DSP_tic[k]*<NUM_LIT:1000>,self.DSP_tic[k]*<NUM_LIT:1000>,<EOL>self.DSP_toc[k]*<NUM_LIT:1000>,self.DSP_toc[k]*<NUM_LIT:1000>],<EOL>[<NUM_LIT:0>,<NUM_LIT:0>,<NUM_LIT:1>,<NUM_LIT:1>,<NUM_LIT:0>],'<STR_LIT:b>')<EOL><DEDENT>else:<EOL><INDENT>plt.plot([self.DSP_toc[k-<NUM_LIT:1>]*<NUM_LIT:1000>,self.DSP_tic[k]*<NUM_LIT:1000>,self.DSP_tic[k]*<NUM_LIT:1000>,<EOL>self.DSP_toc[k]*<NUM_LIT:1000>,self.DSP_toc[k]*<NUM_LIT:1000>],[<NUM_LIT:0>,<NUM_LIT:0>,<NUM_LIT:1>,<NUM_LIT:1>,<NUM_LIT:0>],'<STR_LIT:b>')<EOL><DEDENT><DEDENT>plt.plot([self.DSP_toc[k_max-<NUM_LIT:1>]*<NUM_LIT:1000>,stop_ms],[<NUM_LIT:0>,<NUM_LIT:0>],'<STR_LIT:b>')<EOL>plt.xlim([start_ms,stop_ms])<EOL>plt.title(r'<STR_LIT>')<EOL>plt.ylabel(r'<STR_LIT>')<EOL>plt.xlabel(r'<STR_LIT>')<EOL>plt.grid()<EOL>
Plot timing information of time spent in the callback. This is similar
to what a logic analyzer provides when probing an interrupt.

cb_active_plot( start_ms,stop_ms,line_color='b')