christiankeine / heka_patchmaster_importer Goto Github PK
View Code? Open in Web Editor NEWMatlab class to import HEKA Patchmaster files
License: MIT License
Matlab class to import HEKA Patchmaster files
License: MIT License
Currents in ans.RecTable.stimWave are labeled as A (amps), but numerical values are scaled incorrectly.
This is a very great tool. However, I have found that for some of the protocols I inherited, the data read from .dat files were offset. For example, here's the file as loaded within PatchMaster
And here was the same data read in using the importer and plotted with MATLAB
At first I thought it was somehow multiplied by a factor of 2, but looking closely I realized it was shifted around -70mV (for example, the AP amplitude). I tried exporting these traces to an ITX file and it was fine.
I noticed that I had this particular issue with protocols that has this:
whereas protocols with Zero=0
are fine (as in no offset).
Do you know what's happening?
System info:
PatchMaster v2x90.1
on Windows 7
MATLAB R2018b
on Windows 10
EDIT:
Apparently the data have already been zeroed when saved (I think). I have turned this line assignment to 0.
tr.TrZeroData = 0; % instead of fread(fh, 1, 'double=>double');%
And it worked for some reason. Is this right? Is there a place that we can check for that?
Currently, only a limited number of stimuli can be reconstructed and the stimulus channel names are somewhat arbitrary.
Add support for ramps, alternating segments, sine waves etc.
I've successfully incorporated your HEKA_Importer code into another of my codes for about a year, but recently, I've been encountering an unexpected issue. It only appears to happen on select files, but when I attempt to import a .dat file into MATLAB, I receive the following error:
"Output argument "ser_row" (and maybe others) not assigned during call to
"HEKA_Importer.HI_ImportHEKAtoMat>getSeriesHeaders".
Error in HEKA_Importer/HI_ImportHEKAtoMat>LocalImportGroup
Error in HEKA_Importer/HI_ImportHEKAtoMat (line 144)
matData2{iGr}=LocalImportGroup(fh, obj.trees.dataTree, iGr, grp_row);
Error in HEKA_Importer/HI_loadHEKAFile (line 23)
obj.HI_ImportHEKAtoMat;
Error in HEKA_Importer (line 107)
obj.HI_loadHEKAFile;
Error in Heka_importer (line 9)
HEKA_Importer(file)
This is by far the best code for importing HEKA files for my own analysis and I'd prefer not to export out all the individual traces if possible. Any ideas on what may be going wrong? It seems I can't upload the .dat file, but I can email it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.