brightness

I want to run a series of independent Superlab experiments consecutively either from a shell script or from Automator (actually both). The problem is, how do I keep the screen from flashing the standard desktop between experiments?

Since I use a black background in all my experiments, I’m thinking using a nifty command line utility called “brightness” which I snagged from http://njr.sabi.net/category/computing/mac-os-x as follows:

(1) set brightness to 0
(2) start superlab in “auto-everything mode” (that is, specify the subject, group, experiment, and logfile location through the command line).
(3) wait 5 seconds. Superlab will start the experiment, which always begins with a white-on-black screen instructing the subject to press a certain button to begin.
(4) Superlab runs the experiment and exits.
<flash>
(5) repeat from (1) until done.

What would be even better is if Superlab always set brightness to a specified value when it started the experiment, and returned it to its previous value when it completes the experiment.

This would also resolve a problem we have seen sometimes where OS/X fades the brightness automatically, which sometimes makes the display hard for the subject to see.

Any suggestions?

Greg Shenaut

Hi Greg,

You are always ahead of the curve a little bit. :wink: The “brightness” utility is probably the way t o go in your situation.

BTW, I thought that the automatic fading of the brightness by Mac OS was something that you can control from the control panel, no?

Hisham.

Thanks Hisham

Well, I’ll use the brightness utility in spite of the flash, at least it’s fairly brief.

The control panel setting is sometimes undone by a system upgrade, which is what happened in our case.

Greg

Hi Greg,

I’m not a Unix person, but my understanding is that all functions provided by the Control Panel also have Unix command line equivalents. In fact, the command line equivalents provide access to additional features not available via the Control Panel. So rather than using “brightness”, you can also add the Mac OS/Unix command to get the Mac to not alter the brightness.

Hisham.

Yes, I spent some time looking around for how to do that. All I could find were things that changed when the brightness would change–that is, how many seconds of inactivity before the display would sleep. The C program was the one thing that seemed to do what I wanted, which was to change the brightness directly right then, regardless of the display/energy-saver preferences.