Announcing the new Datavyu v1.4.0 with enhanced features, bug fixes, and a new video player for Windows!

We are in the process of migrating away from this forum—feel free to browse existing help topics. For new support inquiries, please reach out to us via email at [email protected]

I am trying to develop a script that will generate a column of 30-second intervals (called "interval") based on the start time of a cell in another column. In the column "session" I have a cell which indicates the onset and offset of the section of the video that I want the intervals created in. This script creates 30-second intervals, but they do not start at the beginning of the cell in the column "session" as I would like them to.

alt text

asked 06 Mar, 17:53

katethorson's gravatar image

katethorson
26348
accept rate: 0%

edited 06 Mar, 17:55


Hi, you need to move the line that creates the column outside of the loop (otherwise it creates a new column at each iteration and overwrites the previous column. So, I would move the line that says interval = createNewColumn("interval", "interval") to the line right before the for loop.

Additionally, check out the script repository for a similar template script that does this: Insert Intervals

You would need to modify the parameters section with appropriate values (e.g., column_code_map with the name of your column and the codes in it, reference_column_name to 'session', and the interval size to 30s).

permanent link

answered 06 Mar, 21:04

Shohan%20Hasan's gravatar image

Shohan Hasan ♦♦
531126
accept rate: 14%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×4

question asked: 06 Mar, 17:53

question was seen: 423 times

last updated: 06 Mar, 21:04

powered by OSQA