2222 'errorCueTrigger_times' : ['#d62728' , 'dotted' ], # red
2323 'valveOpen_times' : ['#17becf' , 'solid' ], # cyan
2424 'stimFreeze_times' : ['#0000ff' , 'solid' ], # blue
25+ 'stimFreezeTrigger_times' : ['#0000ff' , 'dotted' ], # blue
2526 'stimOff_times' : ['#9400d3' , 'solid' ], # dark violet
2627 'stimOffTrigger_times' : ['#9400d3' , 'dotted' ], # dark violet
2728 'stimOn_times' : ['#e377c2' , 'solid' ], # pink
3839
3940class QcFrame (TaskQC ):
4041
41- def __init__ (self , session_path , bpod_only = False , local = False ):
42+ def __init__ (self , session , bpod_only = False , local = False ):
4243 """
4344 Loads and extracts the QC data for a given session path
44- :param session_path : A str or Path to a Bpod session
45+ :param session : A str or Path to a session, or a session eid
4546 :param bpod_only: When True all data is extracted from Bpod instead of FPGA for ephys
4647 """
47- super ().__init__ (session_path , one = one , log = _logger )
48+ super ().__init__ (session , one = one , log = _logger )
4849
4950 if local :
50- dsets , out_files = ephys_fpga .extract_all (session_path , save = True )
51- self .extractor = TaskQCExtractor (session_path , lazy = True , one = one )
51+ dsets , out_files = ephys_fpga .extract_all (session , save = True )
52+ self .extractor = TaskQCExtractor (session , lazy = True , one = one )
5253 # Extract extra datasets required for QC
5354 self .extractor .data = dsets
5455 self .extractor .extract_data ()
@@ -158,7 +159,7 @@ def show_session_task_qc(session=None, bpod_only=False, local=False):
158159 :param session: session_path
159160 :param bpod_only: (no FPGA)
160161 :param local: set True for local extraction
161- :return:
162+ :return: The QC object
162163 """
163164 # Run QC and plot
164165 qc = QcFrame (session , bpod_only = bpod_only , local = local )
@@ -171,6 +172,7 @@ def show_session_task_qc(session=None, bpod_only=False, local=False):
171172 # Update table and callbacks
172173 w .update_df (qc .frame )
173174 qt .run_app ()
175+ return qc
174176
175177
176178if __name__ == "__main__" :
0 commit comments