Open MichaelClerx opened 1 year ago
Hi @MichaelClerx. Thanks for digging into the Axon format and looking for potential bugs in Neo. If the current code is already loading the file correctly I don't think it's necessary to change it. If you find it important, feel free to open a PR and include a corresponding test in the our code base here.
At the moment Neo uses a slightly "magic" equation to work out the (undocumented) time spent at holding potential before the first "epoch" of a protocol starts:
https://github.com/NeuralEnsemble/python-neo/blob/6ce00dc9c13e85c2b2cbf6dacb6d66f93b0099c6/neo/rawio/axonrawio.py#L338-L340
Digging into the File Support Pack 1 for Windows for the old ABF 1.x format, there's a method inside
AxonDev/Comp/AxAbfFio32/ABFHWAVE.CPP
(which I guess deals with "waveforms", a.k.a. D/A protocol outputs) called_GetHoldingLength()
:where
ABFH_HOLDINGFRACTION
is a macro defined as64
and where I'm guessingnNumChannels
is the number of AD (not DA) channels.I've tried for a few files and it seems to give the same result as the current code. Don't want to fix what isn't broken, but perhaps good to try out?
The next function down,
ABFH_GetHoldingDuration
, suggests a difference for "old" versions of the format (but given that these were "old" in 2000, maybe that's ok)Note that the file starts with