@@ -59,7 +59,7 @@ def plot_drifting_grating_traces(dg, save_dir):
5959 (blank [str (nc )].std () / len (blank [str (nc )]))
6060 blank_n = blank [str (nc )].mean () - \
6161 (blank [str (nc )].std () / len (blank [str (nc )]))
62- except :
62+ except Exception :
6363 blank_p = blank .iloc [:, nc ].apply (
6464 np .mean ) + (blank .iloc [:, nc ].apply (np .std ) / blank .iloc [:, nc ].apply (len ))
6565 blank_n = blank .iloc [:, nc ].apply (
@@ -76,7 +76,7 @@ def plot_drifting_grating_traces(dg, save_dir):
7676 ) + (subset_response [str (nc )][:- 1 ].std () / len (subset_response [str (nc )]))
7777 subset_response_n = subset_response [str (nc )].mean (
7878 ) - (subset_response [str (nc )][:- 1 ].std () / len (subset_response [str (nc )]))
79- except :
79+ except Exception :
8080 subset_response_p = subset_response .iloc [:, nc ].apply (
8181 np .mean ) + (subset_response .iloc [:, nc ].apply (np .std ) / subset_response .iloc [:, nc ].apply (len ))
8282 subset_response_n = subset_response .iloc [:, nc ].apply (
@@ -87,17 +87,17 @@ def plot_drifting_grating_traces(dg, save_dir):
8787 try :
8888 ax .fill_between (xtime , subset_response_p ,
8989 subset_response_n , color = 'b' , alpha = 0.5 )
90- except :
90+ except Exception :
9191 pass
9292 try :
9393 ax .fill_between (xtime , blank_p , blank_n ,
9494 color = 'k' , alpha = 0.5 )
95- except :
95+ except Exception :
9696 pass
9797 try :
9898 ax .plot (xtime , subset_response [
9999 str (nc )].mean (), color = 'b' , lw = 2 )
100- except :
100+ except Exception :
101101 pass
102102 ax .plot (xtime , subset_response [
103103 str (nc )].mean (), color = 'b' , lw = 2 )
@@ -162,7 +162,7 @@ def plot_ns_traces(nsa, save_dir):
162162 try :
163163 ax .fill_between (xtime , subset_response_p ,
164164 subset_response_n , color = 'b' , alpha = 0.5 )
165- except :
165+ except Exception :
166166 xtime = xtime [:- 1 ]
167167 ax .fill_between (xtime , subset_response_p ,
168168 subset_response_n , color = 'b' , alpha = 0.5 )
@@ -762,7 +762,7 @@ def _plot_3sb(sg, nm1, ns, save_dir):
762762 ) - (subset [str (nc )].std () / np .sqrt (len (subset [str (nc )])))
763763 try :
764764 ax13 .fill_between (xtime , subset_p , subset_n , color = 'b' , alpha = 0.5 )
765- except :
765+ except Exception :
766766 xtime = xtime [:- 1 ]
767767 ax13 .fill_between (xtime , subset_p , subset_n , color = 'b' , alpha = 0.5 )
768768 blank = sg .sweep_response [(sg .stim_table .orientation == 0 ) & (
@@ -860,7 +860,7 @@ def _plot_3sb(sg, nm1, ns, save_dir):
860860 try :
861861 ax12 .fill_between (xtime , subset_response_p ,
862862 subset_response_n , color = 'b' , alpha = 0.5 )
863- except :
863+ except Exception :
864864 xtime = xtime [:- 1 ]
865865 ax12 .fill_between (xtime , subset_response_p ,
866866 subset_response_n , color = 'b' , alpha = 0.5 )
0 commit comments