~cowlog-team/cowlog/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<HTML>
</HTML>
<BODY>
<H2>CowLog : Users manual</H2>
Matti Pastell matti.pastell@helsinki.fi

<H3>About CowLog</H3>
CowLog is a software for recording behaviors from digital video developed in the Research Center for Animal Welfare in the University of Helsinki. We created CowLog, because we wanted a free easy to use program for coding digital video. The name comes simply from the fact that we originally developed it in order to log cow behaviour from digital video, but is usage is narurally not limited to cows.

<H3>Citing CowLog</H3>
To cite CowLog in publications use: 
<BR>
Hänninen, L. & Pastell, M. 2009. CowLog: Open source software for coding behaviors from digital video. Behavior Research Methods. 41(2), 472-476.

<H3>Defining the Ethogram</H3>
At the moment the program consists of three behavioral classes each with eight behaviors. The names for the key codes are always the same. The user decides which key code represents each of the coded behaviors. No initial setup is needed as the key code definitions are always the same. However, the user needs to keep track of codes elsewhere. The user should also note that in this program the behavioral states (i.e. behaviors for which the user wants to record both the occurrence and duration) and events (behaviors for which only the number of occurrence is recorded) are defined in the analysis stage.

<H3>Choose videofile and output datafile</H3>
The File menu in CowLog has two file selectors: One for opening the Video file and the other for speccifying a data file. It is advisable to leave the extension of the data file name out, because .bh1, .bh2 and .bh3 extensions will appended to datafiles created by buttons in the button colums 1, 2 and 3 respectively. The format for the output datafiles is plain text, where the first column has the time seconds from beginning of the video and the second column has a corresponding code. You can either directly type in the file name or use the file selector by clicking the folder icon.

<H3>Coding session</H3>
After you have selected the files press start and MPlayer window with your video in it will appear paused. Press one of the play buttons to start playing the video with selected speed.
Code behaviors by pressing numbered buttons with the mouse or by pressing alt+''underlined character'' from the keyboard. e.g to code behavior 1 from column 1 press ''alt+1'' and behavior d3 from column 3 press ''alt+d''. You can see five previously coded keys for each behavior in the displays above the button colums. Remember that each column of buttons saves the codes to a separate datafile so you can use them to code parallel events.
Currently, if you want to remove an erroneus coding you have to do it manually from the datafile. This is something we intend to implement in the GUI for future versions. 
To stop the coding session simply close the program, the datafiles are saved to the disk in real time so there is no need for separate saving. Also if you want to continue a session just choose the same file name as previously and the codes will appended to the same file.

<H3>Analyzing the results</H3>
The analysis of results is implemented in R package ''Animal'' that comes with CowLog. The function takes the data file name, labels of the codes and the type (event or state) of the codes as inputs, and gives a summary table and plot of the results as output. The function also removes double state (duplicated) errors for state codes. 
We suppose that you have succesfully installed animal with instructions given in the installation manual. You can view the R help file with command ?cowAnalyze
The main function in the package is cowAnalyze which takes the file name, types of behaviors and behavior names as inputs and gives descriptive statistiscs as an output. The function is documented in R.
Here is a short example on how to use the function in R (the library command needs to executed only once per R session): 
<BR>
Analyze CowLog datafile named calf1.bh1, codes 1-3 are states and codes 4-5 are states.
The names for the states are lying, standing, walking. The descriptive statistics will appear on screen and they are also saved to variable analyzed. <BR>
 library(Animal)
 analyzed <- cowAnalyze(file='calf1.bh1',states=c(1,2,3),
  events=c(4,5),state.names=c('lying','standing','walking'))
<H3>Modifying CowLog</H3>
CowLog is open source so you can easily modify it for your own use. The program is written with Python using the PyQT4 toolkit for GUI elements and mypylayer for controlling MPlayer.
<BR>
<BR>

2009-03-27
</BODY>
</HTML>