Avatar

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

fladd

About

Username
fladd
Joined
Visits
48
Last Active
Roles
Member, Moderator
Thanked
7

Comments

  • Hi, You will need to set expyriment.control.defaults.audiosystem_sample_rate=16000 before the audio system is started (which by default is right when an experiment is initialized). Hence, put that line right after you imported Expyriment. Howe…
  • It indeed sounds like a mismatch in sampling rate between your sound file and the audio system. However, there is no such thing as "Backend Settings" or "Sampler" in Expyriment. There are two ways to fix this: * Change the sample rate of you…
  • Hi there, why don't you just call the keyboard wait method with the argument wait_for_keyup=False? Have a look at the documentation for more details: http://docs.expyriment.org/expyriment.io.Keyboard.html#expyriment.io.Keyboard.wait
  • Not sure if I understand you correctly, but wouldn't this work: def create_random_stim(): sequence = ["R"] * 27 + ["B"] expyriment.design.randomize.shuffle_list(sequence) return expyriment.stimuli.TextLine("".join(sequence)) stim1 = …
    in Prensent Stimuli Comment by fladd June 3
  • What I meant is, you put in the data manually into the data file object (usually by doing something like exp.data.add(my_data). So, since you already have the data, before you manually put it into the data file object, there is no way to get the dat…
  • Thanks for pointing me to our old changelog! I entirely forgot that we fixed this before. I was trying to fix this issue for a while now and had not clue what the issue is. I now looked up the old code and while the issue was not the same back then,…
  • Well, you have the data yourself, before you write them to the file, right? :-)
  • I am not entirely sure I understand you correctly. The getter returns the actual object itself, not the location of it. The data object is an object that is writing data to a file.
  • Hi Dror, Pygame (and hence Expyriment) is not touchscreen aware. It only knows a mouse. Usually a single touch is emulated as a mouse click (this is at least the case on Android). On your device this is apparently not the case. I assume your touc…
  • You will need to import the expyriment package, in order to use it in Python. I think at this point this forum thread might not be the best way for you to proceed. I get the impression that you might benefit more from first strengthening your gen…
  • Line 171 misses a closing parenthesis.
  • yes. florian@expyriment.org
  • I am afraid that due to automatic formatting in the forum, a lot of information is lost. You can embedd code here in the forum within three backticks on either side (Markdown syntax). Alternatively, you can upload your code to gist.github.com.
  • All of them? That is very strange. It is in general very difficult to judge errors without seeing the entire script. Could you provide the entire script?
  • Well, yes, of course. An integer is a built in Python data type representing a number, not an Expyriment stimulus. You first need to create a stimulus. Please see my example above.
  • Then I don't understand what the problem is. This should just work: mask = expyriment.stimuli.TextLine("#") target = expyriment.stimuli.Picture("...") mask.plot(target)
  • I thought prime is a stimulus you want to show on the screen?
  • Then prime is not of any of the Expyriment (visual) stimulus types.
  • plot will work with all visual stimuli
  • Prepare the following stimuli before stimulus presentation: * mask = expyriment.stimuli.Picture("...") * prime = expyriment.stimuli.Picture("...") * target = expyriment.stimuli.Picture("...") As well as: * prime_on_target = target.co…
  • It is not clear to me what your goal is. I understand that your code apparently does not do what you want it to do, but I don't understand what it is you want it to do. You first mentioned that each trial consists of 4 stimuli, but you present 6 …
  • Given the refresh rate of 60Hz, here is what your script does in case SOA is 50: * it presents the screen_mask stimulus for 3 frames (50 ms) * it presents the prime_screen stimulus for 3 frames (50 ms) * it presents the screen_pic_prime stimu…
  • Dear Arianna, What is your screen refresh rate? I am asking, because you use timings (49ms) that do not seem to fall at multiples of common refresh rates (e.g. 60Hz, 100Hz, 120Hz). From what I understand, you script does the following if SOA i…
  • Hi, not directly in Expyriment. But you could probably attempt to manipulate the surface of the stimulus (which is a Pygame surface). I would, however, suggest to not do this, as it might break some Expyriment internal things for that stimulus. …
  • Hi, sound1.play() exp.clock.wait(500) sound2.play() But hardware samples is much better. Concerning the second question: TextBox stimulus will handle multiple lines (with "\n").
  • Mmh, I am still a bit puzzled about why this happens. We will look closer into it. Thanks for the suggestion of a tutorial for more advanced users. This is certainly a good idea.
  • Dear Kolao, you can simply create two Audio objects, and then call the play method of each of them 100 ms apart. However, please keep in mind that auditory timing on a computer is not very accurate (with latencies of several hundreds of a second …
  • Hi, could you send me the script that crashes?
  • Mmh, I have never seen this before. Very strange. What graphics card was that? Might also be helpful to get the output of expyriment.misc.get_system_info() for further inspection.
  • This seems to be a bug. Thanks for reporting it. It is not entirely clear why this happens, as mkstemp on my machine does correctly return a string with escaped backslashes. We will look into it. In the meantime, could you give us some more infor…