Forum
Register Calendar Latest Topics
 
 
 


Reply
  Author   Comment   Page 3 of 5      Prev   1   2   3   4   5   Next
ryklin

Administrator
Registered:
Posts: 237
Reply with quote  #51 
No it is relative to the final beta release version 1.0.83

The previous beta was version 1.0.79. 

The difference is that I have fixed a bug that caused a crash in v79, but that fix is not ideal in terms of the data quality.

Namely, there are artifacts introduced during the time when the screen is not touched. These artifacts appear as -181 values in the data stream. I programmatically insert these values (see mlvideo.m). This value was chosen because it is clearly outside the visual range (I chose this value almost arbitrarily, we can discuss what this value should in fact be, perhaps 361 is a better value, though -91 or -1 would presumably also be sufficient. Keep in mind that we are working with a spherical coordinate system using Cartesian values. I am aware that the visual range varies across species. There was an interesting discussion on this subject recently in the visionlist forum. If you have a copy of Clinical Perimetry by Traquair, there are some statistics discussed there). 

Anyway, please don't use anything after 1.0.83 until further notice.
0
ryklin

Administrator
Registered:
Posts: 237
Reply with quote  #52 
Hi Everyone,

I have just published another ML beta release. Please review/update yourself by following this link.

https://github.com/ryklin/MonkeyLogic_stable/releases/tag/v1.0.91

Thanks!

0
ryklin

Administrator
Registered:
Posts: 237
Reply with quote  #53 
Hi Everyone,

I have just published a final version to the Touchscreen update. You can download it here:

https://github.com/ryklin/MonkeyLogic_stable/releases/tag/v1.0.97

Please let us know if you find any bugs.

0
stremblay

Member
Registered:
Posts: 65
Reply with quote  #54 
Great!

We are testing it now and letting you know about it asap.

Best,
0
ctestard

Junior Member
Registered:
Posts: 20
Reply with quote  #55 
Hello Ryklin,

I was just testing the latest version and I am not sure what function to use to get the touchscreen input, instead of eyejoytrack. I haven't seen anything new in your sample tasks or on your website. Could you indicate which function to use and how? 

Thank you!
Camille
0
ryklin

Administrator
Registered:
Posts: 237
Reply with quote  #56 
Hi,

Thanks for pointing this out. We will update the monkeylogic.net website with the full documentation ASAP. Since this version is not an officially sanctioned release yet, we will have to rely upon this forum to disseminate information.

I have included 3 categories of samples with the ML distribution:
1) Eyetracking
2) Joystick
3) Touchscreen

All three work almost in the same way; feature the same function calls and tracking behavior. So by comparing the three you can see what difference exist between them. I will highlight the most important ones here.

1) ontarget = eyejoytrack, is still the way to test for the current response to a stimulus, however there are now 2 new parameters. I am enumerating them all below.

a) acquirefix (eyetracker)
b) holdfix (eyetracker)
c) acquiretarget (joystick)
d) holdtarget (joystick)
e) touchtarget (touchscreen)
f) releasetarget (touchscreen)


2) [x y] = eye_position() was used to retrieve analog input for horizontal and vertical positions. For touchscreen data use [x y] = touch_position() instead. The latter will retrieve data from the USB digital data stream (assuming it is mapped). In the future, we may replace/override these functions with different names/parameters. For now, eye_position() should be used for any analog data, including joystick.

Note: there is also a function called get_analog_data(controllerName, DaqInfo, EyeTransform, JoyTransform), where controllerName can be 'eye', 'joy', or 'tou', but I don't recommend using it because it was meant for internal (private) use only. If you come across it, just ignore it. If you do tinker with it, keep in mind that there is no TouchTransform at the end of the parameter list (the function signature), because touch screen data are not transformable by design.

I believe that this is all that users need to know for writing timing files.

0
ctestard

Junior Member
Registered:
Posts: 20
Reply with quote  #57 
Hey Ryklin,

We noticed a bug in the latest version.

When pausing the task by pressing Esc, there is a crash. The error log is at the end of this message.

We traced back the error to the interpolation you carry out in "touchscreen_dataclean.m".
When you hit Esc, or do not respond at all to a trial, there is no touch data (apart from -180s) in the input vector to dataclean. Thus, the interpolation process returns an error saying there needs to be at least 2 datapoints for an interpolation.

