When exporting AcqKnowledge files to MATLAB® via “File > Save As…”, event marks are not exported with the data. To get event mark information into a MATLAB file, there are four options:
A. Use the AcqKnowledge Software API.
B. Create a channel or channels that carry event mark information.
C. Summarize the events to the journal and write a MATLAB script that will parse that text.
D. Use AcqKnowledge scripting to produce a program that will generate a file containing marker information.
The BIOPAC File Format Application Programming Interface (ACKAPI) functions give software developers the ability to retrieve data from files in BIOPAC’s file format.
When the data file is imported into MATLAB, this channel will contain the event mark information–any non-zero values indicate the sample point associated with an event mark, and the exact value (if there is more than one) will have the information about the specific event at that location.
A problem with option B is that there is a hard limit to the size of .mat file that can be exported by AcqKnowledge. Adding even one channel may put a file over that limit. A workaround could be to split up the task or split up the original file so that AcqKnowledge may create multiple files instead of just one large one, then all files can be imported into MATLAB and re-consolidated there.
Also, if the above steps are followed exactly and the data file contains more than one event mark at the same sample point, only the one corresponding to the criteria set up in the last run of Find Cycle will be represented.
Option C is much simpler to implement than option B on the AcqKnowledge side but might require a significant amount of development effort on the MATLAB side.
In AcqKnowledge, choose “Display > Show > Event Palette…” (a toolbar button is also available for this at the far right edge of the events toolbar). Under “Actions” click “Summarize in Journal.” The journal will then have a list of lines such as:
1277.132 sec Skin Conductance Response CH1, GSR100C No label
If this option is to be pursued, the journal text should be copied and pasted into a text editor which can save as an ASCII file, or the journal should be saved directly (via the floppy disk icon at the top of the journal). There are various options for saving the journal directly, but saving in this way would probably make the MATLAB programming task more difficult than saving through a text editor. For instance, the native format for the journal (.jcq file) includes html coding that MATLAB would probably have to be programmed to step around.
Option D would probably still entail writing a MATLAB script to parse the file created by AcqKnowledge‘s scripting language. The scripting language is not a standard feature of AcqKnowledge but rather a licensed add on. This option provides the greatest flexibility and capability for automation. That benefit comes at the cost of the scripting license and development time to generate the scripts in both languages. To determine whether this option is to be preferred (or is even feasible) one would have to consider the number of files to be processed, the complexity of the event mark information to be extracted, and perhaps most important of all, the programming skills of the users who will write the scripts in AcqKnowledge and MATLAB. If it can be foreseen that multiple experiments might make use of similar scripts, this option could truly be the best in the long term.
This BSL training will walk you through how to choose packages and curriculum best suited for your lab, as well as cover the basics of using BSL system hardware and software.
– BSL Hardware Intro: MP36 & MP46
– BSL System Packages: choosing your lab’s core system
– BSL System TA Packs: convenient and popular add-ons
• fNIRS for education
• EMG-Controlled Robotic/Prosthetic Gripper
• Gas Analysis System
– Overview of different BSL software features
Watch On Demand
Exercise physiology is the study of the body’s response to physical activity. Research in exercise physiology allows for insights in health and for a better understanding of the functions of the body at work. Here are some recent studies in exercise physiology that utilized BIOPAC tools for their research… Effect of exercise on electrocardiographic parameters […]
BIOPAC’s comprehensive Introductory ECG Guide addresses fundamental to advanced concerns to optimize electrocardiography data recording and analysis. Topics include: ECG Complex; Electrical and Mechanical Sequence of a Heartbeat; Systole and Diastole; Configurations for Lead I, Lead II, Lead III, 6-lead ECG, 12-lead ECG, precordial leads; Ventricular Late Potentials (VLPs); ECG Measurement Tools; Automated Analysis Routines for extracting, […]Read All