# display mode, sampling rate, etc:  continuous tracking

**URL:** <https://psychtoolbox.discourse.group/t/display-mode-sampling-rate-etc-continuous-tracking/1546>\
**Category:** Uncategorized\
**Created:** [June 19, 2002, 9:45pm UTC](https://psychtoolbox.discourse.group/t/display-mode-sampling-rate-etc-continuous-tracking/1546 "2002-06-19T21:45:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [June 19, 2002, 9:45pm UTC](https://psychtoolbox.discourse.group/t/display-mode-sampling-rate-etc-continuous-tracking/1546/1 "2002-06-19T21:45:34Z")

</div>

I'm using Psychtoolbox to run a continuous manual tracking   
experiment. The input device is a WACOM Intuos tablet, and the   
task is to chase a target across the screen, using the tablet to   
control the cursor. I've had more than a few headaches working   
out all the details.  
  
The biggest problem is getting a high enough sampling rate.   
Ideally, we'd like it to be 120 Hz or better. However, the sampling   
rate of the tablet seems to top out at 60 Hz, probably because it's   
a serial tablet we are connecting with a Keyspan USB-serial   
adapter. Does anyone know if a USB tablet, like the Intuos2   
which WACOM claims does 200 samples per second, would   
really work? I have read rumors about USB timing that make me   
wonder if the sampling of any USB device can go that high.  
  
On the other end, I also need to display the target, which follows   
pre-programmed paths, as a dot moving on the screen. Of   
course this will be fastest if I make a movie for playback, but   
since each screen is so large, and our trials are on the order of   
tens of seconds, I need a ton of memory.  
  
I'd like to reduce the memory used per screen, by using 2 or 4-bit   
mode. But I get this error:  
  
??? pixelSize/depthMode 4 unavailable in display mode 21540.  
  
for any modes below 8-bit. I'm afraid I don't know what display   
mode 21540 is, or if it can be changed to allow me to display   
fewer than 256 colors. Can someone help me out?  
  
Many thanks,  
tj

---

<div class="post-metadata">

**Author:** ![denispelli](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@denispelli](https://psychtoolbox.discourse.group/u/denispelli)\
**Post date:** [June 20, 2002, 12:31am UTC](https://psychtoolbox.discourse.group/t/display-mode-sampling-rate-etc-continuous-tracking/1546/2 "2002-06-20T00:31:28Z")

</div>

At 9:45 PM +0000 6/19/02, tjerde03 wrote:  

> \>I'm using Psychtoolbox to run a continuous manual tracking  
> \>experiment. The input device is a WACOM Intuos tablet, and the  
> \>task is to chase a target across the screen, using the tablet to  
> \>control the cursor. I've had more than a few headaches working  
> \>out all the details.  
> \>  
> \>The biggest problem is getting a high enough sampling rate.   
> \>Ideally, we'd like it to be 120 Hz or better. However, the sampling  
> \>rate of the tablet seems to top out at 60 Hz, probably because it's  
> \>a serial tablet we are connecting with a Keyspan USB-serial  
> \>adapter. Does anyone know if a USB tablet, like the Intuos2  
> \>which WACOM claims does 200 samples per second, would  
> \>really work? I have read rumors about USB timing that make me  
> \>wonder if the sampling of any USB device can go that high.  
> \>  
> \>On the other end, I also need to display the target, which follows  
> \>pre-programmed paths, as a dot moving on the screen. Of  
> \>course this will be fastest if I make a movie for playback, but  
> \>since each screen is so large, and our trials are on the order of  
> \>tens of seconds, I need a ton of memory.  
> \>  
> \>I'd like to reduce the memory used per screen, by using 2 or 4-bit  
> \>mode. But I get this error:  
> \>  
> \>??? pixelSize/depthMode 4 unavailable in display mode 21540.  
> \>  
> \>for any modes below 8-bit. I'm afraid I don't know what display  
> \>mode 21540 is, or if it can be changed to allow me to display  
> \>fewer than 256 colors. Can someone help me out?  
> \>  
> \>Many thanks,  
> \>tj  
> \>

dear tj  
  
i don't know about WACOM tablets. perhaps someone who does will jump in.  
  
the error message is simply saying that pixelSize of 4 is not   
available in the current resolution. most video cards sold in the   
past 5 years or so only support pixelSize of 8, 16, and 32 bits. 1,   
2, and 4, which were very nice for certain things, have disappeared.   
only the graphics driver can offer them.  
  
this is not a limitation of the Psychtoolbox. If you go to your   
Monitors control panel it will offer the same options. in fact it   
offers fewer options, since its selection of resolutions is more   
restricted.  
  
i will try to change that error message to be less cryptic.  
  
How about this? Would this be more self explanatory?  
  
"??? pixelSize/depthMode 4 unavailable in the current screen   
resolution (display mode 21540)."  
  
best  
  
denis  
  
p.s.  
memory is very cheap, so make sure that your time to work around   
using it is really worth less than the cost of buying more. also   
consider updating just a small part of the screen, that's changing.

---

<div class="post-metadata">

**Author:** ![ingling7](https://avatars.discourse-cdn.com/v4/letter/i/e79b87/32.png) [@ingling7](https://psychtoolbox.discourse.group/u/ingling7)\
**Post date:** [June 20, 2002, 9:57pm UTC](https://psychtoolbox.discourse.group/t/display-mode-sampling-rate-etc-continuous-tracking/1546/3 "2002-06-20T21:57:07Z")

</div>

tjerde03 wrote:  
  

> \>On the other end, I also need to display the target, which follows   
> \>pre-programmed paths, as a dot moving on the screen. Of   
> \>course this will be fastest if I make a movie for playback, but   
> \>since each screen is so large, and our trials are on the order of   
> \>tens of seconds, I need a ton of memory.  
> \>   
> \>

Dear tj,  
  
I've written a demo named TargetDemo wich animates a dot across the   
screen continuolsy, the dot tracks the mouse. The demo uses only two   
offscreen windows. I expect that you could adapt this to your needs.   
The demo is attached.   
  
Best,  
  
Allen
