Shared Scripts, Data, Stimuli, Files, and Demos

Assignment three- Sepideh Run Experiment

Assignment three- Sepideh

Sepideh

No comments yet
 




Comments

No comments yet

If you are a registered user and signed in, you can here copy this script and its stimuli to your own account, where you can edit it and change it in any way you want.

It is absolutely free to register (no credit card info asked!). You can then instantly copy this experiment with one click and edit it, change its accompanying texts, its landing page, stimuli, etc. Invite your colleagues, friends, or students to check out your experiment. There is no limit on how many people can do your experiment, even with a free account.

The catch? There is no catch! Just keep in mind that with a free account, you cannot collect data. For teaching that is usually not a problem. For research, prepaid data collection (unlimited subjects) starts as low as €10.00 for a 10-day period.

 
main.setfontsize(60);
var subject_ID;
var negativeemotions= ["ss.jpg","ss9.jpg","ss5.jpg","ss13.jpg","ss10.jpg","ss11.jpg","ss14.jpg","ss12.jpg"];
var neutralemotions= ["nn1.jpg","nn7.jpg","nn8.jpg","nn5.jpg","nn3.jpg","nn6.jpg","nn10.jpg","nn2.jpg"];
var icon = ["sad3.jpg","smile_2.jpg"];
var i;
var stimuli=[];
var e;

stimuli = stimuli.concat(negativeemotions,neutralemotions); // Combine two arrays into a new one
stimuli = shuffle(stimuli);

for (i = 0; i < stimuli.length ; i++)
{
    preload(stimuli[i]); 
}

image.await("preloading_completed"); 
var b = main.addblock("center","center",80,50,"lavenderblush","Welcome to this experiment");
await(3000);

b.text("before starting the experiment please answer some general questions");
await(2000);
clear();
b.destroy();

radio("Participation in this experiment is entirely voluntary and you may withdraw at any time. Would you like to proceed? ",['Yes','No'], "consent");

if (response.consent == "No")
{
    text("The experiment ended. Thank you!");
    return; 
}

select("What is your gender?",['male','female'],'gender');

select("What is your age?",range(0,100),'age');

text("You selected {gender} and {age}"); // Named controls can be used with { } notation
await(2000);

select("How many hours do you typically watch short videos on YouTube?",['less than 1','2','3','more than 3'],"hours_media");

scale("on a scale of 1 (not much) to 7 (very much),how much YouTube videos influence your emotions?","1","7","media-emotion");


text("This experiment takes approximately 4 minutes, and you'll be completing two separate experiments.");
await(3000);
clear();

var subject_ID = increase("Subject ID", "script");
log(subject_ID,"Subject number");

text("First Experiment");
await(2000);
clear();

instruction("Please watch the following video till the end!");


