HPI

Forum Replies Created

Viewing 14 posts - 16 through 29 (of 29 total)
  • Author
    Posts
  • in reply to: html layout/event times/selector vs. scale/ compatibility #7588
    HPI
    Participant

    Ok, I solved part of it.

    It doesn’t correctly load the pictures that I call within the instruction in the HTML file.

    I wrote something like this:

    <p>
    First, press the <b>SPACEBAR</b> to load the picture.
    </p>

    Example

    This picture remains blank. The rest that I call within the trials is correctly loaded.

    Should I call them in a specific way within the HTML file?

    THANKS!

    in reply to: html layout/event times/selector vs. scale/ compatibility #7585
    HPI
    Participant

    So for 1) I am not sure I understand how to load the pics in the www folder.

    I have:

    chunk_includes
    css_includes
    data_includes
    js_includes
    results
    server_state

    is it somewhere else? This is all I have within a single project in ibexfarm

    Thanks!

    in reply to: html layout/event times/selector vs. scale/ compatibility #7583
    HPI
    Participant

    Hi, still me,

    thanks! Loading the PennController, works! Check! (at least one thing going :D)

    Still, it doesn’t run on ibex and I am doing debugging.

    If I load only the welcoming HTML files it runs.

    In the code, the experiment loads pictures within the template from csv files. The pictures are stored on our server and loaded with addhost.

    On pcibex I added “3 free” pictures that are loaded in the instructions, in the HTML files.

    The “free pictures” and the csv files on pcibex are loaded in the resource section.

    To transfer them on Ibexfarm:

    1) a. Should I load the “free pictures” in the chunk_includes section?

    b. Should I load the “free pictures” in the data_includes section?

    2) a. Should I load the csv files called by the templates in the code in the chunk_includes section?

    b. Should I load csv files called by the templates in the code in the data_includes section?

    If no to everything how should I load the csvs and pictures so that Ibexfarm can read them?

    Thank you!

    Hopefully it will run 😀

    HPI

    in reply to: html layout/event times/selector vs. scale/ compatibility #7570
    HPI
    Participant

    Hi,

    sorry for the probably not-so-smart question.

    If I load in ibexfarm (on our server) https://github.com/PennController/Sync.git in the sync interface on top of the screen, it loads the penncontroller correctly, but it tells me there is a problem with the jump function, that is not recognized.

    If I load in the same interface the address you gave me with the latest release https://github.com/PennController/penncontroller/blob/master/releases/latest/PennController.js it gives me an error “file not found”. If I try to download the script from this address and upload it manually in the js_includes sections, I start getting errors with the server.
    I have to cancel the experiment and make a new one to try again.

    Could you tell me how to declare the “latest release” in a compatible way to use the sync interface? Is the syntax wrong in the address? Is it pointing to a not-correct directory? The one that works ends with Sync.git, the latest release ends with the .js file. Maybe is that the problem?

    HPI

    in reply to: html layout/event times/selector vs. scale/ compatibility #7562
    HPI
    Participant

    Hi Jeremy,
    Thank you everything seems working.

    So if you remember in one of the first questions I asked about the compatibility between pcibex e ibexfarm, because in my university we have an ibexfarm platform running on our server, and they would like that I run the experiment with real participants from there.

    So I was trying to upload what I have now on ibexfarm.

    It doesn’t look I can modify the css files, and I changed some settings in the layout on pcibex, so I would like to upload my css there. Do you have any idea here?

    Then I added the penncontroller to the js files and I call it within my script.

    If I hit run, I get an error that it doesn’t recognize the function jump (I use it to restart the training if the participant is not good enough)

    Then it doesn’t load anything so I don’t know if this is the only problem I will get, or will I get others, but to begin…should I do change the function jump with another function compatible with ibexfarm?

    Thanks,

    HPI

    in reply to: html layout/event times/selector vs. scale/ compatibility #7542
    HPI
    Participant

    Dear Jeremy,
    sorry for the multiple posts, I am not sure if it has canceled a reply of mine.

    I have noticed that during the training, when the script has to check for success or failure, now it seems to count everything as failure since it prints the negative feedback also the times when the answer is correct.

    newSelector("smileys_practice")
        .disableClicks()
        .add( getImage("inappropriate"), getImage("infelicitous"), getImage("appropriate"))
        .keys(                 "V"     ,              "B"       ,              "N"     )
        .once()
        .log()
        .wait()
        .test.selected(variable_practice.Right_Key)  // Increment if correct answer
        .success( getVar("practice_score").set(s_p=>s_p+1) )
        .failure(newText("negative feedback", variable_practice.feedback_eng)
                .log()
                .print()
                .center()
                .cssContainer({"font-size": "130%", "color": "red"})
            )
        ,

    This is the column Right_Key in my template

    Right_Key
    N
    N
    N
    N
    B
    B
    B
    B

    So when they press N, no negative feedback should appear in the 4 first trials.

    Nonetheless it prints the feedback all the times.

    It is weird cause yesterday I tried and it was working correctly.

    Do I need to store the pressed key in a variable in order to compared it with what is the column Right Key in the template?

    getKey("response")
        .test.pressed()
        .success( getKey("response").test.pressed(row.answer)
            .failure(newText("negative feedback", "Wrong answer!")

    This is from the documentation, and the selected key is store in variable “response”.

    I tried with test.pressed but it gives me an error within a selector.

    The capslock n vs. N seems not to be the problem.

    Do you know what could be wrong?

    Thanks

    HPI

    in reply to: html layout/event times/selector vs. scale/ compatibility #7538
    HPI
    Participant

    Thank you!

    in reply to: html layout/event times/selector vs. scale/ compatibility #7534
    HPI
    Participant

    Hi,
    sorry for the late reply, I didn’t get or notice the notification you replied.. THANK YOU! 😀

    The training (counting the correct answers) works perfectly, I didn’t know I could do it this way.

    newSelector("smileys_practice")
        .disableClicks()
        .add( getImage("inappropriate"), getImage("infelicitous"), getImage("appropriate"))
        .keys(                 "V"     ,              "B"       ,              "N"     )
        .once()
        .log()
        .wait()
        .test.selected( variable_practice.Right_Key )  // Increment if correct answer
        .success( getVar("practice_score").set(s_p=>s_p+1) )
        .failure(newText("negative feedback", "Wrong answer!")
                .log()
                .print()
                .center()
                .cssContainer({"font-size": "160%", "color": "red"})
            )
        ,

    I was trying to implement the feedback in case the answer is wrong. This, I don’t know if it’s doable or not, cause I should provide different feedback in case the participant doesn’t answer correctly to a trial belonging to the specific condition (inappropriate, infelicitous, appropriate), like “this sentence is not appropriate because in the picture ABC is depicted”. (The participant is exposed to a picture, then to a sentence, and has 3 keys to rate the sentence, matching 3 emoticons, happy sad neutral).
    So in this way, I would have 3 standard feedback to assign in case they get some trials wrong in condition “inappropriate”, some trials wrong in condition “infelicitous”, some trials wrong in condition “appropriate”.
    Maybe I should train them as 3 separate practices, but I am not sure whether it would become too “complicated” for the participant. 3 practices and the experiment.
    The idea was that the trials were in one single practice, and considering the total amount of trials, they should pass the threshold value.

    Is there a way to provide feedback according to the condition of the wrong trial?

    ——————————-
    Latin Square: Does the system recognize to load the items belonging to a single group, by simply adding the column “Group” to the template? Should I specify something in the code?
    (Should the items belonging to Group 1 be lined up one after the other or is it ok if the table loads line 1 belonging to Group 1, line 2 belonging to Group 2 etc… )

    in reply to: html layout/event times/selector vs. scale/ compatibility #7526
    HPI
    Participant

    Dear Jeremy,

    I have noticed that the calculation of RT within the script is reported in the results, but it’s not correctly reported if I pass the table in R with the tidyverse function.
    Do you know what might be the reason?

    Then:

    I am implementing the practice, and the practice must provide feedback so that it can be “assured” the participant has understood the task, and should allow to start the experiment over X trials correctly answered, otherwise it should reload the practice.
    Summary: spacebar – loadpicture; spacebar – load sentence – spacebar – load a canva with smileys representing 3 level oc categorical judgment.

    I guess I have to make a column for the expected key each trial of the practice, then after each answer it should check whether the key match or not, if the pressed key is different it should provide the feedback like a text message, and a counter must go up of 1. If the counter at the end of the practice is higher than, let’s say 5, it should reload the trial practice, if it’s below 5, it should load the experimental trial.

    Do you think is implementable? Do you have any tips on how to write in javascript?

    I attach the piece of code that loads the scale with the keypress.

    Thank you so much for your help,
    HPI

       newText("How appropriate is the sentence describing the picture?")
        .css("font-size", 18)
        .css("font-family", "Verdana", "sans-serif")
        .center()
        .print()
        .log()
        ,
        
    
        newCanvas( "Smiley_Scale_practice" , 1000 , 107 )
        .settings.css( "border" , "solid 1px white" )
        .settings.center()
        .settings.add( 100,0, newImage("inappropriate", "sad.jpg") )
        .settings.add( 450,0, newImage("infelicitous", "neutral.jpg") )
        .settings.add( 800,0, newImage("appropriate", "happy.jpg") )
        .print()
        .log()
        ,
            
        newCanvas( "Smiley_Scale_Label_practice" , 1000 , 35 )
        .settings.css( "border" , "solid 1px white" )
        .settings.css("font-size", 18)
        .settings.css("font-family", "Verdana", "sans-serif")
        .settings.center()
        .settings.add( 70,0, newText("1 sad", "V - inappropriate" ) )
        .settings.add( 325,0, newText("2 neutral", "B - neither inappropriate nor appropriate ") )
        .settings.add( 780,0, newText("3 happy", "N - appropriate") )
        .print()
        .log()
        ,
        
        newVar("RT_smiley_practice", 0).global().set(t_s =>Date.now())
        ,
        
        getCanvas("Smiley_Scale_practice")
        .refresh()
        .log()
        ,
            
        getCanvas("Smiley_Scale_Label_practice")
        .refresh()
        .log()
        ,
        
        newText("warning_practice", "Please provide a judgment before you can continue")
        .css("font-size", 20)
        .css("font-family", "Verdana", "sans-serif")
        //.css("width", "40em")
        .center()
        .color("red")
        .hidden()
        .print()
        ,
    in reply to: html layout/event times/selector vs. scale/ compatibility #7484
    HPI
    Participant

    Hi,
    I think I made it to solve almost all the issues of this thread, the only thing remaining is that I don’t get a column with RT if I calculate it within the script.

    I tried what you suggested:

    newTrial(
        newVar("rt", 0).global().set(v=>Date.now())
        ,
        newButton("Click me!").print().wait()
        ,
        getVar("rt").set(v=>Date.now()-v)
    )
    .log("RT", getVar("rt"))

    And the newTrial is actually the running trial reading a line of the template.

    So as summary: the participant press the spacebar, a picture appears, press the spacebar and a sentence appears, press the spacebar and a ratingscale appears.
    Now I am trying to have a column for the time they need to read the sentence, so I want the time from the pressing to load the sentence to the pressing to loading the scale.
    So I placed newVar before the first target key press, and getVar after they pressed to load the scale.
    Then when the trial ended and there is the all logging of conditions and results I added .log(“RT”..)

    The problem is that I don’t see this RT “column” in the results table.
    In addition, either that I open the results with plain excel, or that I load them in R with the function, the results are in a format in which each event is a line (press the key, load this and that…everything is a line) and a trial is like the block of ten lines. In this logic I don’t understand how this new RT datum should be formatted, should it appear as a line? If it has to appear as a column then it must add a column RT (meaningless when reading a single line) to each line with the value of RT calculated in that point.

    Is there a way to process this result table in a more meaningful way? Like having a line corresponding to a trial, and all the parallel info (like the time to load the instructions, as a column : Time of instructions, which would be constant with the respect to the trial, the instructions are loaded once and that’s it). If a trial is a line, then it would have a sense to a column RT.

    I hope I explained the issue sufficiently well.
    HPI

    in reply to: html layout/event times/selector vs. scale/ compatibility #7427
    HPI
    Participant

    Hi,

    thank you for your help, I am back again, struggling a bit.
    So I tried the canvas option to get a mouse click to advance but it didn’t work, also I think the canvas go in conflict with loading a pre-written HTML page like the one having the instructions.
    So I went back to the solution of using only the keyboard.

    a) First: I don’t get the logic for the graphic layout set-up (if I run it on a PC or apple the position of the images changes, the position changes also if for some reason I change the zoom settings on the chrome browser).
    I would like that the images and the text keep the same position no matter where the script is run.
    What is the difference in using .center(), in using “vw, vh”, and in setting a position (500, 500)?
    I thought vw would adapt to the hardware opening the script, but it goes off by changing the zoom settings of the browser, plus it centers pictures, but it doesn’t work in the same way with text, which is actually centered in a more efficient way with .center.

    b) Then regarding the logic of the script:
    (a picture is loaded with the spacebar, then a sentence is loaded with the spacebar, then 3 images appear representing a scale and the participant has to select one picture using 3 possible keys of the keyboard – before it was the mouse click and it worked, but I don’t want to implement the advancing with the space bar and the selection with the mouse, I want to use only one device, at first I thought the mouse was easier and more comfortable for the user, but this system seems not designed to code the fingers of the mouse, so I changed my mind and decided to use only the keyboard instead)

    Once the scale appeared I would like that a message appears on the bottom saying “press the space bar to advance” (before there was a button, but avoiding the use of the mouse, means avoiding the use of buttons, and it’s better because only the stuff relevant for the tested processing mechanism appears on the screen).
    This message has to appear only if they press one of the 3 selected keys, only if they selected at least one. The experiment cannot move forward without the answer of the participant.

    Since it is a sequence of canvas, the text has to stay on a canvas too otherwise it appears underneath I guess. If they press the space bar before having given a judgement a warning text “please provide a judgement” should appear.

    I tried several options, but something is not working, either I get errors, or the sequence doesn’t appear the way I want it.

    b.1) Could you check if I am doing something logically wrong with the Wait(test.selected().failure) commands?

    b.2)Can I specify to verify whether the participant has pressed “a” “g” “l” in the wait command? (does it matter if I declare “a” or “A”? )

    b.3) To load the pictures and the scale I first created a canvas, then called it with getcanvas. For this last selector which has to appear only if the previous selector has been completed should I create first a canvas, then tell the system to print only if the selector has been closed, or should I create a newcanvas and say “print it only if the previous selector has registered either “a” “g” “l”?

    The run messes up if I test the possibility that a participant presses a random key… the warning doesn’t come out and that either I place “once()” or not, the final command to press the space bar to advance does not appear, so the experiment crash.

    getCanvas("Smiley_Scale")
        .refresh()
        .log()
        ,
            
        getCanvas("Smiley_Scale_Label")
        .refresh()
        .log()
        ,
        
        newText("warning", "Please provide a judgment before you can continue")
        .center()
        .color("red")
        .hidden()
        .print()
        ,
    
     newSelector("smileys")
        .disableClicks()
        .add( getImage("inappropriate"), getImage("infelicitous"), getImage("appropriate"))
        .keys(             "A"         ,               "G"       ,               "L"     )
        .once()
        .log()
        .wait()
        ,
        
        newCanvas( "End_of_trial_page" , 1000 , 35 )
        .wait(getSelector("smileys").test.selected().failure(getText("warning").visible()) )
        .settings.css( "border" , "solid 1px black" )
        .settings.center()
        .settings.add( 300,0, newText("move_on_to_new_trial", "PRESS THE SPACEBAR TO LOAD A NEWTRIAL" ) )
        .print()
        .log()
        ,
        
        //getCanvas("End_of_trial_page")
        //.wait(getSelector("smileys").test.selected().failure(getText("warning").visible()) )
        //.print()
        //.log()
        //,
            
        newKey("endtrial_newtrial"," ")
        .log()
        .wait()
        
        )

    Thanks, sorry for using so much of your time,
    HPI

    in reply to: html layout/event times/selector vs. scale/ compatibility #7415
    HPI
    Participant

    Hi,
    Thank you for your help. I am not sure I have understood the canvas suggestion. Right now to self-pace the experiment I used this strategy, so the participant advances with the spacebar. I got the input to allow the participant to advance with a mouse click and not with a keypress.

    newTrial("welcome", 
    
        newHtml("welcome", "welcome.html")
            .css("line-height","1.4")
            .settings.log()
            .print()
        ,
    
        newKey("Go_to_page2"," ")
        .log()
        .wait()
        ,
        
    ).setOption("hideProgressBar",true);

    Do you mean to implement something like this?

    newTrial("welcome", 
    
        newCanvas( "clicks", 100, 100)
            .settings.css( "border" , "solid 1px white" )
            .print("center at 50vw","middle at 50vh")
        ,
    
        newHtml("welcome", "welcome.html")
            .css("line-height","1.4")
        ,
            
         newSelector("clicks_1")
        .add(getCanvas("clicks"), getHtml("welcome"))
        .print()
        .refresh()
        .log()
        .once()
        .wait()
    ,
    
        //newKey("Go_to_page2"," ")
        //.log()
        //.wait()
        //,
        
    )

    This right now does not work. I was wondering if with something like “newKey” I could catch the key of the mouse without placing buttons.
    I am not sure I understood what I should remove with the canvas strategy.
    Thank you for your time,
    HPI

    in reply to: html layout/event times/selector vs. scale/ compatibility #7409
    HPI
    Participant

    Thank you for all the information, I will implement your suggestions!

    two more things:

    1) can I add a fixation point before the sequence of objects appears on the screen on each trial for like 200 ms? Should I use the commands related to the eyetracking tools? I searched the documentation but I haven’t found an entry for fixation point/star.

    2) I have implemented a sort of safe pace advance in the experiment, so it’s the participant that makes objects appearing on the screen, now with the space bar.

    We are discussing whether to keep everything on the keyboard or use the mouse, is it possible to have the mouse click left button for example as key for advancing without having a button on the screen? Like there is the empty screen or with a fixation point, the user clicks the mouse and the picture appears, clicks and the sentence appear, evaluates by clicking on the scale the empty screen for the next trial appears.

    If we go for this solution then I would be interested in trying the mouse tracking options so I will try to add them to catch whether they first evaluated the sentence with 3 points and then changed their mind and evaluated with 2.

    Do you think this is doable in principle? (also with this drawback that the university server is set up with ibexfarm and not pcIBEX?)

    Thank you!
    HPI

    in reply to: syntax acceptability judgment – pictures and template #7121
    HPI
    Participant

    Thank you,
    Thank you also for the link. I just started using the platform and I got quite confused at first with the documentation pointing at the old and new ibexfarm, adding the penncontroller and so on… understanding where to use what.
    So I guessed I missed this specific list of commands which is indeed very useful ( I saw the tutorial etc.)
    Thank you for the advice on the debug.

    This works, I kind of imagined big buttons with the number for the participants to click. I suppose I can modify the layout making the buttons bigger with a CSS HTML file, correct? ( I also tried the score scale, but it doesn’t make buttons like the proceed-button to click, it has small numbers. Can I provide a dimension for the scale in the command line when I declare the scale in any way, or all the visual part is left to be declared in the CSS file?) I kind of wanted to use big buttons, we may use it also for children participants, I feel the scale as default might be small and not much engaging for a child.

    I’ll play around a bit,
    Thank you again

Viewing 14 posts - 16 through 29 (of 29 total)