Memorandums

知覚・認知心理学の研究と教育をめぐる凡庸な日々の覚書

screen 関数の基礎

2007-11-19 | PsychToolBox
>>help Psychtoolbox
から、
PsychBasic
さらに、
Screen
へ。

以下、基本的部分。
Screen is a MEX file for precise control of the video display. Screen has
many functions; type "Screen" for a list:
Screen


レファレンスの使い方
For explanation of any particular screen function, just add a question
mark "?". E.g. for 'OpenWindow', try either of these equivalent forms:
Screen('OpenWindow?')
Screen OpenWindow?

All the Screen Preference settings are documented together:
Screen Preference?


基礎事項
General Screen ARGUMENTS, common to most subfunctions of Screen:

"windowPtr" argument: Screen 'OpenWindow' and 'OpenOffscreenWindow' both
return a windowPtr, a number that designates the window you just
created. You can create many windows. To use a window, you pass its
windowPtr to the Screen function you want to apply to that window.

"rect" argument: "rect" is a 1x4 matrix containing the upper left and
lower right coordinates of an imaginary box containing all the pixels.
Thus a rect [0 0 1 1] contains just one pixel. All screen and window
coordinates follow Apple Macintosh conventions. (In Apple's the pixels
occupy the space between the coordinates.) Coordinates can be local to
the window (i.e. 0,0 origin is at upper left of window), or local to the
screen (origin at upper left of screen), or "global", which follows
Apple's convention of treating the entire desktop (all your screens) as
one big screen, with origin at the upper left of the main screen, which
has the menu bar. Historically we've had two different orderings of the
elements of rect, so, for general compatibility, all of the Psychophysics
Toolbox refers to the elements symbolically, through RectLeft, RectTop, etc.
Since 2/97, we use Apple's standard ordering: RectLeft=1, RectTop=2,
RectRight=3, RectBottom=4.


プログラムを止める
Stopping programs:

Command-zero brings the Matlab Command window forward. (Type a zero
"0" while holding the apple-cloverleaf "command" key down.)

Ctrl-C halts any program. (Type a "c" while holding down the "Ctrl"
key). Sometimes, Ctrl-C fails to halt progams executing in a Matlab process
run with the "-nojvm" option. To halt a runaway Psychtoolbox script in
Psychtoolbox you might resort to the Windows Task Manager to kill
the Matlab process. (Use Ctrl-Alt-Delete to open a window from which
you can start the Task Manager.)

OS-X:
Apple-Command-Escape executes "Force Quit" on Matlab, closing Matlab and all
of its windows.


刺激画面を消す
>> screen fillrect?

Usage:

Screen('FillRect', windowPtr [,color] [,rect] )

Fill "rect". "color" is the clut index (scalar or [r g b] triplet or [r g b a]
quadruple) that you want to poke into each pixel; default produces white with
the standard CLUT for this window's pixelSize. Default "rect" is entire window,
so you can use this function to clear the window. →画面を消す
コメント    この記事についてブログを書く
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする
« Google Group | トップ | ワイブル関数から閾値を求め... »

コメントを投稿

ブログ作成者から承認されるまでコメントは反映されません。

PsychToolBox」カテゴリの最新記事