if (subject_ID%2 === 0) // Even subject numbers assigned to condition 1
{

    setvideo('https://www.youtube.com/shorts/YDv0mTxPMXA?t=6&feature=share');
    await("videoended");
    await(2000);
    scale("On a scale of 1 to 5, with 1 being 'Very Negative' and 5 being 'Very Positive,' please rate your current mental and emotional state.","1","5","emotional state");
    

    instruction ("Now you will be shown a set of pictures. Please press the 'S' key if the image is showing negative emotions and press nothing if the picture shows neutral emotions.");
    instruction("Please press the key as quickly and accurately as possible");
    
    for (i = 0; i < stimuli.length ; i++)
    {
        text("+");
        await(1000);
        clear();
        b = main.addblock("center","center",60,60);
        b.resize(40,40);
        b.setimage(stimuli[i]);
        await(2000);
        b.hideimage();
        
        var d = main.addblock(5,30,40,40); // Top-left: 5 in, 30 down. 40x40 big.
        var k = main.addblock(55,30,40,40); 
        d.preload("sad3.jpg");
        k.preload("smile_2.jpg");
        image.await("preloading_completed"); 
        d.resize(40,40);
        k.resize(40,40);
        d.setimage("sad3.jpg");
        k.setimage("smile_2.jpg");
        
        e = awaitkey('s,l',3000);
        log(e.RT, stimuli[i] + "RT"); // Stores the RT for each image 
        log(e.key, stimuli[i] + "key"); 
        d.hideimage();
        k.hideimage();
        main.removeblock(d);
        main.removeblock(k);
        
        if (e.type === "timeout")
        {
            text("Please, try to respond faster next time within 2 seconds)");
            await(1000);
            clear();
            
        }
        else
        {
            await(500);
        }
        
    }
    text("End of first experiment:). Now the second experiment will start in 4 seconds");
    await(2000);
    clear();
    text("ready?");
    await(2000);
    clear();

    main.setfontsize(40);
    var i;
    var locations = [[30,30],[51,30],[30,51],[51,51]];    
    var blocks = [], r, stimulus=[], e, hits = 0, false_alarms = 0, stimuli2=[];
    trials = shuffle([1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 2,2,2,2,2]);
    yes = addblock(44,90,12,7,"green","yes");
    var NegativeWords =["anxiety","attack","bomb","coma","grave","slave","racism","injury","jail","death"];
    var NeutralWords= ["bone", "cactus","door","risk","room", "pants", "ticket","plot","east","desk"];
    stimuli2 = stimuli2.concat(NegativeWords,NeutralWords);
    stimuli2 = shuffle(stimuli2);
    
    main.setfontsize(60);
    text("pres the 'tap' button as soon as you see a negative word, but never when you see a neutral word.");
    yes.text("ok");
    yes.await('click');

    text("Please press the key as quickly and accurately as possible, within 1500 ms");
    yes.text("ok");
    yes.await('click');
    clear();


    for (i = 0; i < locations.length; i++) 
    { // block with and height is 19%
    blocks.push(addblock(locations[i][0],locations[i][1],19,19,'aliceblue').text('#',300)); // #of  size 300%
    }
    
    for (i = 0; i < trials.length; i++) 
    {
    yes.text("tap");
    await(1000 + random(500));
    stimulus = trials[i] === 1? NegativeWords[i] :NeutralWords[i]; // 75:25 chance of P or R
    r = randint(0,3); // Which block?

    blocks[r].text(stimuli2[i],200);
    
     e = yes.await('click',1500);
     log(e.RT, stimuli2[i] + "RT"); 

    await(1000);
    blocks[r].text('#',300);

        
    }
    for (i = 0; i < blocks.length; i++) // Remove ('destroy') all blocks
    {
    blocks[i].destroy();
        
    }
    text("In this experiment, we explored the influence of emotional video content on your ability to detect emotional faces and emotional words in comparison to neutral video content. We assessed this by analyzing your reaction time and accuracy.");
    yes.text("ok");
    yes.await('click');
    await(2000);
    text("thanks for your participation!");
    yes.text("ok");
    yes.await('click');
    yes.text("Exit");
    yes.await('click');
    yes.destroy();
    clear();
}

