Hi everyone!

I am new to Psychopy and coding. I want to present stimulus in a particular format (fractions- arabic symbols and nonsymbolic using lines) using builder. Can anyone help me in this regard?

Thank you so much!

Hi everyone!

I am new to Psychopy and coding. I want to present stimulus in a particular format (fractions- arabic symbols and nonsymbolic using lines) using builder. Can anyone help me in this regard?

Thank you so much!

You should probably give us some concrete examples of what you want to present and what the subject should see.

Not sure which format you are specifically looking for, but you can pass the text as a string by putting ’ ’ around the text. Like, `'1/6'`

2 Likes

Thank you so much!

I have attached some examples of what I want to present. Please check the attached file.Stimuli.xlsx (281.4 KB)

Yes I did that. But I want 1 on 6 with a straight line not a slanting one

Thank you!

resolved for the numbers!

If anyone knows how to do vertical lines with a specific ratio, please help!

thank you!

Do you mean, you want two lines representing ratios, as in the images? Or do you want fractions as numbers, with a horizontal line (vinculum)?

hi!

I am talking about the images now. Thank you!

You need a conditions file with two columns for numerator and denominator, and they can be called `num`

and `denom`

respectively - load the conditions file into your loop handler. You then need two polygon stim as rectangles. In the routine, set the denominator shape above the numerator shape - call the shapes `denominator`

and `numerator`

. Then, set the sizes to update on every repeat. Set the denominator size as

```
(0.1*denom, 0.1) # Where my screen units are Norm units
```

Then set the numerator size as:

```
(denominator.size[0]*num/denom, 0.1) # You will calculate numerator size as a ratio of the denom size
```

Not sure what you want to do about positioning, for now they are centred.

1 Like

Thank you! I will try that!

Hi David,

Replying to your last post- How do you go about representing fractions as numbers, with a horizontal line (vinculum)?

Thank you!