I am a complete Datavyu and Ruby novice, so it is possible this is a wholly elementary issue....
I am coding videos of mother-child dyads. I am trying to develop a script that will generate a spreadsheet for each dyad (one dyad per video), with a column for mom and a column for child, and multiple codes within each column. I want to code in 10 second intervals. The videos themselves vary in length, some being 15m on the nose and some being slightly longer, so the script needs to accommodate that the number of potential 10s intervals varies by video.
Right now, my script runs but generates a spreadsheet with a few issues:
- there are no offset times (probably I have a basic mistake in my script? how do I tell it to set the offset?)
- it generates 121 intervals regardless of the video length -- is there a way to cut it off from making new intervals after the video ends or do extra intervals need to be removed manually?
- the intervals in the mom and child columns sometimes do not align, they are offset by 30 seconds. sometimes this goes away on its own when I click on the spreadsheet...any rhyme or reason why that might be happening?
Thank you for any assistance!
Here is the script:
require 'Datavyu_API.rb'
begin
mom = createColumn("mom", "praise", "critique")
for i in 0..120
time = i * 1000 * 10
cell = mom.make_new_cell()
cell.change_code("onset", time)
end
setColumn(mom)
child = createColumn("child", "persist", "quit")
for i in 0..120
time = i * 1000 * 10
cell = child.make_new_cell()
cell.change_code("onset", time)
end
setColumn(child)
end