Announcing the new Datavyu v1.3.6 with enhanced features and transcription support!

We'd like to streamline our exports from Datavyu so they're easier to analyze later. A couple of key points have come up that would be helpful and it seems likely that scripts for these processes already exist. If so, could you point us toward them? If not, could you advise us how to write such scripts?

1) Export columns in the order we created during coding, not in ABC order. 2) Export onset/offset timestamps in seconds, not in milliseconds. 3) Export rows to reflect temporal alignment/nesting

Thank you!

asked 04 Sep '15, 10:26

LearningLab's gravatar image

accept rate: 0%


Implementing all three of those features is feasible.

1) This is probably the trickiest because (iirc) the Ruby API doesn't have routines for accessing the column numbers from the database. It's possible to access it anyway if you really need to — I'll look up the actual functions to use. As an alternate option, you could specify the order to print the columns in the script itself and write a routine to iterate over the columns in the order you want.

2) You can do this by just dividing the onset and offset values from each cell by 1000.0. Make sure to include the decimal point so that the values are not truncated.

3) This can be done by iterating over your columns using nested loops and selecting cells using the contains() and is_within() functions.

For example:

col1 = getVariable('column1') col2 = getVariable('column2') for col1cell in col1.cells for col2cell in{ |cell| col1cell.contains(cell) } codes = [col1cell.onset/1000.0, col1cell.offset/1000.0, col1cell.code1, col2cell.onset/1000.0, col2cell.offset/1000.0, col2cell.code1] output_file.puts codes.join(',') end end

I can send example scripts that we use if you think that may be helpful.

permanent link

answered 09 Sep '15, 12:58

Shohan%20Hasan's gravatar image

Shohan Hasan ♦♦
accept rate: 12%

Could you send example scripts? That would be incredibly helpful!

(16 Sep '15, 17:56) LearningLab LearningLab's gravatar image
Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 04 Sep '15, 10:26

question was seen: 2,321 times

last updated: 29 Sep '15, 15:32

powered by OSQA