LUKASZ D. KACZMAREK POSITIVE PSYCHOLOGY, HEALTH PSYCHOLOGY, AND PSYCHOPHYSIOLOGY
  • Publications
  • Resources
  • Contact
  • Blog

Moving data to Datapad in LabChart easily - helpful macro

11/29/2018

0 Comments

 
You can record a macro in LabChart for repeated parts of the data analysis. It is a great way to reduce your time for analyses. In fact, it is the only way to process physiological data without losing your mind if you have more than, say, 10 cases to analyze.

However... If you want to push the limit even further, you can use a simple subroutine that I wrote. Just copy the Sub DoBlock into your macro, and then used this command:

DoBlock "a", 20, "Forwards", 10

For the first parameter (here: a), enter the comment that you want to find.
For the second parameter (here: 20), enter how long selection you need.
For the third parameter, enter forwards (or just f), if you want the selection to be marked forward relative to the comment.
For the fourth parameter, enter how long chunks you want to transfer to data pad.

In the above example, LabChart will search for the comment "a," select 20 seconds after this comment, and transfer two blocks 10-sec long into Data Pada.

I found using such subroutine extremely useful to keep the macro clean when you need to process several parts of the signal.


Copy this to your macro:

Sub DoBlock(name, seconds, selectionDirection, chuncks)

    'go to the beginning
    ' Begin Find
    ChannelIndex = 3
    SetAction = kSetPeriod
    SelectMode = kSelectAfter
    SelectTime = 0
    DataDisplayMode = kViewDataVisible
    SelectAll = True
    Direction = kSearchForward
    FindType = "Start of file"
    FindData = ""
    Call Doc.Find (ChannelIndex, SetAction, SelectMode, SelectTime, DataDisplayMode, SelectAll, Direction, FindType, FindData)
    ' End Find

    If selectionDirection = "forward"_
    OR selectionDirection = "forwards"_
    OR selectionDirection = "Forward"_
    OR selectionDirection = "Forwards"_
    OR selectionDirection = "f"_
    OR selectionDirection = "F" Then
        SelectMode = 0
    ElseIf selectionDirection = "backward"_
    OR selectionDirection = "backwards"_
    OR selectionDirection = "back"_
    OR selectionDirection = "Back"_
    OR selectionDirection = "Backward"_
    OR selectionDirection = "Backwards"_
    OR selectionDirection = "b"_
    OR selectionDirection = "B" Then
        SelectMode = 2
    ElseIf selectionDirection = "around"_
    OR selectionDirection = "Around"_
    OR selectionDirection = "a"_
    OR selectionDirection = "A" Then
        SelectMode = 1
    End if
    
    'select
    ' Begin Find
    ChannelIndex = 3
    SetAction = kSetPeriod
    'SelectMode = selectionDirection '
    SelectTime = seconds
    DataDisplayMode = kViewDataVisible
    SelectAll = True
    Direction = kSearchForward
    FindType = "Search for comment"
    FindData = "JustThisChannel=0;WhatToLookFor="+name+";"
    Call Doc.Find (ChannelIndex, SetAction, SelectMode, SelectTime, DataDisplayMode, SelectAll, Direction, FindType, FindData)
    ' End Find

    'add to datapad
    ' Begin MultipleAddToDataPad_Time
    TimeSecs = chuncks
    EveryChecked = True
    EverySecs = chuncks
    IntegralSelection = True
    SelectScope = kWithinSelection
    Call Doc.MultipleAddToDataPad_Time (TimeSecs, EveryChecked, EverySecs, IntegralSelection, SelectScope)
    ' End MultipleAddToDataPad_Time
End Sub



DISCLAIMER: Before you start processing your data with this macro, please make sure that it is doing what it is supposed to do with your data. You can compare the results with manual processing of a couple of files.
0 Comments

Attending the 2018 Spring School of Evolutionary Psychology

5/9/2018

0 Comments

 
   I was very happy to attend the Spring School of Evolutionary Psychology, It was an educational event for young scholars where I was invited to teach psychophysiological and observational methods. It was organized on May 4-6, 2018 in Poland by the Polish Society for Human and Evolution Studies and the Institue of Psychology at the University of Wroclaw. Piotr Sorokowski and Agnieszka Sorokowska were the primary facilitators.
   I presented a practical introduction to well-established and some new methods for the measurement of emotions via peripheral and behavioral responses. My impression was that the audience was the most responsive to the facial expression analysis via computer software (namely, Xpress Engine that we have used in our laboratory successfully). Many people were interested in facial expression analysis. I was very happy to hear it because I have a very strong impression that facial expression analysis has been a greatly undervalued and overlooked method.
  I much enjoyed this meeting despite the fact that I do not consider myself an evolutionary psychologist. In fact, I do not consider myself any type of a psychologist. I find myself just a psychologist - a scientist that is eager to integrate various subdisciplines in psychology that are often studied separately. I think that it is important to start integrating after decades of differentiation among psychologists. However, what is always important to me is using objective methods to study subjective phenomena. This is very much in line with W. Wundt's view; an approach that resulted in the emerge of psychology as a discipline aspiring to be a part of the natural science rather than the product of solely philosophical reasoning.
0 Comments

    Archives

    November 2018
    May 2018

    Categories

    All
    LabChart
    Macro
    Psychophysiology

    RSS Feed