@@ -346,7 +346,7 @@ def dlc_qc_plot(eid, one=None):
346346 if data [f'{ cam } _{ feat } ' ] is not None and len (data [f'{ cam } _{ feat } ' ]) == 0 :
347347 logger .warning (f"Object loaded from _ibl_{ cam } Camera.{ feat } is empty, some plots have to be skipped." )
348348 data [f'{ cam } _{ feat } ' ] = None
349-
349+
350350 # Session data
351351 for alf_object in ['trials' , 'wheel' , 'licks' ]:
352352 try :
@@ -362,7 +362,7 @@ def dlc_qc_plot(eid, one=None):
362362 # Simplify to what we actually need
363363 data ['licks' ] = data ['licks' ].times if data ['licks' ] else None
364364 data ['left_pupil' ] = data ['left_features' ].pupilDiameter_smooth if (
365- data ['left_features' ] is not None and not np .all (np .isnan (data ['left_features' ].pupilDiameter_smooth ))
365+ data ['left_features' ] is not None and not np .all (np .isnan (data ['left_features' ].pupilDiameter_smooth ))
366366 ) else None
367367 data ['wheel_time' ] = data ['wheel' ].timestamps if data ['wheel' ] is not None else None
368368 data ['wheel_position' ] = data ['wheel' ].position if data ['wheel' ] is not None else None
@@ -401,7 +401,8 @@ def dlc_qc_plot(eid, one=None):
401401 ax = plt .subplot (2 , 5 , i + 1 )
402402 ax .text (- 0.1 , 1.15 , ascii_uppercase [i ], transform = ax .transAxes , fontsize = 16 , fontweight = 'bold' )
403403 # Check if any of the inputs is None
404- if any ([v is None for v in panel [1 ].values ()]) or any ([v .values () is None for v in panel [1 ].values () if isinstance (v , dict )]):
404+ if any ([v is None for v in panel [1 ].values ()]) or any ([v .values () is None for v in panel [1 ].values ()
405+ if isinstance (v , dict )]):
405406 ax .text (.5 , .5 , f"Data incomplete\n { panel [0 ].__name__ } " , color = 'r' , fontweight = 'bold' ,
406407 fontsize = 12 , horizontalalignment = 'center' , verticalalignment = 'center' , transform = ax .transAxes )
407408 plt .axis ('off' )
0 commit comments