Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
SeanC

Junior Member
Registered:
Posts: 10
Reply with quote  #1 
Hi all,

I want to be able to change the background color of the screen to grey (e.g. RGB [ 0.5 0.5 0.5] during the ITI. Does anybody know how I might go about doing this?

Thanks for your help,

Sean
0
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #2 
I'm not sure sorry... need to check the documentation first.
0
Sheena

Junior Member
Registered:
Posts: 13
Reply with quote  #3 
Does anyone know how to set background color for ITI (different color with background color during trial)?
0
Jaewon

Administrator
Registered:
Posts: 824
Reply with quote  #4 
What is the version of your ML? The old ML has drawing calls spread all over the code, so it may be difficult to do what you want.

----------
I ran some tests.

You should be able to change the background color with IDLE (http://www.brown.edu/Research/monkeylogic/timingscripts.html#idle). However, in old ML versions, this command makes the screen blink just for a moment and does not hold the color change for the whole duration.

In NIMH MonkeyLogic, adding idle(1000,[1 0 0]) at the end of the timing file does the trick and the color change lasts for a sec + ITI. In fact, if you do not explicitly turn off visual stimuli before the end of a trial in NIMH MonkeyLogic, they stay on the screen during the ITI.
0
IsabelV

Junior Member
Registered:
Posts: 19
Reply with quote  #5 
Hi Jaewon,
I am running some visual stimulus on a gray background.
For a few conditions, I need to change the background to fully dark (black). Is that possible in the last version of monkey logic?
Thank you
Isabel
0
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #6 
You can change the background color in the ML2 main menu, under Video >> Subject screen background.
0
IsabelV

Junior Member
Registered:
Posts: 19
Reply with quote  #7 
Hi Edward. Thank you for your answer. 
I understand that I can set the background from the ML interface.

However, I need the background to appear fully dark just in a few of the conditions of my task (i.e., some task conditions have a midgray background others have a black background)

Is it possible to do it with a command line in my ML task code?
0
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #8 
You can use the function set_bgcolor(). The function reference can also be found at {ML install location}/doc/runtimefunctions.html

=============

set_bgcolor

This function changes the background color of the subject screen.

Syntax:

      • set_bgcolor(bgcolor);

Input arguments:

      • • bgcolor: New background color, [R G B]; can be an empty vector ([]) to switch back to the original background

Remarks:

      • • To make this color change shown, one of the screen update calls (toggleobject, eyejoytrack, idle or run_scene) should be followed

Example:

    • set_bgcolor([1 0 0]);   % change the background color to red
    • idle(1000);
    • set_bgcolor([]);   % change it back to the original color
    • idle(0);   % show the original background
0
Jaewon

Administrator
Registered:
Posts: 824
Reply with quote  #9 
The man page can be linked like this.

ftp://helix.nih.gov/lsn/monkeylogic/ML2_doc/runtimefunctions.html#set_bgcolor
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.