![]() ![]() I'm getting semi-random segfault using Psychopy. For more, see CONTRIBUTING.mdĪnd the developers documentation at #404 Code Status To contribute, please fork the repository, hack in a feature branch, and send a The entire application and library are written in Python and is Simple graphical user interface called Builder, or write your experiments in To meet these goals PsychoPy provides a choice of interface - you can use a able to run experiments in a local Python script or online in JavaScript.It aims to provide a single package that is: When variables are involved, and that compile-time calculation isn't possible, perhaps we just delay that calculation from compile time to runtime, by passing a list of possible candidate max times rather than a single value. That is, the current getMaxTime function seems to cycle through all the components to work out the maximum absolute time. for a routine where we have several stimuli, some defined with a literal end time, another with a variable, and another with a start time plus a duration: while t < max(3.0, fixation_dur, 1.0 + stim_dur). replace the literal value in something like while t < 3.0 with a max(). My rough idea is that we simply replace the fixed literal value for the while test. a third option, which is basically just (hopefully slightly) modify what we currently do. I guess I was thinking that we could retain the decision making at compile time, and the same while vs for code structure. The key function in determining whether non-slip timing will be applied is getMaxTime() in routine.py: I've tested this by manually editing scripts which have just a single duration specified, but things would naturally get more involved when dealing with multiple components, some or all of which might have variables in their duration or time fields. if duration, time, or frameN is specified with a variable name, that variable name should be treated just like a literal value in constructing an expression for the total duration of the routine. when durations or end times are unspecified or contingent on a condition?) i.e. ![]() Would it be possible to disallow "non-slip" timing only when it is actually impossible (e.g. an fMRI acquisition sequence, or presenting words in time with an audio track playing in the background), and the absence of non-slip timing very quickly accumulates apparent errors over anything more than few repetitions. This sort of requirement (of consecutive trials of variable but deterministically-specified duration) is crucial in any task that requires staying in sync with some specified timeline (e.g. But if the generated non-slip version of the script is manually edited, with the variable name simply replacing the literal 1.0 value, it will run perfectly well and finish exactly at 60 s. The total duration should still be 60 seconds, but now the actual performance will run slightly longer than that, as non-slip timing will not be applied, due to the stimulus duration being specified as a variable. But let's say the design requires the duration to vary across trials pseudo-randomly (20 trials each of 0.5, 1.0, and 1.5 seconds). Non-slip timing will be applied, and the loop will run for almost exactly 60 s. Let's say a routine contains a single stimulus with a duration of a constant 1.0 seconds, expressed as a literal value of 1.0, in a loop that runs 60 times. This can be demonstrated by editing a generated non-slip timing script to use a variable to specify trial duration. Therefore, the value of that variable could be used in place of a literal value with no issue at all. This is despite the fact that even if the value of that variable is not known at the time the script is generated, it will be known at runtime, before the routine begins. if the duration of any of the stimuli within a routine is defined by a variable rather than a literal numeric value, then non-slip timing is not applied. However, deciding which routines are eligible for non-slip timing is currently overly strict. because it is dependent on a participant response), then that form of timing can not be used, and the routine is coloured red: If the duration is not known in advance (e.g. At the moment it makes a distinction between routines whose duration is known "at compile time", which get non-slip timing applied (and the cherished green routine icon in the flow panel). Apologies for the length of this, but it might be useful to provide context for the problem to then explore how it might be resolved.īuilder has a long-standing issue that leads to unnecessary accumulation of timing errors across consecutive trials. ![]()
0 Comments
Leave a Reply. |