EKG Sampling Script - PowerPoint PPT Presentation

About This Presentation
Title:

EKG Sampling Script

Description:

... that sample the amplitude of brain waves of subjects in the experiments. Our program utilizes pre-existing code to allow the user to write a script which ... – PowerPoint PPT presentation

Number of Views:220
Avg rating:3.0/5.0
Slides: 10
Provided by: CUS4
Category:

less

Transcript and Presenter's Notes

Title: EKG Sampling Script


1
EKG Sampling Script
  • John Thornton
  • Brian Walden

2
What does it do?
  • The psych lab in the science center runs
    experiments that sample the amplitude of brain
    waves of subjects in the experiments
  • Our program utilizes pre-existing code to allow
    the user to write a script which allows them to
    run multiple samples consecutively on the EKG
    detection device in the psych lab

3
Scripting Language
Sample Script
Template test1 sec 150 hz 100 chan 0-14 write
test1a.txt Template test2 sec 30 hz 200
chan 15-29 write test2a.txt Template test3
min 1 hz 50 chan 0-29 write test3a.txt
Run test1 Run test2
Run test1 min 2 write test1b.txt
Run test2 min 1 write test2b.txt

Run test1 sec 90 write test1c.txt
Run test2 sec 90 write test2c txt Run
test3 Run test3 hz 100 chan 0-14
append test3a.txt Run test 3 sec 45 hz 150
chan 0-14 append test3a.txt

4
Scripting Language
Making a Template
Template ltnamegt minsec lttimegt hzperMin
ltfrequencygt chan ltlist of channelsgt i
writeappend ltfile namegt i is an element of
1,2,3,4,5,6,7,8,9,10
ltnamegt and ltfile namegt are strings of
characters lttimegt
and ltfrequencygt are integers
ltlist of channelsgt is a
list of ints separated by , or
ex 3,8,11-17,21-15,29
5
Scripting Language
Running a Sample
Run ltnamegt j minsec lttimegt j hzperMin
frequency j chan ltlist of channelsgt
(iUj) writeappend ltfile namegt
i is an element of
1,2,3,4,5,6,7,8,9,10 j is an
element of 0,1 (iUj) is an
element of 0,1,2,3,4,5,6,7,8,9,10
6
Program Flow Chart
Sample Reader
Final Output Files
Post Processor
Sample Container
Temp Output Files
Sample runner
7
Technical Challenges
  • Making sure rate of writing output keeps up with
    reading the input
  • Keeping the time between samples as small as
    possible
  • Developing a powerful scripting language thats
    easy to use
  • Developing in a fairly limited environment
  • Understanding poorly documented code when the
    programmer is unavailable

8
What We Learned
  • Smart data structures make integrating different
    parts of the program easy
  • Working with non-professional code is hard
  • Keeping documentation really helps

9
Future Improvements/Bugs
  • Improvements
  • Allowing for the user to administer a stimulus
  • Additional post processing capabilities
  • Bugs
  • Right now you cant insert the frequency in
    samples per minute
  • Improve script reader so that errors dont
    cascade
Write a Comment
User Comments (0)
About PowerShow.com