LoadIdentityClut(window) would load the hardware gamma tables with an identity mapping and that should hopefully override whatever the os otherwise does. Then the PsychColorCorrection() stuff will do gamma correction etc.
[framebuffer] --> PsychColorCorrection --> [corrected framebuffer] --> [hardware gamma tables] --> display.
Many PsychImaging() functions will implicitely call LoadIdentityClut wherever "bypassing" the hw gamma tables is important, e.g., when high precision display devices like Bits+/Bits#/DataPixx/ViewPixx/ProPixx or similar stuff is connected. LoadIdentityClut will also try to disable display dithering, depending on its parameters.
Sometimes you must call the function yourself, when it is not clear from PTB's perspective that calling it automatically would be clearly the right thing to do.
For most "normal" display situations on normal displays you would want to use the hw gamma tables.
This is so far the theory. In practice always check your results. In practice, as so often, especially OSX has sometimes nasty bugs or behaviours, or change of behaviours depending on osx version which could spoil your day. It's really more a toy operating system for life-style items than a professional OS for research by now.
Wrt. gamma tables on OSX 10.9, e.g., this little gem was one of my latest sources of joy:
Psychtoolbox-3/Psychtoolbox-3 |
| | | Psychtoolbox-3/Psychtoolbox-3 This is the git repository for development of Psychtoolbox-3. Regular end users should stay away from it, unless instructed by us otherwise, and use our... | |
| Preview by Yahoo |
|
This bug fix is not yet in current beta, only in the Psychtoolbox-3.0.11 final flavor.
Additionally new generations of GPU hardware learn new tricks for color correction beyond gamma tables, e.g., extra color space conversion matrices, or NVidia's "Color vibrancy" stuff, or new dithering strategies. Those tricks, if they get used by new operating systems, are usually out of our control, or in case of the properietary os'es, even hidden from us. The exception is Linux, where due to its open-source nature one can find out about such things early and work with the developers to make sure the OS doesn't spoil the party.
If one really cares about precise color reproduction, Linux would be the best long-term choice, with the highest chance of staying in control of what happens to those sparkly pixels.
-mario