Duke-UNC Brain Imaging and Analysis Center
BIAC Forums | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password   Forgot your Password?
 All Forums
 Support Forums
 Experimental Control
 Creating menus in CIGAL
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

charles.michelich
BIAC Alum

USA
183 Posts

Posted - May 27 2003 :  5:16:36 PM  Show Profile  Reply with Quote
CIGAL Users,

Does anyone know how to create menus in CIGAL? In particular, I would like to create a menu with a menu item for each paradigm file in my experiment. I remember that Jeremy Goldstein has done this in the past, but I don't know how he did it.

Thanks,
Chuck

charles.michelich
BIAC Alum

USA
183 Posts

Posted - May 28 2003 :  5:33:10 PM  Show Profile  Reply with Quote
CIGAL Users,

Jim told me the answer to my question yesterday. I will post what he told me for everyone's reference.

Menus in CIGAL are created using a simple text file (.mnu). The name of the text file is the name of the menu.

example.mnu:
"MENUNAME1
CODE
CODE
CODE

"MENUNAME2
CODE

"MENUNAME3
CODE
CODE

"(-

"MENUNAME4
CODE
CODE
Each menu items starts with a " followed by the name of the menu. The line(s) following the menu item are the CIGAL code to execute when the menu item is chosen. A blank line separates the menu items. The "(- creates a horizontal separator between menu items. There cannot be any code associated with a "(- menu item since it cannot be selected.

Here is an example of a menu file which allows you to load the paradigm file for each run by selecting a menu item.

experiment.mnu:
"Load run01.ppf
showplay run01.ppf

"Load run02.ppf
showplay run02.ppf

"Load run03.ppf
showplay run03.ppf

"Load run04.ppf
showplay run04.ppf

"(-

"Run
showplay
You could also have CIGAL load and start each paradigm by selecting a single menu item for each run.

experiment2.mnu:
"Load run01.ppf
showplay run01.ppf
showplay

"Load run02.ppf
showplay run02.ppf
showplay

"Load run03.ppf
showplay run03.ppf
showplay

"Load run04.ppf
showplay run04.ppf
showplay
To load a menu in CIGAL, type menu "MNUFILENAME" where MNUFILENAME is the name of the menu file without the .mnu. You can also have the menu automatically load by using a text file called start.imp in the same folder as your start.cgl file. This file is automatically executed when CIGAL starts. If you put your menu loading command in this file, it will automatically load the menu as shown in the following example.

start.imp:
menu "experiment"
People have found that making custom menus to load paradigm files can save time and reduce errors when running an experiment using CIGAL.

Enjoy,
Chuck
Go to Top of Page

jim.voyvodic
BIAC Faculty

138 Posts

Posted - May 29 2003 :  08:46:31 AM  Show Profile  Reply with Quote
Thanks Chuck,
Couldn't have said it better myself.
Jim
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
BIAC Forums © 2000-2010 Brain Imaging and Analysis Center Go To Top Of Page
This page was generated in 0.34 seconds. Snitz Forums 2000