agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola
. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet
. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://22.214.171.124/
Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya
yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola
Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online
. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online
yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya
& resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online
pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercaya
yang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games
Welcome to the forum!
Yes, you can certainly create your experiment by using OpenSesame.
If I understand correctly, your trial sequence is as follows:
For the display presentation (the first two steps), you will need some Python inline code. In order to achieve this, you simply append an inline_code item to your trial sequence and put the appropriate code (see below) in the 'Run phase' tab.
To implement the third step (i.e. the response collection), there are two possibilities:
Finally, to log all your variables, simply append a logger item to your trial sequence.
The following Python inline code should give you an idea of how to implement the first three steps. Of course, this is just an illustration and you will probably have to adapt the script to the specific properties of your experiment.
For more information about display presentation with Python inline code, see:
I hope this will get you started! Don't hesitate to ask any further questions!
Did you like my answer? Feel free to
First of all, best wishes for the new year, and thanks for your quick reply!
Due to the holidays and a brief vacation, I was unable to reply to your post any sooner, so my apologies for that
I managed to implement the Python inline code you mentioned above, but I'm struggling with the fourth step (i.e. data logging). I added a logger to the trial sequence, but the log file only shows 0's or NA as output (see image below).
My guess is that this has something to do with declaring the variables, since the xStim, yStim and xMouseClick, yMouseclick variables (which are all set with the exp.set command) don't show up in the log file. Am I doing something wrong or am I missing something really obvious here?
A happy new year to you too!
Glad to hear that the experiment is almost working.
With regard to your log file, could it be that you placed the logger item somewhere else than at the end of your trial sequence? For example before rather than after the inline_script item, or somewhere 'higher up' in the experimental hierarchy? Typically, the overview of your experiment should look something like this:
I think it's highly unlikely that the problem is caused by the way the variables are set in the inline script. After setting a variable like so:
'my_var' will be logged (provided that the "Automatically detect and log all variables" box in the logger item is ticked).
If your logger item is placed correctly and the problem remains, could you perhaps provide us with some more information about your experiment? For example by giving a screenshot of your overview area or by uploading the experiment? Then I'm sure we can figure it out!
For more information about logging variables, see also here:
Did you like my answer? Feel free to
Okay I feel somewhat stupid now... Instead of placing the logger at the end of the experiment, I placed it at the beginning! I remember trying to change the order of the items in the command line but I must have forgotten to press the apply button afterwards...
Thanks again for the quick reply, if I have any problems in the future, I'll let you know!
Using the Python inline code mentioned above as a basis, I managed to create a basic multiple object tracking experiment in OpenSesame.
In addition to basic M.O.T. task variables such as speed, rotation and number of targets/distractors, I wish to implement another variable.
The idea is that subjects have to move a box (including the moving targets and distractors) across all four corners of the screen, while keeping track of the targets inside the same box. Subjects control or initiate these movements preferably by clicking a corresponding corner of the screen.
These self-initiated 'box-movements' have to be stored in some way and initiated autonomously during the second part of the experiment. This way, I will be able to compare both the effects on tracking accuracy of self-initiated changes in perspective and autonomously-initiated changes in perspective.
The video below shows a (rough) idea of what I'm planning to build.
I was wandering if this is possible to program in OpenSesame?
Cheers & thanks!
That should be possible, but perhaps you could specify in a bit more detail what you want to do.
Do you want the participant to see a mouse cursor, and when they click on some part of the screen, the box with the moving stimuli moves smoothly to that location? Or should the box jump in one go? Or should the box be tied to the mouse position, so that it moves along whenever you make move the mouse cursor (no click needed, and no cursor visible)? (Personally, I like the last option best, but it depends on your question of course.)
Thanks for your quick reply! Preferably, the box should be moving smoothly in a straight path towards one of the four edges of the screen whenever the subject clicks on a corresponding edge (i.e. top, left, bottom, right).
The reason why I wish to restrict this movement, is to ensure the experiment is more or less standardized. If the box-movement is directly linked to any movement of the cursor, it can be quite difficult to compare inter-individual test results, since the actual amount of self-initiated box-movement might vary from subject to subject. Therefore, the subjects are all given the same instructions in which they are asked to initiate a series of specific box-movements.
Below is the code I have so far (once again, thanks to Lotje for helping me out here!).
I used two reference variables (i.e. xref and yref) to create a 'virtual' box surrounding the stimuli. The canvas size is set to 1024x768 pixels and the stimuli are drawn in a box of 480 by 360 pixels. By setting xref=272 and yref=204, I managed to align the box to the center of the canvas. In order to initiate a box movement, these two variables should be mouse-cursor-dependent, but unfortunately I'm not quite sure how to implement this. In addition, I would like to change the color of the box (or draw some sort of bounding box surrounding the stimuli), to see if subjects perform better on a more scene based tracking task.
Cheers & thanks!
This is starting to become a fairly complex script! But it should work. Essentially, the script either plays back a previously remember trajectory, or records the current trajectory. It assumes that there is a variable called replay, which is either 0 or 1 and indicates whether a specific trial is a replay or a record trial. To move the window, you click on a screen edge.
Of course, there quite a lot of things you may to change in this script, such as where the participants need to click to trigger a movement, etc. If you read carefully through the code and the comments, and play around with it for a bit, you will probably come a long way.
Also, at the start of your experiment (so just once, not at the start of every trial), you should declare a global empty list to store all the trajectories in:
global trajectories trajectories = 
Once again, thanks for the quick reply, I really appreciate all the time and effort you're putting into answering my questions!
I am eager to run the new script you posted above, but unfortunately I keep getting a tuple error message in line 7 (see image below). Could it be that this has something to do with me using the Mac OS version of OpenSesame? Or are there any comma's or indents missing in the code?
Cheers & thanks,
Ah right, it's this line:
w, h = exp.resolution()
resolution used to be a variable (a tuple to be exact), but since 0.27 it's a method.
Perhaps it's best to specify a resolution directly, to avoid trouble when switching between 0.26 and 0.27.
w, h = 1024, 768 # This should match the resolution specified in the experiment!
I just want to add that if you don't want your code to be specific to only one screen resolution, you could also use the built-in variables exp.width and exp.height, like so:
Did you like my answer? Feel free to
It took some effort and a lot of very frustrating error messages, but I finally managed to implement your code! I think the majority of error messages (mostly missing or even 'invisible' indents, or strange syntax errors such as 'import random' that is somehow read as 'mport random') are caused by the mac osx version of opensesame, since I experienced less error messages on a windows pc.
I've added a couple of empty global lists and used loop elements to create different sequences of just movement or just replay, or a combination of those two. The result can be viewed here. The experiment is still in 'beta', since I will probably make some alterations in speed, diameter etc. I will also try to fine-tune the output a bit, since the response and target stimuli have to be linked manually (which takes a lot of time).
Once again, thanks a lot for helping me out here, I honestly couldn't have done it without your help!
As I mentioned in my previous post, I'm currently trying to fine-tune the output of my experiment in order to make the data a little less 'labor intensive' to process. Unfortunately, I keep getting a lot of error messages similar to those I mentioned above so I'm not able to save nor run my new script. Tomorrow I'll give it another try on a windows pc to see if the problem still persists.
What I'm trying to do here is not only to set a fixed number of targets, but also a fixed set of targets. Since the script now randomly picks 2 targets amongst all stimuli, the identity of the targets changes: sometimes stim1 and stim4 are labeled as targets, while in another run stim3 and stim2 are labeled as targets.
Preferably, stim1 and stim2 should always be labeled as targets. This way, I can limit the logger file to 8 output variables (xmouseclick1, xstim1, ymouseclick1, ystim1, xmouseclick2, xstim2 etc.) which makes it much easier to determine whether the targets are tracked correctly or not.
My Idea was to set a rule with the exp.set command which separates targets from distractors:
Should this fail, my plan B was to create a second list of stimuli (i.e. the targets), which are moving simultaneously with the stimuli from the original set of stimuli (i.e. the distractors).
Is any of these approaches going to work or is there perhaps a much easier way to achieve the same result?
Cheers & thanks!
That's probably a good idea, yes.
Perhaps I misunderstand, but that's already the case! The relevant bit of the script is this:
So the first
NTargetstimuli are targets. You could therefore restrict logging to the first
Ntargetstimuli. I would generally recommend logging everything though, because you never know what you might be interested in later.
As always, thanks for the quick reply! I guess I must have mismatched the targets and mouse clicks in the output because I repeated the script several times with very small targets (making them easier to track and separate) and in fact, you are right: Stim1 and Stim2 are indeed always the targets (which of course makes perfect sense since for both targets i < NTarget is the case)
However, it is stilll very hard to determine from the output if a target is correctly tracked or not. I ran several test trials and there seems to be a rather strange and inconsistent flaw in the output (which probably caused my earlier mismatches).
The image below shows the output of a series of trials (which can be viewed here) in which the subject tracks 2, 1, none and 2 targets correctly. After dividing the coordinates from the stimuli by 10^6 (I'm not sure why this is necessary, but I guess this has something to do with the variable "stimProperties" being stored in "micropixels" rather than pixels.. this will probably sound stupid to you but then again, I'm still an opensesame newby so... xD) one would conclude that during the 2nd trial, none of the targets were tracked successfully, since the y-coordinates recorded from both mouse-clicks don't match with those from any of the two targets. The subject did however track one target correctly (i.e. stim1), as can be seen in the screencast.
The same goes for the 3rd trial, except here the subject 'successfully' tracks two distractors, whereas only 1 distractor can be verified based on the data.
edit: I ran a couple more trials and managed to reproduce the error in the output of both x and y coordinates of the stimuli
Do you have any idea what the cause of this problem can be?
Cheers & thanks
I'm fairly sure that the stimulus positions and mouse clicks are stored accurately. I'm not sure what went wrong here. The fact that you have divided the coordinates by 1 million is worrying, because that is certainly not necessary! The coordinates are simply in displays pixels.
What comes to mind is that the columns got mixed up during the analysis. Could that be it? Also, as a debugging tool you can insert a feedback item to the end of the trial sequence and use this to show some variables, such as
[xStim1], etc. That might help you figure out exactly what goes wrong here.
According to the feedback item, there should be nothing wrong with the output at all. After importing the .csv file in excel however, the 'punctuation' of the data somehow gets messed up; 10.7645 for instance, is displayed as 107.645. The .csv file looks fine though when viewed in a web browser or mac osx' quick look option, so it's definitely not an opensesame problem. Of course I should have checked this first before writing my previous post, sorry about that
Okay, so finally I've got my experiment up and running and approved by my professor, only a few small details are still missing...
I'm currently working on the first three sequences, which will function as test-trials. After the third test trial, the subject has to confirm he or she understood the instructions by clicking on either a confirmation button, or a 'disagree' button which restarts the test-trial sequence. The button widget from the forms plugin should do the trick, but I can't find a way to install it on my mac (which is running .26). Is this plug-in perhaps a build-in feature of .27? (In that case, I'm going to wake my old windows machine after four years of 'hibernation', since os and mac aren't the best friends yet xD )
I was also wandering if I could implement some sort of 'warning message', giving the subject another try should he or she mistakenly click on an empty area of the canvas. I tried this by implementing the following inline code right after the part of the response collection section were the cursor position is made relative to the window:
Unfortunately, I keep getting a syntax error. I'm also thinking about a way to give feedback to the subjects about the number of correctly tracked objects (I'm not sure if this is necessary for all trials, perhaps only during the first three trials). Is it possible to somehow 'reveal' the targets after each trial, and presenting a score (ranging from 0 to NTargets) at the same time?
Cheers & thanks!
Yes indeed, the form plug-ins require at least OpenSesame 0.27.
The problem here is that you're mixing OpenSesame script with Python script. This line ...
draw textline -200 -200 "The selected area is empty, please select a target" center=0 color=white font_family=mono font_size=18 show_if="always"
... is how the elements of a sketchpad item are defined. This is not a real programming language, but a simple definitional syntax called OpenSesame script. In contrast, the inline_script item requires that you use Python, which is a real programming language and a different beast altogether. For an explanation of OpenSesame script (and the difference with Python), see:
There are some other things that will not work, such as the use of
==to make a comparison, and the assumption that participants will click exactly on the stimulus center instead of checking whether the response falls within a certain area around the stimulus center.
I don't want to sound negative: I think it's a very good idea to try to make this relatively small modification yourself. But you should familiarize yourself with the basics of Python first! For some good tutorials, see:
Thanks for your reply! I took your advice and read some tutorials. Of course I should have done this first before putting my bets on the forum again (sorry about that) but I got somewhat frustrated about all the errors I got on my mac. Fortunately, I got my old windows machine up and running again and I haven't got any of the indent or syntax errors, so far so good!
I managed to print some text on the canvas to instruct the subjects where to click during the trials to move the bounding box with the following inline code.
The next step was to implement the warning message. I tried this by setting up several comparisons:
Followed by an else statement stating:
I tried to alter the Clickmargin from 5 (i.e. the radius of the stimuli) to 25, but none of these margins result in a warning message displayed on the canvas when a mouseclick is initiated on an empty area of the canvas.
By changing the .text part into a variable writing 'empty' after every
ifstatement, I was able to see through a feedback item whether the script did anything at all. It seems that only the coordinates of every last mouse-click in sequence are recorded.
I just tried the following inline code but still no success
Am I on the wrong track or am I missing something really obvious here?
Cheers & Thanks
To actually show something on the display, you need to use the
canvas.show()function. The other functions only draw to some 'offline' canvas, which is not shown until you explicitly call the
canvas.show()function. For many examples, see:
Also, you will need to implement a way for participants to get a second chance to click. If (after a mis-click) you only present a warning and skip the logging, that opportunity to respond will be lost. Other than that, your logic to do a fuzzy comparison of the coordinates is valid, although you can make things a bit easier for yourself to use a distance measure (see below), which doesn't require as many
Below you see an example that implements more-or-less what you are trying to achieve: It will ignore all clicks that are not on a stimulus. You can improve and extend this script in many ways (for example by adding warning screens), but it should get you started.
Thanks for your reply! Your code seems a bit more logical and much cleaner. When I implement your code however, the script doesn't seem to get past the
my_mouse.get_click()line, which means
d1 < ClickMargin or d2 < ClickMarginis never true?
With the following else statement:
I tried to check whether the opposite condition (i.e. d1 > ClickMargin or d2 > ClickMargin) did occur, but it can't seem to get any response after the get.click() line?
I understand the 'while True' statement continues to 'loop' through the response collection code until one of the stimuli is clicked and until NTarget clicks are recorded. The debugger however, doesn't show any signs of response collection.
Am I missing some additional code perhaps?
The easiest way to debug your script is by using the
printstatement, which prints stuff to the debug window. That way you can print out all the variables in various stages of the script, and see where things go wrong. For example, you can print out the 'raw' mouse coordinates, the mouse coordinates relative to the window, the coordinates of the stimuli, the distance, etc. By inspecting all this information you will probably be able to tell where the problem lies.
There are two loops here. The first is a
forloop, which collects
NTargetresponses. The second is a
whileloop, which continues to collect responses for a single target until a click is close enough to a stimulus.
Nope. I tested this script and it should work.
Once again, thanks for the quick reply. The support I'm getting through this forum (even during the weekends!) is absolutely amazing!
After reading your reply I decided to copy your code by literally typing it over in the inline script, instead of copy-pasting it from notepad. And guess what?! Now everything is working just fine!
I've added another six distance equations so now the script successfully works with a total of 8 stimuli, displaying a warning message whenever an empty area of the canvas is clicked. Since I couldn't find a command other than canvas.clear() to erase the message (and the whole canvas), I simply let the script draw a black rectangle over the warning message after a stimulus is clicked, which does the trick as well
exp.setcommand I've added two variables (i.e. Target1 and Target2) to determine whether both targets are tracked correctly. Since
d1 < Clickerrormarginis true when Target1 is clicked, I've added a line right before the break which sets the variable Target1 to 1. (The same goes for d2 and Target2, Target 1 and 2 are set to 0 at the start of each trial) This actually makes it a lot easier to process the data afterwards.
As for now, all there is left is some fine-tuning of the stimulus variables (velocity, radius, shape etc..) but the script basically contains all the functionality I need for my experiment so I won't be expecting any big challenges in that. Should I however come across any additional problems (which can't be solved by reading the os or python tutorials) I'll let you know!
Cheers and thanks!
Indentation trouble, probably. Python uses indentation to deduce the structure of the code, and this can easily get mixed up when copy-pasting.
Okay, so I've made some small final adjustments to the script. I replaced the "click here" textline with a red rectangle and I've added some code to highlight the targets when clicked, which was all pretty straight-forward to implement.
I also added some code to move the window with a key-press (e.g. press "up" to move the window up and "down" to move the window down) This all works fine on OS Windows, but I can't seem to get it working on my Mac (which isn't to big of a problem though, since the pc that will be running the experiment runs on Windows)
I don't get any syntax or indent errors, It just refuses to respond correctly to any key-press. I've tested to see if any key-press was collected with the
print responsecmd, and it seems that "up" is registered as "213" and "down" as "214". So I thought simply adding an
or "213"statement would do the trick, but unfortunately not.
Do you have any ideas on what the problem might be?
Cheers & Thanks!
I used the following inline code:
In OpenSesame 0.26 and before,
get_key()returned key-codes, rather than names or characters, and you had to do an extra conversion:
This was kind of awkward, so nowadays
get_key()returns a key name/ character right away, as you would expect.
But more importantly, mind your Python logic! This ...
... does not mean whether
"213"(with quotes, so it's a
stringand not an
int), but whether
response == 'down'evaluates to
Trueand (separately), whether
True. What you actually mean is:
Okay that was a pretty obvious one.. Just when I thought I understood the basics of python, I made another 'rookie' mistake L-)
Thanks for your reply!