Jeremy

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 1,522 total)
  • Author
    Posts
  • in reply to: Randomized separator in randomized sequence of trials #10927
    Jeremy
    Keymaster

    Hi,

    If you already know how many trials you will have of each type, I would probably use the pick function, like this:

    N_SEP = 4;
    N_STIM = 8;
    
    stims = randomize("theStimuli")
    seps = randomize("theSeparator")
    
    subseq = []
    for (let i=0; i<N_STIM; i += N_STIM/N_SEP) {
      subseq.push( pick(stims, N_STIM/N_SEP) )
      subseq.push( pick(seps, 1) )
    }
    
    Sequence( "intro" , ...subseq , "end" )
    

    Jeremy

    in reply to: Issues preloading audio #10925
    Jeremy
    Keymaster

    Hi,

    Your CSV files reference some wav filenames that start with a single digit, but no file in your archive starts with a single digit: those you’re targeting start with 0

    Jeremy

    in reply to: Newlines in SPR not logged in results #10924
    Jeremy
    Keymaster

    Hi Jan,

    The ! is misplaced in that line, unfortunately this was only fixed after DashedSentence.js was added to PCIbex. Just edit the line as shown in the git commit and you should get things to log correctly

    Jeremy

    in reply to: Global var logged “undefined” #10923
    Jeremy
    Keymaster

    Hi,

    Unfortunately the Modules folder of the project you shared currently lacks the file PennController.js. There was, however, a bug with global Var elements in a version of PennController 2.1 that was present in the Empty project for a time. Could you try uploading the latest version of PennController 2.1 to your project and see if the problem persists?

    Jeremy

    in reply to: self paced reading experiment probelm #10922
    Jeremy
    Keymaster

    Hi,

    If what you’re interested in is how much time passed between seeing the last word and making a choice on the Selector element, you don’t need to subtract any word-specific reading time: the value in the EventTime column for the Controller element corresponds to the completion of that controller, ie last press on space bar. So all you need to calculate is Selector EventTime - Controller EventTime

    Jeremy

    in reply to: Some questions about setting up an eyetracking experiment #10921
    Jeremy
    Keymaster

    Hi Sanghee,

    I added a page about versioning to the documentation with instructions on how to change the version of PennController that you project uses

    Jeremy

    in reply to: Maximum audio playbacks #10920
    Jeremy
    Keymaster

    Hello,

    Use a Var element to keep track of how many times the Audio element was played:

    newVar("nplayed", 0)
    ,
    newAudio("audio", "file.wav")
      .callback( getVar("nplayed").set(v=>v+1)
        .test.is(3).success( getAudio("audio").remove() ) 
      ) 
      .print()
    ,
    newButton("Next").print().wait()
    

    Jeremy

    in reply to: Some questions about setting up an eyetracking experiment #10884
    Jeremy
    Keymaster

    Hi Sanghee,

    The project you shared in your last message does not use the same version of PennController (2.0) as the project your shared in your initial message (2.1). So since your project uses 2.0, you should use .call and not .run. Also, in 2.0 you cannot just inject a bare javascript function in a trial’s script, you have to package it as a Function element, like this: newFunction( ()=>(document.querySelector("body").style.cursor='unset') ).call()

    So all in all, your code will contain these lines:

    newFunction( ()=>(document.querySelector("body").style.cursor='unset') ).call()
    ,
    newSelector("selection")
        .enableClicks()
        // etc.

    Regarding calibration, it looks like you’re already doing what you’re describing. Maybe comment back in the calibrate lines that are currently commented out, so you give your participants one last chance before setting “Failed” to “yes”. If you want to insert the FailedCalibrationLink trial between each experimental trial, just use sepWith, eg: sepWith("FailedCalibrationLink", rshuffle("Block1_target", "Block1_filler"))

    Jeremy

    in reply to: ANT task #10883
    Jeremy
    Keymaster

    Hello,

    Would you mind either sharing a link to your project, or a definition of the cueText function, so we can see what it does exactly? Thank you

    Jeremy

    in reply to: Problem with Header #10882
    Jeremy
    Keymaster

    Hello,

    I apologize for the inconvenience: this is a new bug that was introduced in the version of PennController shipping with the Empty Project. I have fixed the bug in this release of PennController. Please download the file at upload it to your project’s Modules folder, and the Header command should behave properly again

    Jeremy

    in reply to: CMLP #10881
    Jeremy
    Keymaster

    Hi,

    Here is a project illustrating the basic idea: https://farm.pcibex.net/r/CKSRWL/

    I’m not sure I completely understood how the three prompts relate to the lexical decision task (having less than 500ms per prompt seems incredibly hard) but one can easily adjust the details

    Jeremy

    in reply to: Issue with native PCIbex randomization #10875
    Jeremy
    Keymaster

    Hi Kate,

    Did you run this experiment like this? There’s an incompatibility with PennController 2.1, you should upload version 2.0 to your project’s Modules folder

    Regarding group distribution, note that by default, if multiple participants open your experiment at the same time, they will all be assigned the same group, resulting in imbalance. You can control group assignment by passing it as withsquare in the URL of your experiment

    Jeremy

    in reply to: Log RT (Maze Task) #10873
    Jeremy
    Keymaster

    Dear Juliana,

    If I take these lines from your script:

    newVar("RT").global().set( () => Date.now())
    ,
    getText("Segmento17")
        .remove()
    ,
    getText("Segmento18")
        .remove()
    ,
    getCanvas("Segmento1718")
        .remove()
    ,
    getVar("RT").set( v => Date.now() - v )

    then you’re not tracking reaction times, you’re tracking how long it takes for the browser to remove the two Text and one Canvas elements from the page (most likely this should only take a few milliseconds)

    I suspect that what you want instead is to surround the Selector elements with the Var commands. You can just create as many Var elements as you’d like to surround each Selector element, just make sure to give them unique names (e.g. newVar("RT1314")/getVar("RT1314"), newVar("RT1516")/getVar("RT1516"), etc.) and also make sure to reference each Var element in the log commands on the closing parenthesis of newTrial like the one you currently have

    Jeremy

    in reply to: Some questions about setting up an eyetracking experiment #10872
    Jeremy
    Keymaster

    Hi Sanghee,

    1. I don’t see the “Maximum call stack size exceeded” message, but regarding your image issue: what should happen after you show it? Right now, you tell the script to do nothing, that is, it moves to the next trial immediately after showing the image. Maybe you want to insert a Button or a Key element and wait for it

    1-bis. Relatedly, you do not .print your Button named “webcamStart” so it’s not visible on the page, and the experiment gets stuck there, waiting for a click on an undisplayed button

    2. PennController has been deprecated since version 1.7

    3. Since new projects now ship with PennController 2.1, in which the EyeTracker element has been overhauled, it’s hard to speak from experience. However, I would say start with low-ish thresholds (say 20-30) and see if you get decent data. If not, try increasing it and see if you still pass calibration

    4. If using version 2.1, note that the call command on the Function element has been replaced with run. Then try adding this line just before the Selector element: ()=>(document.querySelector("body").style.cursor='unset')

    Best,
    Jeremy

    in reply to: Load time issues with .zip method #10871
    Jeremy
    Keymaster

    Hello,

    I am currently unable to replicate the problem. Do you still experience varying preloading issues?

    Actually I am able to identify preloading issues, having to do with the fact that you create elements with invalid filenames. For example, the last line of your CSV file for the training block 2 is:

    ABA,2,B2FB2,comp,huspfb_1.mp3,huspfb_2.mp3,-,-,B2_husppos.png,-,-,"He said  HUSP . Now, what did that mean again? I think that means big. These moons definitely look pretty  HUSP .","Ok, help me out here. Which moon is  TRAGOT  than the first moon?",MIDDLE,RIGHT,MIDDLE

    So Audio2, Audio3, Image2 and Image3 are all -, which are invalid filenames. PennController cannot find files for the elements you create in your second Template command that reference those columns, and so it fails to preload them. When the corresponding trials run, they try again to preload the resources for 1min, but obviously fail, and then crash when it comes to inserting the elements that aren’t associated with valid files

    Jeremy

Viewing 15 posts - 16 through 30 (of 1,522 total)