File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -655,6 +655,8 @@ def keywords(self) -> list[str]:
655
655
self .keywords .append ("late_autorewards" )
656
656
elif self .is_task :
657
657
self .keywords .append ("early_autorewards" )
658
+ if self .is_task and not getattr (self , "is_photodiode" ):
659
+ self .keywords .append ("no_photodiode" )
658
660
for t in self .epoch_tags :
659
661
if t not in self .keywords :
660
662
self .keywords .append (t )
@@ -1986,6 +1988,19 @@ def is_templeton(self) -> bool:
1986
1988
"Not enough information to tell if this is a Templeton session"
1987
1989
)
1988
1990
1991
+ @npc_io .cached_property
1992
+ def is_photodiode (self ) -> bool :
1993
+ """Do frame times from sync use photodiode info for the task data?
1994
+
1995
+ - in cases where diode signal is unreliable, we use vsync + constant
1996
+ monitor lag to estimate frame times
1997
+ """
1998
+ if not self .is_task :
1999
+ raise AttributeError (f"{ self .id } is not a session with behavior task" )
2000
+ task_frame_times = next (v for k ,v in self .stim_frame_times if self .task_stim_name in k )
2001
+ return any (np .array_equal (task_frame_times , array ) for array in self .sync_data .constant_lag_frame_display_time_blocks )
2002
+
2003
+
1989
2004
# helper properties -------------------------------------------------------- #
1990
2005
1991
2006
@npc_io .cached_property
You can’t perform that action at this time.
0 commit comments