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

2
1

I'd like to export the cells with onset and offset times and the cell contents. Is there a simple way to do this?

asked 03 Nov '11, 08:35

Jesse's gravatar image

Jesse ♦
11181015
accept rate: 53%


Another way to dump your data is frame-by-frame. For datasets with extremely long videos, this may not be a viable alternative, but for relatively short videos this is an easy way to access your data. Attached to this post are two scripts that help. The first, Dump Data By Frame.rb, will dump the currently opened file. If you run the script on the current file, it will create a file on your desktop called openshapa_dump.csv that contains all of the data that is in that file. You can change the location of the output file inside the script.

The other script, Dump Data By Frame_Multifile.rb will create an output file on your desktop called openshapa_dump.csv and then run the script on all of the files in a folder on your desktop called openshapa_files. These can also be changed in the script. To change these options for both scripts, just scroll down to near the bottom of the script, right below the line that says "begin".

You will see these lines in both the single and multi file:
    # =================================
    # MODIFY THIS FILE PATH TO CHANGE DUMP LOCATION
    # =================================
    output_filename = "~/Desktop/openshapa_dump.csv"

To modify the output file location, just change what is between the quotes to where you want it to be dumped. NOTE: The ~ character is shorthand for your user folder (/Users/username on Mac and C:\Users\username on Windows).

In the multi file dump script, you can also change the location of the folder that contains your files:

    # =================================
    # FOLDER WITH OPENSHAPA FILES IN IT
    # =================================
    filedir = "~/Desktop/openshapa_files/"

Which is just the folder that contains your openshapa files. I know that modifying the Ruby scripts sounds scary, but these simple manipulations are a great way to get your feet wet into the Ruby scripting world!

Download the scripts here.

permanent link

answered 07 Dec '11, 06:34

Jesse's gravatar image

Jesse ♦
11181015
accept rate: 53%

edited 07 Dec '11, 06:35

OpenSHAPA can export cells as CSV files by using the 'file' -> 'save as...' menu option. Select 'CSV' from the type drop down and save the file as normal.

permanent link

answered 03 Nov '11, 08:37

Clinton's gravatar image

Clinton
111171924
accept rate: 36%

edited 03 Nov '11, 08:37

This is very simple and easy for straightforward spreadsheets.

(03 Nov '11, 08:39) karen karen'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

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:

×24

question asked: 03 Nov '11, 08:35

question was seen: 3,330 times

last updated: 07 Dec '11, 06:35

powered by OSQA