else // Odd subject numbers to condition 2
{

    setvideo('https://youtu.be/VNIkqCtRUNY');
    await("videoended");
    await(2000);
    scale("On a scale of 1 to 5, with 1 being 'Very Negative' and 5 being 'Very Positive,' please rate your current mental and emotional state.","1","5","emotional state");
    

    instruction ("Now you will be shown a set of pictures. Please press the 'S' key if the image is showing negative emotions and press nothing if the picture shows neutral emotions.");
    instruction("Please press the key as quickly and accurately as possible");
 
    for (i = 0; i < stimuli.length ; i++)
    {
       
        text("+");
        await(1000);
        clear();
        b = main.addblock("center","center",60,60);
        b.resize(40,40);
        b.setimage(stimuli[i]);
        await(2000);
        b.hideimage();
        
        var d = main.addblock(5,30,40,40); // Top-left: 5 in, 30 down. 40x40 big.
        var k = main.addblock(55,30,40,40); 
        d.preload("sad3.jpg");
        k.preload("smile_2.jpg");
        image.await("preloading_completed"); 
        
        d.resize(40,40);
        k.resize(40,40);
        d.setimage("sad3.jpg");
        k.setimage("smile_2.jpg");
        
        e = awaitkey('s,l',3000);
        log(e.RT, stimuli[i] + "RT"); // Stores the RT for each image 
        log(e.key, stimuli[i] + "key"); 
        d.hideimage();
        k.hideimage();
        main.removeblock(d);
        main.removeblock(k);
        
        if (e.type === "timeout")
        {
            text("Please, try to respond faster next time (within 2 seconds)");
            await(1000);
            clear();
            
        }
        else
        {
            await(500);
        }
        
    }
    text("End of first experiment:). Now the second experiment will start in 4 seconds");
    await(2000);
    clear();
    text("ready?");
    await(2000);
    clear();

    main.setfontsize(40);
    var i;
    var locations = [[30,30],[51,30],[30,51],[51,51]];    
    var blocks = [], r, stimulus=[], e, hits = 0, false_alarms = 0, stimuli2=[];
    trials = shuffle([1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 2,2,2,2,2]);
    yes = addblock(44,90,12,7,"green","yes");
    var NegativeWords =["anxiety","attack","bomb","coma","grave","slave","racism","injury","jail","death"];
    var NeutralWords= ["bone", "cactus","door","risk","room", "pants", "ticket","plot","east","desk"];
    stimuli2 = stimuli2.concat(NegativeWords,NeutralWords);
    stimuli2 = shuffle(stimuli2);
    
    main.setfontsize(60);
    text("pres the 'tap' button as soon as you see a negative word, but never when you see a neutral word.");
    yes.text("ok");
    yes.await('click');

    text("Please press the key as quickly and accurately as possible, within 1500 ms");
    yes.text("ok");
    yes.await('click');
    clear();


    for (i = 0; i < locations.length; i++) 
    { // block with and height is 19%
    blocks.push(addblock(locations[i][0],locations[i][1],19,19,'aliceblue').text('#',300)); // #of  size 300%
    }
    
    for (i = 0; i < trials.length; i++) 
    {
    yes.text("tap");
    await(1000 + random(500));
    stimulus = trials[i] === 1? NegativeWords[i] :NeutralWords[i]; // 75:25 chance of P or R
    r = randint(0,3); // Which block?

    blocks[r].text(stimuli2[i],200);
    
     e = yes.await('click',1500);
     log(e.RT, stimuli2[i] + "RT"); 

    await(1000);
    blocks[r].text('#',300);

        
    }
    for (i = 0; i < blocks.length; i++) // Remove ('destroy') all blocks
    {
    blocks[i].destroy();
        
    }
    text("In this experiment, we explored the influence of emotional video content on your ability to detect emotional faces and emotional words in comparison to neutral video content. We assessed this by analyzing your reaction time and accuracy.");
    yes.text("ok");
    yes.await('click');
    await(2000);
    text("thanks for your participation!");
    yes.text("ok");
    yes.await('click');
    yes.text("Exit");
    yes.await('click');
    yes.destroy();
    clear();

}

Data inspection is forthcoming!

In the mean time, authors may download their own data and make it available as an Excel file. Check out the 'Stimuli and Files' tab.

Click on a category to view the stimuli and files

You can download the files shown here by clicking on the file names or image. Note that you cannot link directly to the images, sounds, videos, etc. shown here from other web pages; the link will go stale in about one hour and will no longer work after that.

You can download the files shown here by clicking on the file names or image. Note that you cannot link directly to the images, sounds, videos, etc. shown here from other web pages; the link will go stale in about one hour and will no longer work after that.

This experiment has no video links

You can download the files shown here by clicking on the file names or image. Note that you cannot link directly to the images, sounds, videos, etc. shown here from other web pages; the link will go stale in about one hour and will no longer work after that.

Related Experiments