Jeremy

Forum Replies Created

Viewing 15 posts - 361 through 375 (of 1,522 total)
  • Author
    Posts
  • in reply to: design three page experiment with loop #8359
    Jeremy
    Keymaster

    Hi,

    You can use .remove() on any element that you previously printed to take it off the screen, this way you can have the three images appear in sequence rather than have them all on the page at the same time

    I am missing some details about your design to give you a fully worked out example script, but here is one project that is consistent with your description: https://farm.pcibex.net/r/nkHbDP/

    There is a CSV file that lists pairs of images and one sound file for each trial, for two different groups. The middle image is always the same from trial to trial, but the first and last images are the ones referenced in the CSV file. The audio also changes from trial to trial, as specified in the CSV file

    I also added a Text element above the images so you can tell which trial number/group you are seeing when taking the experiment

    Of course this is just for illustrative purposes, as the script collect no measures at all (although by adding .log() to the Image elements and to the Key element, you could retrieve how fast participants press Space after seeing each image, for example)

    Jeremy

    in reply to: results missing? #8357
    Jeremy
    Keymaster

    Hi Pegah,

    Yes, delays are to be expected. However, if you experience the counter going down even though you didn’t delete submissions, it is a different issue, which probably has to do with a bug in how the script downloads and stores the results in cache. To force a cache refresh, make sure you close all tabs from farm.pcibex.net (eg. quit your browser), visit your project again and try downloading your results. If the number seems off, try that process again once or twice. If the problem persists, it means there either is a delay in how the database handles incoming submissions, or an error caused some data loss

    I am happy to check the server for you by the end of the week, but could you please remind me about it by posting a message here then?

    Thank you,
    Jeremy

    in reply to: results missing? #8354
    Jeremy
    Keymaster

    Hi Pegah,

    I can confirm that the database indeed lists 18 submissions for that project currently. You said you were expecting more than the server showed at the time you wrote your previous post, is this still the case?

    I also see one submission that got to the farm’s server but failed to be added to the database, received on August 22 at 17:15 UTC, which brings the total to 19 submissions
    EDIT: actually the submission is already in the database, not sure why the backup copy I found did not get deleted

    Best,
    Jeremy

    • This reply was modified 3 years ago by Jeremy. Reason: 18 submission, not 19
    in reply to: Controller can not retrieve the stimuli #8350
    Jeremy
    Keymaster

    Hi,

    The script successfully reads the sentence column from the CSV file, but it contains 12 rows with empty text cells, which is why you see empty sentences when you take the experiment in the first group. It runs normally when you force other groups, eg: https://farm.pcibex.net/r/cBTdXc/experiment.html?withsquare=1

    Delete the extra rows to fix the issue

    Jeremy

    in reply to: results missing? #8349
    Jeremy
    Keymaster

    Hello,

    Could you give me the URL of your project, and how many submissions you expect to see?

    Thank you,
    Jeremy

    in reply to: Re-reading sentences in the SPR option #8346
    Jeremy
    Keymaster

    Hello,

    Assuming you use the native DashedSentence and Question controllers, you could embed them in a PennController trial like this:

    newTrial(
        newController("1stpass", "DashedSentence", {s: "This is a dummy sentence"}).log().print().wait().remove()
        ,
        newCanvas("buttonContainer", "30em", "1em")
            .add(               0 , 0 , newButton("Continue") )
            .add( "right at 100%" , 0 , newButton("Read the sentence again").callback( 
                clear()
                ,
                newController("2ndpass", "DashedSentence", {s: "This is a dummy sentence"})
                    .log().print().wait().remove()
                ,
                getButton("Continue").click()
              )
            )
            .center()
            .print()
        ,
        getButton("Continue").wait()
        ,
        clear()
        ,
        newController("Question", {as: ["Yes","No"], q: "Was the sentence felicitous?"}).log().print().wait()
    )

    Jeremy

    in reply to: My images cannot be loaded. #8340
    Jeremy
    Keymaster

    Hi Chorong,

    1. The extensions of your files are .PNG, not .png

    2. Your zip file is now publicly downloadable, but its CORS settings are still misconfigured. You need to set the CORS as explained here

    Jeremy

    in reply to: My images cannot be loaded. #8337
    Jeremy
    Keymaster

    Hello,

    None of the image references in your CSV tables include the filename’s extension (.PNG) so whatever method you use to host your images, as long as there’s a mismatch between the filenames (ie. lacking the extension, in your case) the references simply will point to an invalid URL and no image will be found

    Re. the zip file in the S3 bucket, it’s not public: when I click the link in your message, I get to the sign-in AWS portal. If I cannot access the zip file manually, a fortiori I cannot access it in the background when taking the experiment either

    Jeremy

    in reply to: Unwanted new line in text input field #8336
    Jeremy
    Keymaster

    Hello Sabrina,

    Apparently there is a bug with the TextInput element whereby, if you release a keypress by the time the element is printed onto the page, that keypress is considered part of what you typed in the TextInput element. For some reason, the default 1-line limit on TextInput elements is overridden by that bug, which means that when, in your experiment, you validate a trial by pressing Enter (after selecting a value on the scale) by the time you release the keypress, the next trial’s TextInput has been printed and it therefore inserts a linebreak at the beginning

    You can work around that by adding a slight delay at the beginning of the trial so that the participant should have released the keypress by the time the TextInput element is created, eg 250ms: newTimer(250).start().wait()

    Jeremy

    Jeremy
    Keymaster

    Hi Sanghee,

    How about this?

    newTrial(
      newText("target", "This is the target sentence").log().print()
      ,
      newKey("showQuestion", "").log().wait()
      ,
      newText("question", "Press F if the sentence is acceptable, J otherwise").log().print()
      ,
      newKey("answer", "FJ").log().wait()
    )

    Whenever you log a PennController element, the results line reports the timestamp of the event, so you can subtract the timestamp for the target sentence from the timestamp for the showQuestion Key element to calculate how fast the participant revealed the question, and subtract the timestamp for the question Text element from the timestamp for the answer Key element to calculate how fast they moved on to the next trial

    Jeremy

    in reply to: Resources Not Loading – Random Points in Experiment #8329
    Jeremy
    Keymaster

    Yes, both the “complete” message and the successful playbacks mean that it is working. It looks like all CORS requests simply fail when using the Preview window, so you’ll have to take your experiment in a separate tab if you need to test trials that use files from the zip file. Unfortunately I’m not sure I could do much about that, given the general constraints that browsers put on embedded pages like the preview frame

    Jeremy

    Jeremy
    Keymaster

    Hi,

    Unfortunately I don’t have resources to learn how to design eye-tracking experiments online from a beginner’s perspective. What prompted me to develop the EyeTracker element in PennController, besides finding out about the webgazer.js library developed by Papoutsaki et a., was to allow experimenters who ran experiments with a physical eye tracker to port them over to a browser using a webcam

    One thing to keep in mind here is that the eye-tracking capacities that come with a webcam are limited, and depending on what design you are implementing, using a webcam eye-tracker might not really be a realistic option at the moment: you should probably only consider it if all you are interested in is whether the participant is looking left vs right with a time resolution of ~100ms at best (unless you run the experiment in lab and make sure the browser’s performance allows for a finer time resolution)

    This is what the eye-tracking starter experiment does, although it may already be a little too ambitious: it creates four Canvas elements placed at each quadrant of the page that each cover 40% of the width and height of the page (so there is ~10% of empty space between the Canvas elements) and prints content inside those Canvas elements. The EyeTracker element then tracks the Canvas elements (= the four quadrants): this way, when the participants look at content, even if the gaze estimates are off because of the relatively poor performance of the webcam-based eye-tracker, they should still mostly fall in the correct quadrant

    Regarding how to design an experiment with PennController more generally, and understanding the code in the eye-tracker template more specifically, you can find the tutorial here and a recording of a workshop we gave at CUNY 2021 here

    Jeremy

    in reply to: Resources Not Loading – Random Points in Experiment #8326
    Jeremy
    Keymaster

    Yeah the S3 link does not send the header either, so you’ll face the same problem

    I just realized the link I gave to the other post about S3 does not discuss CORS settings. AWS has documentation about how to create a CORS configuration. In your case, you want to use a JSON configuration like this:

    [
        {
            "AllowedHeaders": [
                "*"
            ],
            "AllowedMethods": [
                "GET"
            ],
            "AllowedOrigins": [
                "https://farm.pcibex.net"
            ],
            "ExposeHeaders": []
        }
    ]

    Jeremy

    in reply to: Unable to randomize fillers and experimental items #8324
    Jeremy
    Keymaster

    Hi Yasmin,

    Yes, that is the reaction time: the line you pasted tells you that the participant clicked on the slider at timestamp 1657146599275-727 = 1657146598548 and released the click (most likely after sliding) 727ms later (ie. timestamp 1657146599275)

    Jeremy

    in reply to: Resources Not Loading – Random Points in Experiment #8323
    Jeremy
    Keymaster

    Hi Kelly,

    Currently, requests to https://kellymarshallresearch.umd.edu/DDMMaterials/DDMZip_AllInstbias.zip do not return the necessary allow-control-origin header, so the zip file cannot be downloaded in the background from a script that lives outside the kellymarshallresearch.umd.edu domain

    If you copied the code from the guide, then you should have this line:

    Header always set Access-Control-Allow-Origin "*"

    Make sure to double-check that you either have "*" or "farm.pcibex.net" (or whatever domain you run your experiment from)

    You’ll also want to make sure that .htaccess lives directly in the directory at https://kellymarshallresearch.umd.edu/DDMMaterials/ and not in a parent folder, for example. I know for a fact that it is possible to configure .htaccess correctly on the UMD servers, since this user was able to

    If everything seems properly configured but you still cannot access the zip file from the experiment, consider reaching out to an IT person at your institution

    Jeremy

Viewing 15 posts - 361 through 375 (of 1,522 total)