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! |
Hi, 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:
I can send example scripts that we use if you think that may be helpful. Could you send example scripts? That would be incredibly helpful! You can check out the following templates on GitHub: https://github.com/Xubes/DatavyuScripts/blob/master/ExamplePrint.rb https://github.com/Xubes/DatavyuScripts/blob/master/ExportTemplate.rb |