Jeremy

Forum Replies Created

Viewing 15 posts - 31 through 45 (of 1,522 total)
  • Author
    Posts
  • in reply to: backup script file #10870
    Jeremy
    Keymaster

    Hi Juliana,

    Sorry for the late reply. Unfortunately at the moment we can’t recover deleted files, since they are deleted permanently. I am afraid that your student will have to recreate the file

    Best,
    Jeremy

    in reply to: How to solve ERROR: You must define the ‘items’ variable. #10869
    Jeremy
    Keymaster

    Hello,

    Sorry for the late reply. This error has popped up more frequently recently because an update to PennController in the Empty Project unexpectedly affected existing projects. Your project appears to no longer have the PennController.js file in its Modules folder. Just download the file from PennController’s github repository and then upload it to your project’s Modules folder

    Jeremy

    in reply to: Scale order troubles + logging oddities #10868
    Jeremy
    Keymaster

    Hi Kate,

    My suggestion was to create a Button element and not to print it, so it would never appear on the page to start with. The Button element just serves as a proxy for halting the execution of the script until all the conditions are met

    Best,
    Jeremy

    in reply to: Eyetracking data analysis #10858
    Jeremy
    Keymaster

    Hi,

    Sorry for the late reply

    1. Participants run the experiment in different conditions (different machines, different browsers, different number of tabs and programs open) which affect performance, hence the important variability in the intervals. The best you can do is to invite all your participants to use the same browser and close all tabs and programs that they can before taking your experiment

    2. When the data says (0,0) it means the eye tracker estimated that the gaze did not fall on either left of right. This can happen if the tracker estimated that the gaze was somewhere else on the page, somewhere else on the screen (for example the browser’s address bar) or if the participant closed their eyes, for example; all those remain estimates though, maybe the participant was indeed looking at either left or right but tracker got it wrong

    3. I’m not sure I understand this question

    Jeremy

    Jeremy
    Keymaster

    Sorry for the late reply. I see that the error no longer appears when running the experiment, so I imagine you have fixed the issue in the meantime

    Jeremy

    in reply to: Scale order troubles + logging oddities #10846
    Jeremy
    Keymaster

    Hi,

    1) Your script waits for a selection on the first scale before printing the second and third ones in a row, then it wait for a selection on the third scale, and after that it waits for a selection on the Selector element, which contains the second and third scales. So what the participant needs to do to execute the whole script is: select a value on the first scale, then select a value on the third scale, and then select a value on the second scale (or a different value on the third scale)

    Remove the .wait() on the third Scale element, and before the second Scale element create a button named, say, “next” (newButton("next")) then add a callback command both on the second and on the third Scale elements that clicks said button (.callback( getButton("next").click() )) and replace the whole Selector bit with:

    getButton("next")
        .wait( getScale("acceptability2").test.selected().and(getScale("acceptability3").test.selected()) )
    

    2) Stuff does get appended in the same columns for all the trials generated by myCustomTrialFunction. The “part2” trials, and all the other trials not generated by that function, will indeed either report blank values in the final columns, or report unrelated values if you also use .log on their newTrial (as you do for the “part2” trials)

    3) You can distinguish which of the three versions a results line corresponds to by comparing the value logged in the “contextsetter” and “targetsentence” columns, with the values reported in the “contextcomparative”/”contextequative”/”contextquestion” and “comparativequestion”/”equativequestion”/”questionquestion” columns, respectively

    If you want to directly log the version info in the results file, you could pass an additional parameter, say “version”, as part of row and use that in log:

    new_targets = new_targets.map(t=>
        [ {contextsetter: t['contextcomparative'], targetsentence: t['comparativequestion'], version: "comp", ...t},
          {contextsetter: t['contextequative'], targetsentence: t['equativequestion'], version: "eq", ...t},
          {contextsetter: t['contextquestion'], targetsentence: t['questionquestion'], version: "qu" ...t}
        ].map(row => ["experiment_"+t.pair,"PennController", myCustomTrialFunction(row).log("version", row.version)] )
    ).flat();

    Jeremy

    Jeremy
    Keymaster

    Hi Yanru,

    I unfortunately don’t have access to a device with Safari at the moment, so I cannot test this, but each browser decides how to render default form elements like radio buttons. One thing you could try to do is manually tweak the Y position of the Text elements, eg:

    .before(newText("igen").css("transform","translateY(2.5em)"))
    .after(newText(" nem").css("transform","translateY(2.5em)"))

    Jeremy

    in reply to: Timeout and button click conditions #10835
    Jeremy
    Keymaster

    Hi,

    Here’s a bare-bone illustration:

    newTrial(
        newScale("first", 7).radio().log().print()
        ,
        newScale("second", 7).radio().log().print()
        ,
        newText("warning").hidden().print()
        ,
        newVar("timed out", false)
        ,
        newTimer("timeout", 10000)
            .callback( 
                getScale("first").disable(),
                getScale("second").disable(),
                getText("warning").text("You need to be faster").visible(),
                getVar("timed out").set(true)
            )
            .start()
        ,
        newButton("Continue")
            .print()
            .wait(
                getVar("timed out").test.is(true)
                .or(
                    getScale("first").test.selected()
                    .and( getScale("second").test.selected() )
                    .failure( getText("warning").text("You need to select all the scales").visible() )
                )
            )
    )
    

    As long as you call .log() on the Scale elements, selections will be saved in the results file. If there’s no line for a Scale element, it means no selection was made on it

    Jeremy

    in reply to: Issue with ‘.before()’ #10834
    Jeremy
    Keymaster

    This is the way I would do it too

    Jeremy

    Jeremy
    Keymaster

    Hello,

    Since you are using exclusively IBEX code, and no PennController code like the newKey you mention, it’s probably simpler to just edit the DashedSentence controller to add an abort key. Just edit the file DashedSentence.js from your project’s Modules folder:

    1. Insert a new line between line 203 (}) and line 204 (else {) and paste this:

                    else if (code == 81) {
                        t.sprResults[t.currentWord-1][0] = time;
                        t.sprResults[t.currentWord-1][1] = t.previousTime;
                        t.processSprResults(t.currentWord);
                        t.finishedCallback(t.resultsLines);
                    }

    2. Edit line 291 (previously line 285 before the aforementioned insertion) and change if from processSprResults: function () { to processSprResults: function (abortAt=-1) {

    3. Just a couple lines below, you have a block of 10 lines that start with for and end with }. Replace them with this:

            for (var i = 0; i < nonSpaceWords.length; ++i) {
                if (i==abortAt)
                    this.resultsLines.push([
                        ["Word number", i],
                        ["Word", "__ABORT__"],
                        ["Reading time", "NA"],
                        ["Newline?", false],
                        ["Sentence (or sentence MD5)", this.sentenceDesc]
                    ]);
                this.resultsLines.push([
                    ["Word number", i+1],
                    ["Word", csv_url_encode(nonSpaceWords[i])],
                    ["Reading time", abortAt>=0 && i>=abortAt ? "NA" : this.sprResults[i][0] - this.sprResults[i][1]],
                    ["Newline?", (! this.display == "in place") &&
                                 boolToInt(((i+1) < this.wordOSpans.length) &&
                                 (this.wordOSpans[i].offset().top != this.wordOSpans[i+1].offset().top))],
                    ["Sentence (or sentence MD5)", this.sentenceDesc]
                ]);
            }
            if (abortAt==nonSpaceWords.length)
                this.resultsLines.push([
                    ["Word number", nonSpaceWords.length],
                    ["Word", "__ABORT__"],
                    ["Reading time", "NA"],
                    ["Newline?", false],
                    ["Sentence (or sentence MD5)", this.sentenceDesc]
                ]);

    Now you can press Q to abort the self-paced reading instance. The results file will report a line that says “__ABORT__” for the last word shown on the screen, and the reaction times will be NA from there on (because the next words won’t have been displayed)

    If you want to use a different key from Q, you can look up the event.which column from this table and replace 81 in the bit from step 1 above with the value of your choice (for example, 27 if you’d rather use the Escape key)

    Jeremy

    Jeremy
    Keymaster

    Hi,

    This is because you don’t include the fields you want to log as part of the row that you pass to myCustomTrialFunction inside the “dummy” Template. You can simply append all the fields of the original rows along with contextsetter and targetsentence simply by referencing ...t, like this:

    [ {contextsetter: t['contextcomparative'], targetsentence: t['comparativequestion'], ...t},
      {contextsetter: t['contextequative'], targetsentence: t['equativequestion'], ...t},
      {contextsetter: t['contextquestion'], targetsentence: t['questionquestion'], ...t}
    ].map(row => ["experiment_"+t.pair,"PennController", myCustomTrialFunction(row)] )
    

    Jeremy

    in reply to: Eyetracking data analysis #10820
    Jeremy
    Keymaster

    Hi,

    The tracker collects data points at regular intervals. In this case, about every 160ms to 170ms. You cannot necessarily conclude from a change from one line to the other that the participant kept looking at the same point during that interval: not only because those are just estimates from the model, but also because the participant might have started looking elsewhere early after the former data point was collected, but the model just registered that on the next cycle, and so it shows up in the file only about 160ms later

    Based on an average interval of 165ms, what you can say from the lines you posted is that the participant was (estimated to be) looking at the left item for at least 2581-2250 = 331ms and at most 331+(165*2) = 661ms. As for the right item, all you can say from these lines is that the participant was (estimated to be) looking at it for any duration between 1ms and ~330ms

    Jeremy

    in reply to: Missing data (Failed submission) #10818
    Jeremy
    Keymaster

    Hi Valentina,

    I replied to an email sent to support@pcibex.net about this. Like I explained in my email, that address does not point to the PCIbex Farm, so we cannot help with data recovery. However, keep in mind that some participants might not have really completed the experiment but instead retrieved the confirmation code by other means to get credits

    Jeremy

    in reply to: Missing data (Failed submission) #10816
    Jeremy
    Keymaster

    Hi again,

    I was finally able to check our servers, and unfortunately I can now confirm that the rows for that submission are nowhere to be found. Apologies for the inconvenience

    Jeremy

    in reply to: Missing data (Failed submission) #10815
    Jeremy
    Keymaster

    Hi Anna,

    Sorry for the slow reply. I only have intermittent access to the database, and I haven’t had the chance to look it up yet. I’ll take a look at it, but judging from the comment lines you see in the results file, if the submission is still not present when you download the file, chances are that an entry was added to the database but the content never reached it for some reason, which can happen when the load on the server is high. Apologies for the inconvenience

    Jeremy

Viewing 15 posts - 31 through 45 (of 1,522 total)