=
=
•Without automation, running an experimental ses=
sion
using MedPC involves the following steps:
=
•
•
•
•
•
•
•
•
•
•This is a complex error-prone procedure. It is =
also
difficult to transfer the running of the experi=
ment
to someo=
ne
else unless they are already very familiar with the MedPC software and the current
experiment.
•
•In order to simplify this task, the following
program in Visual
Basic was written:
=
=
•1. Identify the day of the experiment and the n=
ext animals to be run.
•2. Start MedPC
•3. Enter the subject number, experiment, group,=
procedure, and data filename for the subject..&=
#13;
•4. Repeat step 3 for each additional subject in=
the
current session.
•5. Start the session.
=
=
•This necessitates considerable time later to
extract the relev=
ant
information from each experimental session, and other features such as real-time graphing of
data are n=
ot
possible.
•
•It is better to have data directly written to E=
xcel
spreadsheets, with individual sheets used to gr=
oup relevant data together. A summary spreadsheet c=
an also be used to record data for each session. T=
his
can be us=
ed
to easily monitor results as they are being collected.
=
=
•
•
•
•
•
•
•
•
•
•
•To run an experimental session, a person simply
runs the
program. The program automatically identifies the day of the experiment, and the next animals to =
be
run. Once =
the
person has put the animals in the experimental apparatus, they press
“Start”. The Visual Basic program then automatically loads the appropriate experimental procedure for each ani=
mal into the MedPC program, and starts the session.=
In short, running an experimental session is reduc=
ed
to two m=
ouse
clicks and the required information is automatically entered.
•
•The program can also give a countdown timer unt=
il
the end of
the experiment that may be accessed through the internet, and can also back up the resulting
data file =
to
another computer on the network.
=
=
=
=
The Hitchhiker’s Guide to Data
Collection and Analysis using Visual Basic
Dennis
Garlick and Aaron P. Blaisdell
University
of California, Los Angeles
=
=
Writing
Data Directly to Excel Spreadsheets
<=
![endif]>
=
=
•Training in psychology typically does not inclu=
de extensive instruction in computer programming. =
This
is unfortunate as modern programming languages =
can be of great benefit in the laboratory. Not only=
can
they autom=
ate
tasks that can take researchers thousands of hours to complete manually - enabling this time=
to
be better
spent on other academic activities, but they can also allow the daily running of tasks to be
performed by mo=
re
junior laboratory members, reduce the number of errors produced, and enable alternati=
ve =
analyses to be performed that would otherwise be
too time
consuming.
•
•A number of programs that have been developed u=
sing
Microsoft Visual Basic for Windows will be described. They will demonstrate that even a mo=
nth
of custo=
mized
software development can lead to utilities that would benefit a laboratory for many years =
and perhaps even decades.
=
=
•Typically, all data from an experimental sessio=
n is
writt=
en
to a single text file:
=
=
Accessing
Experiment Status Across the Internet
=
=
•It is often necessary to monitor the status of =
an experimental session, so that problems can be <=
/span>identified and it is known when the experiment =
has concluded. Rather than being present in the experiment room, status of the experiment may b=
e accessed from any computer through an internet =
web browser.
=
=
Separate
Video Files for Each Trial of a Session
=
=
•The easiest way to record video of an experimen=
t is
to record
the entire session onto a single video tape. However, this quickly leads to an astronomical =
number of tapes that must be catalogued, findin=
g a specific trial on the tape can be extremely tim=
e-consuming (in reality not done), and tapes can =
fail
over time leading to the loss of the video
footage.
•
•It is better to have the experiment automatical=
ly
create indiv=
idual
video files on a computer for each individual trial of the experiment. For instanc=
e, “Subject1.5.34.avi” will contain the
34th trial from sessi=
on 5
for Subject1. This solution allows both the easy archiving of video footage, and the ready
access to vi=
deo
of specific trials if required.
=
=
Interactive
Graphing of Experimental Data
=
=
•Graphs with many lines can quickly become confusing. An ideal graph is interactive, so th=
at individual lines may be made visible or invisib=
le
at the click=
of
a button. This provides a better understanding of the data and features will be easier to
identify. The graph=
can
also automatically update as data is collected.
