29 June 2004 Jo Etzel How to make a new database to use with the SubjectData and puka programs 1 - start the MySQL server. on the eye-tracking room computer, the MySQL server does not start automatically, so it may or may not be running. If it is running a small stoplight icon appears on the bottom of the screen, to the left of the time. The green light should be lit. a - if the green light is not lit, but the stoplight is there, right-click on it and select Win NT then Start the Service b - if the stoplight is not there, look for the white icon on the desktop with the words my SQL on it, labeled "Start DB". Double-click this to start the program. The stoplight icon should appear after a few seconds. 2 - open a dos command window. Use the mouse to click on Start, then All Programs, then Accessories, then Command Prompt. In the window type > cd C:\mysql\bin then > mysql the prompt should now look like mysql> now type > create database NEWNAME; it should say "Query OK, 1 row affected (0.00 sec). If it says something else then something has gone wrong. You may need to log in to mysql with a different username (maybe mysql -u root). now type > use NEWNAME; it should say "Database changed" now type > source C:/programming/makeANewDatabase/makeDBscript.sql; it should make many lines saying "Query OK, 1 row affected (0.00 sec)" if it did, everything is fine and the database is ready to be used. If not, something is wrong. exit the programs by typing "exit" twice in a row; the dos window will close itself. 3 - set up the configuration files. Puka and SubjectData both use configuration files to specify where the files they need are located, the settings used when the recordings were made, etc. At the moment, it is not very easy to set these files up. The SubjectData program is easiest. a - set up SubjectData. Make a copy of the SubjectDataConfig.txt file located in this directory (C:\programming\makeANewDatabase\). - Rename this copy something easy to recognize, like YOURNAMEsubjectDataConfig.txt. - the copy will be made Read-Only. right click the file and select Properties, then uncheck the box labeled Read-only. - open this file by right-clicking on it and selecting EditPlus or Open With then EditPlus. You can use other text editors, but in the eye-tracking room I recommend EditPlus. - The file has several lines beginning with dbname and one labeled savePlace. Change the first dbname line to your database's name (NEWNAME) - it should look like dbname=NEWNAME the other dbname lines may be deleted, or if you may use more than one database, enter all of their names on separate dbname lines. - change the path under savePlace to where you want the zip files SubjectData makes to hold your data saved. DO NOT set this to a directory where other people have already saved their data - the two sets will be mixed up together and some will be lost - use a new directory or your own external hard drive. b - set up Puka. Make a copy of the Preferences.txt file located in this directory (C:\programming\makeANewDatabase\). - As before, rename the copy something easy to recognize, like YOURNAMEpreferences.txt. - if you are using the eye-tracking room computer most of the lines should be left unchanged, since they specify the location of various other programs puka needs to be able to find. Also, if you are using the same psychophysiology settings as Erica and Eduardo, they do not need to be altered. If not, ask me (Jo). - the ClipName entries need to be set to match the names of the recordings that you will be analyzing. There should be one ClipName entry for each recording name - no more, no less. So, if you collected psychophysiological recordings to three songs - songOne songTwo and songThree, there should be three ClipName entries, like: ClipName|songOne ClipName|songTwo ClipName|songThree spaces and numbers are allowed in the names; song one would also be fine. - next, the ClipLength entries need to be set to match the ClipName entries. These entries give the length, IN SAMPLE UNITS of each stimuli named by a ClipName entry, in THE SAME ORDER as the ClipName entries. for example, say the songOne songTwo and songThree recordings were made at 1,000 hz, and songOne is 1 minute long, songTwo 1 minute 30 seconds, and songThree three minutes long. The ClipLength entries will then be: ClipLength|60000 ClipLength|90000 ClipLength|180000 note that the ClipLength order is the same as the ClipName order, and the lengths have been converted from minutes and seconds to number of samples. - next, the order of column numbers needs to be entered. Three columns matter for puka: EKG, Respiration, and onset trigger. The column number for each data type needs to be correctly entered. If an onset trigger (or any other type) was not used, just set the number to a larger number than the number of columns in your data. It is only critical that the columns you want to analyze are correctly numbered, the other entries do not matter. for example, if only EKG (first column) and the onset trigger (second column) were recorded, the entries could look like: ColEKG|1 ColRespiration|5 ColSCR|5 ColDial|5 ColTrigger|2 - finally, the dbname entries need to be set, as for SubjectData. 4 - unfortunatly, neither subjectData or puka can handle multiple configuration files right now. So, you will need to put a copy of the configuration files that you just created in the proper directory every time you want to use either program. For puka, that place is C:\programming\puka\preferences.txt, and for subjectData that place is C:\programming\subjectData\SubjectDataConfig.txt.