You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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():
//===============================================================================================
// FUNCTION: GetHoldingLength
// PURPOSE: Get the duration of the first/last holding period.
//
static int _GetHoldingLength(int nSweepLength, int nNumChannels)
{
ASSERT((nSweepLength % nNumChannels)==0);
// Calculate holding count.
int nHoldingCount = nSweepLength / ABFH_HOLDINGFRACTION;
// Round down to nearest sequence length.
nHoldingCount -= nHoldingCount % nNumChannels;
// If less than one sequence, round up to one sequence.
if (nHoldingCount < nNumChannels)
nHoldingCount = nNumChannels;
return nHoldingCount;
}
where ABFH_HOLDINGFRACTION is a macro defined as 64 and where I'm guessing nNumChannels 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
// Copyright (c) 1993-2000 Axon Instruments.
// All rights reserved.
// Permission is granted to freely to use, modify and copy the code in this file.
The text was updated successfully, but these errors were encountered:
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:
python-neo/neo/rawio/axonrawio.py
Lines 338 to 340 in 6ce00dc
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
The text was updated successfully, but these errors were encountered: