Tidying an if.. then statement in E-Prime script for attention capture paradigm

Chloe chloebooth86 at googlemail.com
Thu May 13 22:05:02 UTC 2010


Hi there,
I’m having some problems with scripting an If, then clause in my
program. I’ve edited an emotional capture paradigm in which people
view 3 faces on the screen, one face has blue eyes (the target) and
the other two faces have brown eye (the distractors). When
participants find the blue eyed face, they must respond with what
direction the face is tilted in (left or right). On 2/3 trials, all
faces have a neutral emo expression. However, on 1/3 trials, one face
will show a discrepant emotion (either happy or sad) and this
discrepant emotion can appear on either the target face or on the
distractor faces. The emotion is always irrelevant to the task (find
blue eyes).

I use four face identities in this task, and the pictures are edited
so each face has blue eyes and brown eyes. So, for example, I have a
picture of ID1 with blue eyes and a picture of ID1 with brown eyes.
Also, the faces can appear in Left or Right orientation. So, the
picture files I have are listed in program as thus:
LBluNeut(1) = "M1_Bl_L_Neut.bmp"
LBluNeut(2) = "M2_Bl_L_Neut.bmp"
LBluNeut(3) = "F1_Bl_L_Neut.bmp"
LBluNeut(4) = "f2_Bl_L_Neut.bmp"

RBluNeut(1) = "M1_Bl_R_Neut.bmp"
RBluNeut(2) = "M2_Bl_R_Neut.bmp"
RBluNeut(3) = "F1_Bl_R_Neut.bmp"
RBluNeut(4) = "F2_Bl_R_Neut.bmp"

LBluHap(1) = "M1_Bl_L_Hap.bmp"
LBluHap(2) = "M2_Bl_L_Hap.bmp"
LBluHap(3) = "F1_Bl_L_Hap.bmp"
LBluHap(4) = "F2_Bl_L_Hap.bmp"

RBluHap(1) = "M1_Bl_R_Hap.bmp"
RBluHap(2) = "M2_Bl_R_Hap.bmp"
RBluHap(3) = "F1_Bl_R_Hap.bmp"
RBluHap(4) = "F2_Bl_R_Hap.bmp"

LBluSad(1) = "M1_Bl_L_Sad.bmp"
LBluSad(2) = "M2_Bl_L_Sad.bmp"
LBluSad(3) = "F1_Bl_L_Sad.bmp"
LBluSad(4) = "F2_Bl_L_Sad.bmp"

Etc… and repeated for all the brown eyes.

I then have this code:

'position objects
'dim nIndex as integer

for fill_loop = 1 to 3          ‘POSITION OF DISPLAY ITEMS
 pos(fill_loop) = fill_loop
next fill_loop

for fill_loop = 1 to 4   'WHICH BROWN EYE (DISTRACTOR) FACE
 bro_eye(fill_loop) = fill_loop
next fill_loop


'MAKE TARGET NOT SAME AS TARGET ON TRIAL n - 1
do
 curr_tar = random(1,4)
loop while (curr_tar = prev_tar)
‘MAKE DISTRACTOR NOT SAME AS DISTRACTOR ON TRIAL n - 1
do
 RandomizeArray bro_eye, 1, 4
loop while (bro_eye(1) = prev_dis)
prev_tar = curr_tar
prev_dis = bro_eye(1)

/
*=========================================================================
''''Choose target face (blue eyes) as first item in list face
=========================================================================*/

select case c.getattrib("Target_Emotion")
case "neutral"

 select case c.getattrib("T_Orient")    'READ TARGET FROM TABLE
 case "left"
  c.setattrib"rc","m"    'SET RESPONSE
  stim(1) = LBluNeut(curr_tar)
 case "right"
  c.setattrib"rc","k"     'SET RESPONSE
  stim(1) = RBluNeut(curr_tar)
 end select

case "happy"
 select case c.getattrib("T_Orient")
 case "left"
  c.setattrib"rc","m"
  stim(1) = LBluHap(curr_tar)
 case "right"
  c.setattrib"rc","k"
  stim(1) = RBluHap(curr_tar)
 end select


case "sad"
 select case c.getattrib("T_Orient")
 case "left"
  c.setattrib"rc","m"
  stim(1) = LBluSad(curr_tar)
 case "right"
  c.setattrib"rc","k"
  stim(1) = RBluSad(curr_tar)
 end select
end select

/
*============================================================================*/
/
*=========================================================================
''''Choose brown eyes face for 2nd item in list - CAN be emotional
=========================================================================*/

select case c.getattrib("Distractor_Emotion")
case "neutral"

 select case c.getattrib("D1_Orient")    'READ DISTRACTOR 1
ORIENTATION CONDITION FROM TABLE
 case "left"
  stim(2) = LBroNeut(bro_eye(1))
 case "right"
  stim(2) = RBroNeut(bro_eye(1))
 end select

case "happy"
 select case c.getattrib("D1_Orient")
 case "left"
  stim(2) = LBroHap(bro_eye(1))
 case "right"
  stim(2) = RBroHap(bro_eye(1))
 end select


case "sad"
 select case c.getattrib("D1_Orient")
 case "left"
  stim(2) = LBroSad(bro_eye(1))
 case "right"
  stim(2) = RBroSad(bro_eye(1))
 end select
end select

/
*==============================================================================
''''Choose second brown eye face as distractor item - never the
emotional one.
===============================================================================*/

select case c.getattrib("D2_Orient")
 case "left"
  stim(3) = LBroNeut(bro_eye(2))
 case "right"
  stim(3) = RBroNeut(bro_eye(2))
 end select

/
*============================================================================*/

RandomizeArray pos, 1, 3


/*Assign filenames to locations in slide*/

c.setattrib "e1", stim(pos(1))
c.setattrib "e2", stim(pos(2))
c.setattrib "e3", stim(pos(3))


strImageFile = c.GetAttrib("e1")
 LoadSlideImageFile search.States(search.ActiveState), "image1",
strImageFile
 strImageFile = c.GetAttrib("e2")
 LoadSlideImageFile search.States(search.ActiveState), "image2",
strImageFile
 strImageFile = c.GetAttrib("e3")
 LoadSlideImageFile search.States(search.ActiveState), "image3",
strImageFile


Okay, so the problem is, I need to insert a clause so that if the
target being shown is a picture of person1/ID1 with blue eyes, then
none of the distractors show ID1 with brown eyes. So something like:

If curr_tarr = LBluNeut(1) or RBluNeut(1) or LBluSad(1) or RBluSad(1)
or LBluHap(1) or RBluHap(1)
then distractors can’t be LBroNeut(1) or RBroNeut(1) or LBroSad(1) or
RBroSad(1) or LBroHap(1) or RBroHap(1)
or if curr_tar = LBluNeut(2) or RBluNeut(2) or LBluSad(2) or
RBluSad(2) or LBluHap(2) or RBluHap(2)
then distractors can’t be LBroNeut(2) or RBroNeut(2) or LBroSad(2) or
RBroSad(2) or LBroHap(2) or RBroHap(2)

etc. for all four IDs. But 1) this doesn’t work! And 2) there must be
a simpler way of doing this?!

Please help!

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.



More information about the Eprime mailing list