@@ -1506,12 +1506,12 @@ def run2data(self) -> tuple:
15061506 events_data ['columns' ].append ([{'value' : value , 'editable' : True }, {'value' : key , 'editable' : key not in ('onset' ,'duration' )}])
15071507
15081508 # Set up the data for the events table
1509- df = self .events .logtable
1509+ df = self .events .logtable ()
15101510 events_data ['log_table' ] = [[{'value' : name , 'editable' : False } for name in df ]] if len (df ) else []
15111511 for i in range (len (df )):
15121512 events_data ['log_table' ].append ([{'value' : value , 'editable' : False } for value in df .iloc [i ]])
15131513
1514- df = self .events .eventstable
1514+ df = self .events .eventstable ()
15151515 events_data ['table' ] = [[{'value' : name , 'editable' : False } for name in df ]] if len (df ) else []
15161516 for i in range (len (df )):
15171517 events_data ['table' ].append ([{'value' : value , 'editable' : False } for value in df .iloc [i ]])
@@ -1657,7 +1657,7 @@ def events_time2run(self, rowindex: int, colindex: int):
16571657 elif key == 'start' :
16581658 value = ast .literal_eval (value ) # Convert stringified dict back to dict
16591659 for column in value .copy ():
1660- if column not in self .events .logtable :
1660+ if column not in self .events .logtable () :
16611661 newcol = self .get_input_column (column )
16621662 if newcol == column :
16631663 raise KeyError
@@ -1710,7 +1710,7 @@ def events_rows2run(self, rowindex: int, colindex: int):
17101710 mapping = ast .literal_eval (mapping ) # Convert stringified dict back to dict
17111711 for column , pattern in mapping .copy ().items ():
17121712 re .compile (str (pattern ) if colindex == 0 else '' )
1713- if colindex == 0 and column not in self .events .logtable :
1713+ if colindex == 0 and column not in self .events .logtable () :
17141714 newcol = self .get_input_column (column )
17151715 if newcol == column : # The user cancelled the dialogue
17161716 raise KeyError
@@ -1749,7 +1749,7 @@ def events_columns2run(self, rowindex: int, colindex: int, _input: str=''):
17491749 if colindex == 0 and input and not output :
17501750 output = input
17511751
1752- if not input or input in self .events .logtable :
1752+ if not input or input in self .events .logtable () :
17531753 LOGGER .verbose (f"User sets the events column to: '{ input } : { output } ' for { self .target_run } " )
17541754 if output : # Evaluate and store the data
17551755 if rowindex == nrows - 1 :
@@ -1772,7 +1772,7 @@ def get_input_column(self, input: str) -> str:
17721772 """Ask the user to pick an input column from the log table"""
17731773
17741774 # Get column names
1775- columns = self .events .logtable .columns .tolist ()
1775+ columns = self .events .logtable () .columns .tolist ()
17761776 column , ok = QInputDialog .getItem (self , 'Input error' , f"Your '{ input } ' input column does not exist, please choose one of the existing columns:" , columns , 0 , False )
17771777
17781778 return column if ok else input
@@ -2126,7 +2126,7 @@ def run2data(runitem: RunItem) -> tuple:
21262126 events_data = []
21272127 events = runitem .events ()
21282128 if events :
2129- df = events .eventstable
2129+ df = events .eventstable ()
21302130 events_data .append ([* df .columns ])
21312131 for i in range (len (df )):
21322132 events_data .append ([* df .iloc [i ]])
0 commit comments