We commented out lin 2600 & 2599 in trialholder.m to avoid this crash for now.

% ex = touchscreen_dataclean(ex);
% ey = touchscreen_dataclean(ey);

We hope you can find a better solution.

Thanks!


****************************************************************

Error using griddedInterpolant

Interpolation requires at least two sample points in each dimension.

 

Error in interp1 (line 191)

        F = griddedInterpolant(X,V,method);

 

Error in touchscreen_dataclean (line 6)

cleaned_data = interp1(find(data_stream~=-180),data_stream(data_stream~=-180), 1:length(data_stream),'nearest','extrap');

 

Error in Cue_reversal_circle_runtime>end_trial (line 2338)

    ex = touchscreen_dataclean(ex);

 

Error in Cue_reversal_circle_runtime (line 131)

TrialData = end_trial;

 

Error in monkeylogic (line 1116)

        TrialData = feval(timingfile, TaskObject, ScreenInfo, DaqInfo, MLConfig.EyeTransform, MLConfig.JoyTransform, BehavioralCodes, TrialRecord, trialtype);

 

Error in mlmenu (line 2319)

                monkeylogic(condfile, datafile, testflag);

0
ryklin

Administrator
Registered:
Posts: 237
Reply with quote  #58 
Okay thanks for reporting.
0
ryklin

Administrator
Registered:
Posts: 237
Reply with quote  #59 
It would be useful for the community to know the make and model of your touchscreens.
0
ctestard

Junior Member
Registered:
Posts: 20
Reply with quote  #60 
Hi Ryklin,

Although I doubt this has anything to do with my specific model of touchscreen rather than the ML code, here is my model information:

ELO Touch 1937L Accutouch.

Don't you have the same error if you don't respond to the first trial using your touchscreen?
0
ryklin

Administrator
Registered:
Posts: 237
Reply with quote  #61 
I wasn't suggesting that your specific touchscreen was to blame. However, I am trying to narrow down the possibilities. To answer your questions, No I don't have that error, if I did I would have certainly fixed it before release or at least mentioned it in the release notes.

Also, we would like to compile a list of all the various touchscreens that have been tested with so that future users could have a head start when setting up a new system. If we were to discover that certain screens were "incompatible" it would be great for everyone to know. 

I think that this particular error can be fixed by adding some conditions in software -- but I need to reproduce it first to be certain.
0
ryklin

Administrator
Registered:
Posts: 237
Reply with quote  #62 
Hi Everyone,

