Fix to apply conversion rules to data within data frames (if raw is not enabled) #977
nickpelling
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
A co-worker (Jiri) was trying to use the API's export() function to convert MDF data to MAT files, but noticed that channels inside a dataframe were always being exported as raw data (i.e. the channel's conversion wasn't being carried out). He asked me if I could tweak export() to do the conversion.
Here's the code I added (I put it just before the mdict.update(sigs) call in mdf.py):
Now, I'm pretty sure that this isn't perfect (the "2 + k" is somewhat clunky), but it does seem to do the job for the MDF data I tried it with: and if you invoke it with raw(True), you get the existing behaviour. Should this (or something not too dissimilar to it) be delivered to the repo?
Note: I believe that this is also true of the CSV exporter, so something similar should probably be deliverered into that export() path.
Beta Was this translation helpful? Give feedback.
All reactions