I have posted an update to fix the error reported regarding the griddedInterpolant error when samples are less than 2 (conversation #57)

You can download and test it here:

https://github.com/ryklin/MonkeyLogic_stable/releases/tag/v1.1.0

please let us know your results.

Thanks!
-Edward

PS from now I will be posting news of new releases and updates on a different thread: 
MonkeyLogic > Forums > News

I will try to keep both threads active, but eventually we should transition to a more general category so that all users are aware when updates are released.

PPS The next release coming this week will allow you to map a mouse in addition to a touchscreen.


0
ryklin

Administrator
Registered:
Posts: 237
Reply with quote  #63 
Hi Folks,

I have posted a new release that has lots of bugs fixed and adds mouse interaction.

https://github.com/ryklin/MonkeyLogic_stable/releases/tag/v1.1.4

0
ctestard

Junior Member
Registered:
Posts: 20
Reply with quote  #64 
HI Ryklin,

Regarding your post #62, I have run some test and found that the "if length(data_stream) > 2" you added doesnt really help, since the -180 also count in the length of this vector. Something like "length(find(data_stream~=-180)) > 2" sounds more useful.

Regarding the logging of the touch coordinates, I've got a couple of questions:
1: Are the touch coordinates of a touch reaching a target defined by eyejoytrack saved? To me it doesnt seem so. It seems only those not made to eyejoytrack objects are saved.
2: What is the purpose of the interpolation in touchscreen_dataclean? Why not just remove the -180?
3: Are there any timestamps saved for each touches?

Thanks a lot for your answers!

0
ryklin

Administrator
Registered:
Posts: 237
Reply with quote  #65 
okay, thanks for your input, I didn't think about the -180. I'm updating my code with your suggestion. 

1: Yes I believe all touch coordinates are being saved, but I will check those times when eyejoytrack is active.
2: Well, first let me explain the -180. Unlike a mouse, which always has a coordinate, the touchscreen can be released. During the release period you must insert some value into the data stream, so i chose -180 because it's outside the visual field. You can not just remove the -180, because if you do you will compact the datastream and make it shorter than it really was. Remember the number of samples in the datastream indicate the length of the trial, so in answer to question 3) no the samples are not timestamped. You can not place zero values in the datastream either, if you do then you can not a) distinguish between a touch to the 0,0 location and a release. Also, all the release moments will appear a "jumps" in the datastream to the 0,0 location. So, instead what I have done is a)not plot -180 values during the trial (they are just hidden), then at the end of trial (during the ITI) I post process the data stream by replacing -180 values with a previous non -180 value. This is not the best solution however, but it does make the data appear as if during a release the touch location has not changed. The problem with this approach however is that the hold time indicated in data file is incorrect - it's longer. So we probably need an altogether better solution. 
0
stremblay

Member
Registered:
Posts: 65
Reply with quote  #66 
Hi Ryklin,

We noticed something strange with the way Monkeylogic handles touchscreen coordinates. 

We noticed that, on some trials, and in a variety of tasks, the last coordinate recorded from the last trial "leaks" into the next trial, and is registered as the first coordinate of that trial.

We confirmed that in several ways, the easiest one being to look at the saved vectors of touch in the BHV file -Analogdata. You will notice that, in some trials, (about 1/20), the first coordinate of the vector is exactly the same as the last coordinate of the vector from the previous trial.

That being said, this small bug rarely produces anything consequential. However, depending on the design of the task, this single coordinate leak can have serious effects, such as registering a touch to a distractor, which the monkey never actually did. What the monkey did, was touching a target at the same position on the previous trial.

We would like your help to try to narrow down this issue. It would be useful to know, for example, how are the coordinates from the previous trials are cleared.
We are using ML 1.0.97 with Matlab 2013b. 

Thanks for your help
0
ryklin

Administrator
Registered:
Posts: 237
Reply with quote  #67 
Thanks I will take a look at this. I'm wondering if this occurs when you comment out touchscreen_dataclean.m, Hopefully I'll be able to reproduce this.
0
stremblay

Member
Registered:
Posts: 65
Reply with quote  #68 
Hi Ryklin,

This also happens without commenting out touchscreen_dataclean.

Please let me know if you find anything.

Best,
0
stremblay

Member
Registered:
Posts: 65
Reply with quote  #69 
Hey Ryklin,

Have you managed to replicate this bug? 

I have tried debugging it, with no success.

Please let me know if you find anything.

Best,
0
ryklin

Administrator
Registered:
Posts: 237
Reply with quote  #70 
Hi,

Sorry I haven't been able to reproduce the problem. I did a thorough set of tests I believe. 

I created a two alternative free choice task, where I alternate choosing between the left and right target from trial to trial. I did not touch anywhere else on the screen except directly over the target. I expected to see on each subsequent trial a data point from the opposite side of the screen since that's where I touched previously. I didn't see this. I used the BehavioralSummary.m program to look at data files. 

Can you give me any more clues, or provide me with a data file to inspect?

Thanks!
0
ryklin

Administrator
Registered:
Posts: 237
Reply with quote  #71 
Hi again Stremblay,

I'd like to further reply to your particular question -- "It would be useful to know, for example, how are the coordinates from the previous trials are cleared".

The coordinates are cleared in the same manner for all input devices. When adding touch screen functionality, I did not modify this. The touch screen subsystem simply works by sampling from the device, scaling into ML's coordinate system, and recording the values. 

I did go ahead and double check to make sure that the data buffer is indeed being reset. You can double check this along with me if you'd like. Here are the details below:

In trialholder.m you can do a search for 'touchdata_x = []', you should find this around line 700-710 depending on your exact version.  This is where the coordinate buffer storing touch screen data points is being reset. You will notice this happens in the section of the function eyejoytrack where fxn1 == -1, which is the initialization part called at the start of each trial. I added some code to make sure this is indeed being called on each trial and it is, so we know the values are being reset. 

If you can, please share with me your timing, conditions, data, screenshots, and any other files that you think might help further debug this. Furthermore, I did find an ancillary bug in touchscreen_dataclean.m which I corrected and committed to the repos just now. You should check that out. Without touchscreen_dataclean.m you can't easily examine the data, so that function is a prerequisite. 
0
ryklin

Administrator
Registered:
Posts: 237
Reply with quote  #72 
We currently only support a single click on the mouse or touchscreen, but I am currently working on adding other types of responses such as releases and double clicks. You should configure your touch screen driver for a single click action, and then program your condition file to look for multiple clicks.
0
ebos

Junior Member
Registered:
Posts: 15
Reply with quote  #73 
Dear Ryklin,

I've made quite a bit of progress with the touchscreen version of ML to develop a simple DMS task, but since I transitioned from using 'acquirefix' to 'touchtarget' for the touchscreen signal, I've been having a small problem with using eyejoytrack to simultaneously track two signals (button press and touchscreen). 

Using acquirefix, the following

       ontarget = eyejoytrack('holdtouch', sample, [], 'acquirefix', sample, screen_radius, wait);

used to return a 1x2 variable containing the values of both holdtouch and acquirefix, and this allowed me to then use an if statement to distinguish between two types of error. But since substituting touchtarget for acquirefix it returns a 1x1 variable that is always a 0, regardless of whether the screen or button is touched or not. When I use holdtouch and touchtarget independently, ontarget returns the correct respective values.

This is just a minor issue at the moment, but I was wondering whether I need to take some extra steps to use touchtarget in this context.

Thanks.

edit: I'm using the latest 1.2.26 version.
0
ryklin

Administrator
Registered:
Posts: 237
Reply with quote  #74 
Hi Ebos,

I wanted to let you know that I am looking into this. I did not anticipate users coding eyejoytrack to monitor both a touchscreen and button press in the same sample. The reason it worked earlier is explained by the touchscreen piggy backing on the analog signal. When I switched to a separate USB stream something wasn't implemented. I also discovered a few other bugs when testing your method. Thanks for letting me know what version you are using, can you also tell me what version you were on previously when things did work?

Also, can you confirm that you do not see the cursor position for both devices at the same time?
0
ryklin

Administrator
Registered:
Posts: 237
Reply with quote  #75 
Hi again,

I reviewed in detail everything you mentioned in your comment. I agree that eyejoytrack should return a 1x2 variable that allows you to then write conditions to distinguish which target was selected by which controller and then code how to react appropriately. Switching keywords from acquirefix to touchtarget should give you the same behavior output as you expected. So I'm not exactly sure what's wrong. One thing I don't understand is why you use an empty [] Threshold value for holdtouch.  I assume that's a typo in your comment and not in your actual code.  

I went ahead and implemented my own multicontroller timing file and fixed some bugs in the process. I am copying and pasting my timing file code for you below. I did not use a button press (holdtouch) but rather an eyetracker and touchscreen combination instead. That worked fine for me. Maybe the problem is with how you mapped your button1 in the GUI?  You can also go ahead and download my latest version which contains the complete code along with bug fixes, and will display a crosshair for both devices simultaneously, this might help you debug your system. This is a prerelease however.

https://github.com/ryklin/MonkeyLogic_stable/releases/tag/1.2.36

The critical code is:

ontarget = eyejoytrack('touchtarget', [TargetLeft TargetRight], windowSize, 'acquirefix', [TargetLeft TargetRight], windowSize, fixDuration);

if (ontarget(1) == 1)
toggleobject(touchTargetLeftNotFilled, 'Status', 'off');
toggleobject(touchTargetLeftFilled, 'Status', 'on');
trialerror(0);
disp('<<< MonkeyLogic >>> Target 1 Selected with Controller 1');
break;
end

if (ontarget(2) == 1)
toggleobject(touchTargetLeftNotFilled, 'Status', 'off');
toggleobject(touchTargetLeftFilled, 'Status', 'on');
trialerror(0);
disp('<<< MonkeyLogic >>> Target 1 Selected with Controller 2');
break;
end

if (ontarget(1) == 2)
toggleobject(touchTargetRightNotFilled, 'Status', 'off');
toggleobject(touchTargetRightFilled, 'Status', 'on');
trialerror(1);
disp('<<< MonkeyLogic >>> Target 2 Selected with Controller 1');
break;
end

if (ontarget(2) == 2)
toggleobject(touchTargetRightNotFilled, 'Status', 'off');
toggleobject(touchTargetRightFilled, 'Status', 'on');
trialerror(1);
disp('<<< MonkeyLogic >>> Target 2 Selected with Controller 2');
break;
end

0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.