Stimfit @PACKAGE_VERSION@
Loading...
Searching...
No Matches
abfheadr.h
Go to the documentation of this file.
1//***********************************************************************************************
2//
3// Copyright (c) 1993-2003 Axon Instruments.
4// All rights reserved.
5// Permission is granted to freely use, modify and copy the code in this file.
6//
7//***********************************************************************************************
8// HEADER: ABFHEADR.H.
9// PURPOSE: Defines the ABFFileHeader structure, and provides prototypes for
10// functions implemented in ABFHEADR.CPP for reading and writing
11// ABFFileHeader's.
12// REVISIONS:
13// 1.1 - Version 1.1 was released in April 1992.
14// 1.2 - Added nDataFormat so that data can optionally be stored in floating point format.
15// - Added lClockChange to control the multiplexed ADC sample number after which the second sampling interval commences.
16// 1.3 - Change 4-byte sFileType string to long lFileSignature.
17// - #define ABF_NATIVESIGNATURE & ABF_REVERSESIGNATURE for byte order detection.
18// - Added support for Bells during before or after acquisitions
19// - Added parameters to describe hysteresis during event detected acquisitions: nLevelHysteresis and lTimeHysteresis.
20// - Dropped support for BASIC and Pascal.
21// - Added the ABF Scope Config section to store scope configuration information
22// 1.4 - Remove support for big-endian machines.
23// 1.5 - Change ABFSignal parameters from UUTop & UUBottom to
24// fDisplayGain & fDisplayOffset.
25// - Added and changed parameters in the 'File Structure', 'Display Parameters',
26// 'DAC Output File', 'Autopeak Measurements' and 'Unused space and end of header' sections of the ABF file header.
27// - Expanded the ABF API and error return codes
28// 1.6 - Expanded header to 5120 bytes and added extra parameters to support 2 waveform channels PRC
29// 1.65 - Telegraph support added.
30// 1.67 - Train epochs, multiple channel and multiple region stats
31// 1.68 - ABFScopeConfig expanded
32// 1.69 - Added user entered percentile levels for rise and decay stats
33// 1.70 - Added data reduction - AjD
34// 1.71 - Added epoch resistance
35// 1.72 - Added alternating outputs
36// 1.73 - Added post-processing lowpass filter settings. When filtering is done in Clampfit it is stored in the header.
37// 1.74 - Added channel_count_acquired
38// 1.75 - Added polarity for each channel
39// 1.76 - Added digital trigger out flag
40// 1.77 - Added major, minor and bugfix version numbers
41// 1.78 - Added separate entries for alternating DAC and digital outputs
42// 1.79 - Removed data reduction (now minidigi only)
43// 1.80 - Added stats mode for each region: mode is cursor region, epoch etc
44// 1.81 - Added multi input signal P / N leak subtraction
45// 1.82 - Cyclic Redundancy Code (CRC).
46// 1.83 - Added Modifier application name / version number
47//
48// Added 64bit support according to Jakub Nowacki's implementation in libaxon:
49// http://libaxon.sourceforge.net
50
51#ifndef INC_ABFHEADR_H
52#define INC_ABFHEADR_H
53
54#include <stdio.h>
55#include <string.h>
56
57#include "AxAbffio32.h"
58
59#ifdef __cplusplus
60extern "C" {
61#endif
62
63//
64// Constants used in defining the ABF file header
65//
66
67#define ABF_ADCCOUNT 16 // number of ADC channels supported.
68#define ABF_DACCOUNT 4 // number of DAC channels supported.
69#define ABF_WAVEFORMCOUNT 2 // number of DAC channels which support waveforms.
70#define ABF_EPOCHCOUNT 10 // number of waveform epochs supported.
71#define ABF_BELLCOUNT 2 // Number of auditory signals supported.
72#define ABF_ADCUNITLEN 8 // length of ADC units strings
73#define ABF_ADCNAMELEN 10 // length of ADC channel name strings
74#define ABF_DACUNITLEN 8 // length of DAC units strings
75#define ABF_DACNAMELEN 10 // length of DAC channel name strings
76#define ABF_VARPARAMLISTLEN 80 // length of conditioning string
77#define ABF_USERLISTLEN 256 // length of the user list (V1.6)
78#define ABF_USERLISTCOUNT 4 // number of independent user lists (V1.6)
79#define ABF_OLDFILECOMMENTLEN 56 // length of file comment string (pre V1.6)
80#define ABF_FILECOMMENTLEN 128 // length of file comment string (V1.6)
81
82#define ABF_CREATORINFOLEN 16 // length of file creator info string
83#define ABF_OLDDACFILENAMELEN 12 // old length of the DACFile name string
84#define ABF_OLDDACFILEPATHLEN 60 // old length of the DACFile path string
85#define ABF_DACFILEPATHLEN 84 // length of full path for DACFile
86#define ABF_PATHLEN 256 // length of full path, used for DACFile and Protocol name.
87#define ABF_ARITHMETICOPLEN 2 // length of the Arithmetic operator field
88#define ABF_ARITHMETICUNITSLEN 8 // length of arithmetic units string
89#define ABF_TAGCOMMENTLEN 56 // length of tag comment string
90#define ABF_LONGDESCRIPTIONLEN 56 // length of long description entry
91#define ABF_NOTENAMELEN 10 // length of the name component of a note
92#define ABF_NOTEVALUELEN 8 // length of the value component of a note
93#define ABF_NOTEUNITSLEN 8 // length of the units component of a note
94#define ABF_BLOCKSIZE 512 // Size of block alignment in ABF files.
95#define ABF_MACRONAMELEN 64 // Size of a Clampfit macro name.
96
97#define ABF_CURRENTVERSION ABF_V183 // Current file format version number
98#define ABF_PREVIOUSVERSION 1.5F // Previous file format version number (for old header size)
99#define ABF_V16 1.6F // Version number when the header size changed.
100#define ABF_HEADERSIZE 6144 // Size of a Version 1.6 or later header
101#define ABF_OLDHEADERSIZE 2048 // Size of a Version 1.5 or earlier header
102#define ABF_NATIVESIGNATURE 0x20464241 // PC="ABF ", MAC=" FBA"
103#define ABF_REVERSESIGNATURE 0x41424620 // PC=" FBA", MAC="ABF "
104
105#define PCLAMP6_MAXSWEEPLENGTH 16384 // Maximum multiplexed sweep length supported by pCLAMP6 apps.
106#define PCLAMP7_MAXSWEEPLEN_PERCHAN 1032258 // Maximum per channel sweep length supported by pCLAMP7 apps.
107
108#define ABF_MAX_TRIAL_SAMPLES 0x7FFFFFFF // Maximum length of acquisition supported (samples)
109 // INT_MAX is used instead of UINT_MAX because of the signed
110 // values in the ABF header.
111
112#define ABF_MAX_SWEEPS_PER_AVERAGE 65500 // The maximum number of sweeps that can be combined into a
113 // cumulative average (nAverageAlgorithm=ABF_INFINITEAVERAGE).
114
115#define ABF_STATS_REGIONS 8 // The number of independent statistics regions.
116#define ABF_BASELINE_REGIONS 1 // The number of independent baseline regions.
117
118#ifdef _MAC
119 #define ABF_OLDPCLAMP ABF_REVERSESIGNATURE
120#else
121 #define ABF_OLDPCLAMP ABF_NATIVESIGNATURE
122#endif
123
124//
125// Constant definitions for nFileType
126//
127#define ABF_ABFFILE 1
128#define ABF_FETCHEX 2
129#define ABF_CLAMPEX 3
130
131//
132// Constant definitions for nDataFormat
133//
134#define ABF_INTEGERDATA 0
135#define ABF_FLOATDATA 1
136
137//
138// Constant definitions for nOperationMode
139//
140#define ABF_VARLENEVENTS 1
141#define ABF_FIXLENEVENTS 2 // (ABF_FIXLENEVENTS == ABF_LOSSFREEOSC)
142#define ABF_LOSSFREEOSC 2
143#define ABF_GAPFREEFILE 3
144#define ABF_HIGHSPEEDOSC 4
145#define ABF_WAVEFORMFILE 5
146
147//
148// Constant definitions for nParamToVary
149//
150#define ABF_CONDITNUMPULSES 0
151#define ABF_CONDITBASELINEDURATION 1
152#define ABF_CONDITBASELINELEVEL 2
153#define ABF_CONDITSTEPDURATION 3
154#define ABF_CONDITSTEPLEVEL 4
155#define ABF_CONDITPOSTTRAINDURATION 5
156#define ABF_CONDITPOSTTRAINLEVEL 6
157#define ABF_EPISODESTARTTOSTART 7
158#define ABF_INACTIVEHOLDING 8
159#define ABF_DIGITALHOLDING 9
160#define ABF_PNNUMPULSES 10
161#define ABF_PARALLELVALUE 11
162#define ABF_EPOCHINITLEVEL (ABF_PARALLELVALUE + ABF_EPOCHCOUNT)
163#define ABF_EPOCHINITDURATION (ABF_EPOCHINITLEVEL + ABF_EPOCHCOUNT)
164#define ABF_EPOCHTRAINPERIOD (ABF_EPOCHINITDURATION + ABF_EPOCHCOUNT)
165#define ABF_EPOCHTRAINPULSEWIDTH (ABF_EPOCHTRAINPERIOD + ABF_EPOCHCOUNT)
166// Next value is (ABF_EPOCHINITDURATION + ABF_EPOCHCOUNT)
167
168//
169// Constants for nAveragingMode
170//
171#define ABF_NOAVERAGING 0
172#define ABF_SAVEAVERAGEONLY 1
173#define ABF_AVERAGESAVEALL 2
174
175//
176// Constants for nAverageAlgorithm
177//
178#define ABF_INFINITEAVERAGE 0
179#define ABF_SLIDINGAVERAGE 1
180
181//
182// Constants for nEpochType
183//
184#define ABF_EPOCHDISABLED 0 // disabled epoch
185#define ABF_EPOCHSTEPPED 1 // stepped waveform
186#define ABF_EPOCHRAMPED 2 // ramp waveform
187#define ABF_EPOCH_TYPE_RECTANGLE 3 // rectangular pulse train
188#define ABF_EPOCH_TYPE_TRIANGLE 4 // triangular waveform
189#define ABF_EPOCH_TYPE_COSINE 5 // cosinusoidal waveform
190#define ABF_EPOCH_TYPE_RESISTANCE 6 // resistance waveform
191#define ABF_EPOCH_TYPE_BIPHASIC 7 // biphasic pulse train
192
193//
194// Constants for epoch resistance
195//
196#define ABF_MIN_EPOCH_RESISTANCE_DURATION 8
197
198//
199// Constants for nWaveformSource
200//
201#define ABF_WAVEFORMDISABLED 0 // disabled waveform
202#define ABF_EPOCHTABLEWAVEFORM 1
203#define ABF_DACFILEWAVEFORM 2
204
205//
206// Constants for nInterEpisodeLevel & nDigitalInterEpisode
207//
208#define ABF_INTEREPI_USEHOLDING 0
209#define ABF_INTEREPI_USELASTEPOCH 1
210
211//
212// Constants for nExperimentType
213//
214#define ABF_VOLTAGECLAMP 0
215#define ABF_CURRENTCLAMP 1
216#define ABF_SIMPLEACQUISITION 2
217
218//
219// Constants for nAutosampleEnable
220//
221#define ABF_AUTOSAMPLEDISABLED 0
222#define ABF_AUTOSAMPLEAUTOMATIC 1
223#define ABF_AUTOSAMPLEMANUAL 2
224
225//
226// Constants for nAutosampleInstrument
227//
228#define ABF_INST_UNKNOWN 0 // Unknown instrument (manual or user defined telegraph table).
229#define ABF_INST_AXOPATCH1 1 // Axopatch-1 with CV-4-1/100
230#define ABF_INST_AXOPATCH1_1 2 // Axopatch-1 with CV-4-0.1/100
231#define ABF_INST_AXOPATCH1B 3 // Axopatch-1B(inv.) CV-4-1/100
232#define ABF_INST_AXOPATCH1B_1 4 // Axopatch-1B(inv) CV-4-0.1/100
233#define ABF_INST_AXOPATCH201 5 // Axopatch 200 with CV 201
234#define ABF_INST_AXOPATCH202 6 // Axopatch 200 with CV 202
235#define ABF_INST_GENECLAMP 7 // GeneClamp
236#define ABF_INST_DAGAN3900 8 // Dagan 3900
237#define ABF_INST_DAGAN3900A 9 // Dagan 3900A
238#define ABF_INST_DAGANCA1_1 10 // Dagan CA-1 Im=0.1
239#define ABF_INST_DAGANCA1 11 // Dagan CA-1 Im=1.0
240#define ABF_INST_DAGANCA10 12 // Dagan CA-1 Im=10
241#define ABF_INST_WARNER_OC725 13 // Warner OC-725
242#define ABF_INST_WARNER_OC725C 14 // Warner OC-725
243#define ABF_INST_AXOPATCH200B 15 // Axopatch 200B
244#define ABF_INST_DAGANPCONE0_1 16 // Dagan PC-ONE Im=0.1
245#define ABF_INST_DAGANPCONE1 17 // Dagan PC-ONE Im=1.0
246#define ABF_INST_DAGANPCONE10 18 // Dagan PC-ONE Im=10
247#define ABF_INST_DAGANPCONE100 19 // Dagan PC-ONE Im=100
248#define ABF_INST_WARNER_BC525C 20 // Warner BC-525C
249#define ABF_INST_WARNER_PC505 21 // Warner PC-505
250#define ABF_INST_WARNER_PC501 22 // Warner PC-501
251#define ABF_INST_DAGANCA1_05 23 // Dagan CA-1 Im=0.05
252#define ABF_INST_MULTICLAMP700 24 // MultiClamp 700
253#define ABF_INST_TURBO_TEC 25 // Turbo Tec
254#define ABF_INST_OPUSXPRESS6000 26 // OpusXpress 6000A
255
256//
257// Constants for nManualInfoStrategy
258//
259#define ABF_ENV_DONOTWRITE 0
260#define ABF_ENV_WRITEEACHTRIAL 1
261#define ABF_ENV_PROMPTEACHTRIAL 2
262
263//
264// Constants for nTriggerSource
265//
266#define ABF_TRIGGERLINEINPUT -5 // Start on line trigger (DD1320 only)
267#define ABF_TRIGGERTAGINPUT -4
268#define ABF_TRIGGERFIRSTCHANNEL -3
269#define ABF_TRIGGEREXTERNAL -2
270#define ABF_TRIGGERSPACEBAR -1
271// >=0 = ADC channel to trigger off.
272
273//
274// Constants for nTrialTriggerSource
275//
276#define ABF_TRIALTRIGGER_SWSTARTONLY -6 // Start on software message, end when protocol ends.
277#define ABF_TRIALTRIGGER_SWSTARTSTOP -5 // Start and end on software messages.
278#define ABF_TRIALTRIGGER_LINEINPUT -4 // Start on line trigger (DD1320 only)
279#define ABF_TRIALTRIGGER_SPACEBAR -3 // Start on spacebar press.
280#define ABF_TRIALTRIGGER_EXTERNAL -2 // Start on external trigger high
281#define ABF_TRIALTRIGGER_NONE -1 // Start immediately (default).
282// >=0 = ADC channel to trigger off. // Not implemented as yet...
283
284//
285// Constants for nTriggerPolarity.
286//
287#define ABF_TRIGGER_RISINGEDGE 0
288#define ABF_TRIGGER_FALLINGEDGE 1
289
290//
291// Constants for nTriggerAction
292//
293#define ABF_TRIGGER_STARTEPISODE 0
294#define ABF_TRIGGER_STARTRUN 1
295#define ABF_TRIGGER_STARTTRIAL 2 // N.B. Discontinued in favor of nTrialTriggerSource
296
297//
298// Constants for nDrawingStrategy
299//
300#define ABF_DRAW_NONE 0
301#define ABF_DRAW_REALTIME 1
302#define ABF_DRAW_FULLSCREEN 2
303#define ABF_DRAW_ENDOFRUN 3
304
305//
306// Constants for nTiledDisplay
307//
308#define ABF_DISPLAY_SUPERIMPOSED 0
309#define ABF_DISPLAY_TILED 1
310
311//
312// Constants for nDataDisplayMode
313//
314#define ABF_DRAW_POINTS 0
315#define ABF_DRAW_LINES 1
316
317//
318// Constants for nArithmeticExpression
319//
320#define ABF_SIMPLE_EXPRESSION 0
321#define ABF_RATIO_EXPRESSION 1
322
323//
324// Constants for nLowpassFilterType & nHighpassFilterType
325//
326#define ABF_FILTER_NONE 0
327#define ABF_FILTER_EXTERNAL 1
328#define ABF_FILTER_SIMPLE_RC 2
329#define ABF_FILTER_BESSEL 3
330#define ABF_FILTER_BUTTERWORTH 4
331
332//
333// Constants for nPNPosition
334//
335#define ABF_PN_BEFORE_EPISODE 0
336#define ABF_PN_AFTER_EPISODE 1
337
338//
339// Constants for nPNPolarity
340//
341#define ABF_PN_OPPOSITE_POLARITY -1
342#define ABF_PN_SAME_POLARITY 1
343
344//
345// Constants for nAutopeakPolarity
346//
347#define ABF_PEAK_NEGATIVE -1
348#define ABF_PEAK_ABSOLUTE 0
349#define ABF_PEAK_POSITIVE 1
350
351//
352// Constants for nAutopeakSearchMode
353//
354#define ABF_PEAK_SEARCH_SPECIFIED -2
355#define ABF_PEAK_SEARCH_ALL -1
356// nAutopeakSearchMode 0..9 = epoch in waveform 0's epoch table
357// nAutopeakSearchMode 10..19 = epoch in waveform 1's epoch table
358
359//
360// Constants for nAutopeakBaseline
361//
362#define ABF_PEAK_BASELINE_SPECIFIED -3
363#define ABF_PEAK_BASELINE_NONE -2
364#define ABF_PEAK_BASELINE_FIRSTHOLDING -1
365#define ABF_PEAK_BASELINE_LASTHOLDING -4
366
367//
368// Constants for lAutopeakMeasurements
369//
370#define ABF_PEAK_MEASURE_PEAK 0x00000001
371#define ABF_PEAK_MEASURE_PEAKTIME 0x00000002
372#define ABF_PEAK_MEASURE_ANTIPEAK 0x00000004
373#define ABF_PEAK_MEASURE_ANTIPEAKTIME 0x00000008
374#define ABF_PEAK_MEASURE_MEAN 0x00000010
375#define ABF_PEAK_MEASURE_STDDEV 0x00000020
376#define ABF_PEAK_MEASURE_INTEGRAL 0x00000040
377#define ABF_PEAK_MEASURE_MAXRISESLOPE 0x00000080
378#define ABF_PEAK_MEASURE_MAXRISESLOPETIME 0x00000100
379#define ABF_PEAK_MEASURE_MAXDECAYSLOPE 0x00000200
380#define ABF_PEAK_MEASURE_MAXDECAYSLOPETIME 0x00000400
381#define ABF_PEAK_MEASURE_RISETIME 0x00000800
382#define ABF_PEAK_MEASURE_DECAYTIME 0x00001000
383#define ABF_PEAK_MEASURE_HALFWIDTH 0x00002000
384#define ABF_PEAK_MEASURE_BASELINE 0x00004000
385#define ABF_PEAK_MEASURE_RISESLOPE 0x00008000
386#define ABF_PEAK_MEASURE_DECAYSLOPE 0x00010000
387#define ABF_PEAK_MEASURE_REGIONSLOPE 0x00020000
388#define ABF_PEAK_MEASURE_ALL 0x0002FFFF // All of the above OR'd together.
389
390//
391// Constants for nStatsActiveChannels
392//
393#define ABF_PEAK_SEARCH_CHANNEL0 0x0001
394#define ABF_PEAK_SEARCH_CHANNEL1 0x0002
395#define ABF_PEAK_SEARCH_CHANNEL2 0x0004
396#define ABF_PEAK_SEARCH_CHANNEL3 0x0008
397#define ABF_PEAK_SEARCH_CHANNEL4 0x0010
398#define ABF_PEAK_SEARCH_CHANNEL5 0x0020
399#define ABF_PEAK_SEARCH_CHANNEL6 0x0040
400#define ABF_PEAK_SEARCH_CHANNEL7 0x0080
401#define ABF_PEAK_SEARCH_CHANNEL8 0x0100
402#define ABF_PEAK_SEARCH_CHANNEL9 0x0200
403#define ABF_PEAK_SEARCH_CHANNEL10 0x0400
404#define ABF_PEAK_SEARCH_CHANNEL11 0x0800
405#define ABF_PEAK_SEARCH_CHANNEL12 0x1000
406#define ABF_PEAK_SEARCH_CHANNEL13 0x2000
407#define ABF_PEAK_SEARCH_CHANNEL14 0x4000
408#define ABF_PEAK_SEARCH_CHANNEL15 0x8000
409#define ABF_PEAK_SEARCH_CHANNELSALL 0xFFFF // All of the above OR'd together.
410
411// Bit flag settings for nStatsSearchRegionFlags
412//
413#define ABF_PEAK_SEARCH_REGION0 0x01
414#define ABF_PEAK_SEARCH_REGION1 0x02
415#define ABF_PEAK_SEARCH_REGION2 0x04
416#define ABF_PEAK_SEARCH_REGION3 0x08
417#define ABF_PEAK_SEARCH_REGION4 0x10
418#define ABF_PEAK_SEARCH_REGION5 0x20
419#define ABF_PEAK_SEARCH_REGION6 0x40
420#define ABF_PEAK_SEARCH_REGION7 0x80
421#define ABF_PEAK_SEARCH_REGIONALL 0xFF // All of the above OR'd together.
422
423//
424// Constants for lStatisticsMeasurements
425//
426#define ABF_STATISTICS_ABOVETHRESHOLD 0x00000001
427#define ABF_STATISTICS_EVENTFREQUENCY 0x00000002
428#define ABF_STATISTICS_MEANOPENTIME 0x00000004
429#define ABF_STATISTICS_MEANCLOSEDTIME 0x00000008
430#define ABF_STATISTICS_ALL 0x0000000F // All the above OR'd together.
431
432//
433// Constants for nStatisticsSaveStrategy
434//
435#define ABF_STATISTICS_NOAUTOSAVE 0
436#define ABF_STATISTICS_AUTOSAVE 1
437#define ABF_STATISTICS_AUTOSAVE_AUTOCLEAR 2
438
439//
440// Constants for nStatisticsDisplayStrategy
441//
442#define ABF_STATISTICS_DISPLAY 0
443#define ABF_STATISTICS_NODISPLAY 1
444
445//
446// Constants for nStatisticsClearStrategy
447// determines whether to clear statistics after saving.
448//
449#define ABF_STATISTICS_NOCLEAR 0
450#define ABF_STATISTICS_CLEAR 1
451
452//
453// Constants for nDACFileEpisodeNum
454//
455#define ABF_DACFILE_SKIPFIRSTSWEEP -1
456#define ABF_DACFILE_USEALLSWEEPS 0
457// >0 = The specific sweep number.
458
459//
460// Constants for nUndoPromptStrategy
461//
462#define ABF_UNDOPROMPT_ONABORT 0
463#define ABF_UNDOPROMPT_ALWAYS 1
464
465//
466// Constants for nAutoAnalyseEnable
467//
468#define ABF_AUTOANALYSE_DISABLED 0
469#define ABF_AUTOANALYSE_DEFAULT 1
470#define ABF_AUTOANALYSE_RUNMACRO 2
471
472//
473// Constants for post nPostprocessLowpassFilterType
474//
475#define ABF_POSTPROCESS_FILTER_NONE 0
476#define ABF_POSTPROCESS_FILTER_ADAPTIVE 1
477#define ABF_POSTPROCESS_FILTER_BESSEL 2
478#define ABF_POSTPROCESS_FILTER_BOXCAR 3
479#define ABF_POSTPROCESS_FILTER_BUTTERWORTH 4
480#define ABF_POSTPROCESS_FILTER_CHEBYSHEV 5
481#define ABF_POSTPROCESS_FILTER_GAUSSIAN 6
482#define ABF_POSTPROCESS_FILTER_RC 7
483#define ABF_POSTPROCESS_FILTER_RC8 8
484#define ABF_POSTPROCESS_FILTER_NOTCH 9
485
486
487//
488// Miscellaneous constants
489//
490#define ABF_FILTERDISABLED 100000.0F // Large frequency to disable lowpass filters
491#define ABF_UNUSED_CHANNEL -1 // Unused ADC and DAC channels.
492
493//
494// The output sampling sequence identifier for a seperate digital out channel.
495//
496#define ABF_DIGITAL_OUT_CHANNEL -1
497#define ABF_PADDING_OUT_CHANNEL -2
498
499//
500// maximum values for various parameters (used by ABFH_CheckUserList).
501//
502#define ABF_CTPULSECOUNT_MAX 10000
503#define ABF_CTBASELINEDURATION_MAX 100000.0F
504#define ABF_CTSTEPDURATION_MAX 100000.0F
505#define ABF_CTPOSTTRAINDURATION_MAX 100000.0F
506#define ABF_SWEEPSTARTTOSTARTTIME_MAX 100000.0F
507#define ABF_PNPULSECOUNT_MAX 8
508#define ABF_DIGITALVALUE_MAX 0xFF
509#define ABF_EPOCHDIGITALVALUE_MAX 0x0F
510
511//
512// LTP Types - Reflects whether the header is used for LTP as baseline or induction.
513//
514#define ABF_LTP_TYPE_NONE 0
515#define ABF_LTP_TYPE_BASELINE 1
516#define ABF_LTP_TYPE_INDUCTION 2
517
518//
519// LTP Usage of DAC - Reflects whether the analog output will be used presynaptically or postsynaptically.
520//
521#define ABF_LTP_DAC_USAGE_NONE 0
522#define ABF_LTP_DAC_USAGE_PRESYNAPTIC 1
523#define ABF_LTP_DAC_USAGE_POSTSYNAPTIC 2
524
525//
526// Header Version Numbers
527//
528#define ABF_V166 1.66F
529#define ABF_V167 1.67F
530#define ABF_V168 1.68F
531#define ABF_V169 1.69F
532#define ABF_V170 1.70F
533#define ABF_V171 1.71F
534#define ABF_V172 1.72F
535#define ABF_V173 1.73F
536#define ABF_V174 1.74F
537#define ABF_V175 1.75F
538#define ABF_V176 1.76F
539#define ABF_V177 1.77F
540#define ABF_V178 1.78F
541#define ABF_V179 1.79F
542#define ABF_V180 1.80F
543#define ABF_V181 1.81F
544#define ABF_V182 1.82F
545#define ABF_V183 1.83F
546
547
548//
549// pack structure on byte boundaries
550//
551
552#ifndef RC_INVOKED
553#pragma pack(push, 1)
554#endif
555
556//
557// Definition of the ABF header structure.
558//
559
560struct ABFFileHeader // The total header length = 6144 bytes.
561{
562public:
563 // GROUP #1 - File ID and size information. (40 bytes)
576
577 // GROUP #2 - File Structure (78 bytes)
585 char sUnused001[4];
598 char sUnused003[2];
599
600 // GROUP #3 - Trial hierarchy information (82 bytes)
606
613 /*{{
614 The documentation says these two sample intervals are the interval between multiplexed samples, but not all digitisers work like that.
615 Instead, these are the per-channel sample rate divided by the number of channels.
616 If the user chose 100uS and has two channels, this value will be 50uS.
617 }}*/
619 /*{{
620 // The two sample intervals must be an integer multiple (or submultiple) of each other.
621 if (fADCSampleInterval > fADCSecondSampleInterval)
622 ASSERT(fmod(fADCSampleInterval, fADCSecondSampleInterval) == 0.0);
623 if (fADCSecondSampleInterval, fADCSampleInterval)
624 ASSERT(fmod(fADCSecondSampleInterval, fADCSampleInterval) == 0.0);
625 }}*/
628
656
657 // GROUP #4 - Display Parameters (44 bytes)
660 short nEraseStrategy; // N.B. Discontinued. Use scope config entry instead.
664 ABFLONG lCalculationPeriod; // N.B. Discontinued. Use fStatisticsPeriod.
673
674 // GROUP #5 - Hardware information (16 bytes)
679
680 // GROUP #6 Environmental Information (118 bytes)
689 float fCellID1;
690 float fCellID2;
691 float fCellID3;
694 short nFileStartMillisecs; // Milliseconds portion of lFileStartTime
696 char sUnused003a[8];
697
698 // GROUP #7 - Multi-channel information (1044 bytes)
717 char sUnused004[10];
718
719 // GROUP #8 - Synchronous timer outputs (14 bytes)
727
728 // GROUP #9 - Epoch Waveform and Pulses (184 bytes)
741 char sUnavailable1608[4]; // was float fWaveformOffset;
743 char sUnused005[6];
744
745 // GROUP #10 - DAC Output File (98 bytes)
748 char sUnused006[2];
752
753 // GROUP #11 - Presweep (conditioning) pulse train (44 bytes)
763 char sUnused007[12];
764
765 // GROUP #12 - Variable parameter user list ( 82 bytes)
768
769 // GROUP #13 - Autopeak measurement (36 bytes)
779 char sUnavailable1866[2]; // Was nAutopeakSaveStrategy, use nStatisticsSaveStrategy
783
784 // GROUP #14 - Channel Arithmetic (52 bytes)
799 char sUnused008[2];
800
801 // GROUP #15 - On-line subtraction (34 bytes)
810 char sUnused009[12];
811
812 // GROUP #16 - Miscellaneous variables (82 bytes)
814
818
822
834 // Size of v1.5 header = 2048
835
836 // Extra parameters in v1.6
837 // EXTENDED GROUP #2 - File Structure (26 bytes)
840
841 // EXTENDED GROUP #3 - Trial Hierarchy
843 char sUnused010[6];
844
845 // EXTENDED GROUP #7 - Multi-channel information (62 bytes)
848 char sUnused011[30];
849
850 // GROUP #17 - Trains parameters (160 bytes)
853
854 // EXTENDED GROUP #9 - Epoch Waveform and Pulses ( 412 bytes)
863 short nDigitalTrainValue[ABF_EPOCHCOUNT]; // 2 * 10 = 20 bytes
864 short nDigitalTrainActiveLogic; // 2 bytes
865 char sUnused012[18];
866
867 // EXTENDED GROUP #10 - DAC Output File (552 bytes)
873 char sUnused013[12];
874
875 // EXTENDED GROUP #11 - Presweep (conditioning) pulse train (100 bytes)
884 char sUnused014[40];
885
886 // EXTENDED GROUP #12 - Variable parameter user list (1096 bytes)
891 char sUnused015[48];
892
893 // EXTENDED GROUP #15 - On-line subtraction (56 bytes)
900
901 // EXTENDED GROUP #6 Environmental Information (898 bytes)
909 char sUnused016a[24];
910
914
920 char sUnused017[76];
921
922 // EXTENDED GROUP #13 - Statistics measurements (388 bytes)
924 unsigned short nStatsActiveChannels; // Active stats channel bit flag
925 unsigned short nStatsSearchRegionFlags; // Active stats region bit flag
933 ABFLONG lStatsMeasurements[ABF_STATS_REGIONS]; // Measurement bit flag for each region
941 short nStatsSearchMode[ABF_STATS_REGIONS]; // Stats mode per region: mode is cursor region, epoch etc
942 char sUnused018[156];
943
944 // GROUP #18 - Application version data (16 bytes)
953
954 // GROUP #19 - LTP protocol (14 bytes)
955 short nLTPType;
958 char sUnused020[4];
959
960 // GROUP #20 - Digidata 132x Trigger out flag. (8 bytes)
962 char sUnused021[6];
963
964 // GROUP #21 - Epoch resistance (40 bytes)
967 char sUnused022[16];
968
969 // GROUP #22 - Alternating episodic mode (58 bytes)
974 char sUnused023[14];
975
976 // GROUP #23 - Post-processing actions (210 bytes)
979
980
981 // 6014 header bytes allocated + 130 header bytes not allocated
982 char sUnused2048[130];
983
985}; // Size = 6144
986
987// This structure is persisted, so the size MUST NOT CHANGE
988#if !defined(_WINDOWS) || defined(__MINGW32__)
989 #define C_ASSERT(e) extern void __C_ASSERT__(int [(e)?1:-1])
990#endif
991C_ASSERT(sizeof(ABFFileHeader) == 6144);
992
994{
995 // Set everything to 0.
996 memset( this, 0, sizeof(ABFFileHeader) );
997
998 // Set critical parameters so we can determine the version.
1003}
1004
1005/*
1006//
1007// Scope descriptor format.
1008//
1009#define ABF_FACESIZE 32
1010struct ABFLogFont
1011{
1012 short nHeight; // Height of the font in pixels.
1013// short lWidth; // use 0
1014// short lEscapement; // use 0
1015// short lOrientation; // use 0
1016 short nWeight; // MSWindows font weight value.
1017// char bItalic; // use 0
1018// char bUnderline; // use 0
1019// char bStrikeOut; // use 0
1020// char cCharSet; // use ANSI_CHARSET (0)
1021// char cOutPrecision; // use OUT_TT_PRECIS
1022// char cClipPrecision; // use CLIP_DEFAULT_PRECIS
1023// char cQuality; // use PROOF_QUALITY
1024 char cPitchAndFamily; // MSWindows pitch and family mask.
1025 char Unused[3]; // Unused space to maintain 4-byte packing.
1026 char szFaceName[ABF_FACESIZE];// Face name of the font.
1027}; // Size = 40
1028
1029struct ABFSignal
1030{
1031 char szName[ABF_ADCNAMELEN+2]; // ABF name length + '\0' + 1 for alignment.
1032 short nMxOffset; // Offset of the signal in the sampling sequence.
1033 DWORD rgbColor; // Pen color used to draw trace.
1034 char nPenWidth; // Pen width in pixels.
1035 char bDrawPoints; // TRUE = Draw disconnected points
1036 char bHidden; // TRUE = Hide the trace.
1037 char bFloatData; // TRUE = Floating point pseudo channel
1038 float fVertProportion; // Relative proportion of client area to use
1039 float fDisplayGain; // Display gain of trace in UserUnits
1040 float fDisplayOffset; // Display offset of trace in UserUnits
1041
1042// float fUUTop; // Top of window in UserUnits
1043// float fUUBottom; // Bottom of window in UserUnits
1044}; // Size = 34
1045
1049// The Following #defines appear to be largely unused in opur code base
1050// However there does exist a second set of #defines in AxScope32.h
1051// that REALLY defines what these bits in the header do.
1052// In particular it important to note that all 32 bits are in fact used internally
1055// Bit flags used in dwFlags field of ABFScopeConfig.
1056#define ABF_OVERLAPPED 0x00000001
1057#define ABF_DONTERASE 0x00000002
1058#define ABF_MONOCHROME 0x00000004
1059#define ABF_CLIPPING 0x00000008
1060#define ABF_HIDEHORZGRIDS 0x00000010
1061#define ABF_HIDEVERTGRIDS 0x00000020
1062#define ABF_FULLSCREEN 0x00000040
1063#define ABF_HIDEXAXIS 0x00000080
1064#define ABF_HIDEYAXIS 0x00000100
1065#define ABF_HIDEXSCROLL 0x00000200
1066#define ABF_HIDEYSCROLL 0x00000400
1067#define ABF_HIDESIGNALNAME 0x00000800
1068#define ABF_ENABLEZOOM 0x00001000
1069#define ABF_XSPINFROMCENTER 0x00002000
1070#define ABF_HIDEXSPINNER 0x00004000
1071#define ABF_LARGESPINNERS 0x00008000
1072#define ABF_PERSISTENCEMODE 0x00010000
1073#define ABF_CARDIACMODE 0x00020000
1074#define ABF_HIDETWIRLER 0x00040000
1075#define ABF_DISABLEUI 0x00080000
1077// #define ABF_INTERNALUSE 0xFFF00000
1078// Do not add extra bit flags ^^^ here they are used internally
1083
1084// Values for the wScopeMode field in ABFScopeConfig.
1085#define ABF_EPISODICMODE 0
1086#define ABF_CONTINUOUSMODE 1
1087//#define ABF_XYMODE 2
1088
1089// Values for the nEraseStrategy field in ABFScopeConfig.
1090#define ABF_ERASE_EACHSWEEP 0
1091#define ABF_ERASE_EACHRUN 1
1092#define ABF_ERASE_EACHTRIAL 2
1093#define ABF_ERASE_DONTERASE 3
1094
1095// Indexes into the rgbColor field of ABFScopeConfig.
1096#define ABF_BACKGROUNDCOLOR 0
1097#define ABF_GRIDCOLOR 1
1098#define ABF_THRESHOLDCOLOR 2
1099#define ABF_EVENTMARKERCOLOR 3
1100#define ABF_SEPARATORCOLOR 4
1101#define ABF_AVERAGECOLOR 5
1102#define ABF_OLDDATACOLOR 6
1103#define ABF_TEXTCOLOR 7
1104#define ABF_AXISCOLOR 8
1105#define ABF_ACTIVEAXISCOLOR 9
1106#define ABF_LASTCOLOR ABF_ACTIVEAXISCOLOR
1107#define ABF_SCOPECOLORS (ABF_LASTCOLOR+1)
1108
1109// Extended colors for rgbColorEx field in ABFScopeConfig
1110#define ABF_STATISTICS_REGION0 0
1111#define ABF_STATISTICS_REGION1 1
1112#define ABF_STATISTICS_REGION2 2
1113#define ABF_STATISTICS_REGION3 3
1114#define ABF_STATISTICS_REGION4 4
1115#define ABF_STATISTICS_REGION5 5
1116#define ABF_STATISTICS_REGION6 6
1117#define ABF_STATISTICS_REGION7 7
1118#define ABF_BASELINE_REGION 8
1119#define ABF_STOREDSWEEPCOLOR 9
1120#define ABF_LASTCOLOR_EX ABF_STOREDSWEEPCOLOR
1121#define ABF_SCOPECOLORS_EX (ABF_LASTCOLOR+1)
1122
1123// Values for the nDockState field in ABFScopeConfig
1124#define ABF_SCOPE_NOTDOCKED 0
1125#define ABF_SCOPE_DOCKED_TOP 1
1126#define ABF_SCOPE_DOCKED_LEFT 2
1127#define ABF_SCOPE_DOCKED_RIGHT 3
1128#define ABF_SCOPE_DOCKED_BOTTOM 4
1129
1130struct ABFScopeConfig
1131{
1132 // Section 1 scope configurations
1133 DWORD dwFlags; // Flags that are meaningful to the scope.
1134 DWORD rgbColor[ABF_SCOPECOLORS]; // Colors for the components of the scope.
1135 float fDisplayStart; // Start of the display area in ms.
1136 float fDisplayEnd; // End of the display area in ms.
1137 WORD wScopeMode; // Mode that the scope is in.
1138 char bMaximized; // TRUE = Scope parent is maximized.
1139 char bMinimized; // TRUE = Scope parent is minimized.
1140 short xLeft; // Coordinate of the left edge.
1141 short yTop; // Coordinate of the top edge.
1142 short xRight; // Coordinate of the right edge.
1143 short yBottom; // Coordinate of the bottom edge.
1144 ABFLogFont LogFont; // Description of current font.
1145 ABFSignal TraceList[ABF_ADCCOUNT]; // List of traces in current use.
1146 short nYAxisWidth; // Width of the YAxis region.
1147 short nTraceCount; // Number of traces described in TraceList.
1148 short nEraseStrategy; // Erase strategy.
1149 short nDockState; // Docked position.
1150 // Size 656
1151 // * Do not insert any new members above this point! *
1152 // Section 2 scope configurations for file version 1.68.
1153 short nSizeofOldStructure; // Unused byte to determine the offset of the version 2 data.
1154 DWORD rgbColorEx[ ABF_SCOPECOLORS_EX ]; // New color settings for stored sweep and cursors.
1155 short nAutoZeroState; // Status of the autozero selection.
1156 DWORD dwCursorsVisibleState; // Flag for visible status of cursors.
1157 DWORD dwCursorsLockedState; // Flag for enabled status of cursors.
1158 char sUnasigned[61];
1159 // Size 113
1160 ABFScopeConfig();
1161}; // Size = 769
1162
1163inline ABFScopeConfig::ABFScopeConfig()
1164{
1165 // Set everything to 0.
1166 memset( this, 0, sizeof(ABFScopeConfig) );
1167
1168 // Set critical parameters so we can determine the version.
1169 nSizeofOldStructure = 656;
1170}
1171*/
1172//
1173// Definition of the ABF synch array structure
1174//
1175
1177{
1178 ABFLONG lStart; // Start of the episode/event in fSynchTimeUnit units.
1179 ABFLONG lLength; // Length of the episode/event in multiplexed samples.
1180}; // Size = 8
1181
1182//
1183// Constants for nTagType in the ABFTag structure.
1184//
1185#define ABF_TIMETAG 0
1186#define ABF_COMMENTTAG 1
1187#define ABF_EXTERNALTAG 2
1188#define ABF_VOICETAG 3
1189#define ABF_NEWFILETAG 4
1190#define ABF_ANNOTATIONTAG 5 // Same as a comment tag except that nAnnotationIndex holds
1191 // the index of the annotation that holds extra information.
1192/*
1193//
1194// Definition of the ABF Tag structure
1195//
1196struct ABFTag
1197{
1198 ABFLONG lTagTime; // Time at which the tag was entered in fSynchTimeUnit units.
1199 char sComment[ABF_TAGCOMMENTLEN]; // Optional tag comment.
1200 short nTagType; // Type of tag ABF_TIMETAG, ABF_COMMENTTAG, ABF_EXTERNALTAG, ABF_VOICETAG, ABF_NEWFILETAG or ABF_ANNOTATIONTAG
1201 union
1202 {
1203 short nVoiceTagNumber; // If nTagType=ABF_VOICETAG, this is the number of this voice tag.
1204 short nAnnotationIndex; // If nTagType=ABF_ANNOTATIONTAG, this is the index of the corresponding annotation.
1205 };
1206}; // Size = 64
1207
1208// Comment inserted for externally acquired tags (expanded with spaces to ABF_TAGCOMMENTLEN).
1209#define ABF_EXTERNALTAGCOMMENT "<External>"
1210#define ABF_VOICETAGCOMMENT "<Voice Tag>"
1211
1212//
1213// Constants for nCompressionType in the ABFVoiceTagInfo structure.
1214//
1215#define ABF_COMPRESSION_NONE 0
1216#define ABF_COMPRESSION_PKWARE 1
1217//#define ABF_COMPRESSION_MPEG 2
1218
1219//
1220// Definition of the ABFVoiceTagInfo structure.
1221//
1222struct ABFVoiceTagInfo
1223{
1224 ABFLONG lTagNumber; // The tag number that corresponds to this VoiceTag
1225 ABFLONG lFileOffset; // Offset to this tag within the VoiceTag block
1226 ABFLONG lUncompressedSize; // Size of the voice tag expanded.
1227 ABFLONG lCompressedSize; // Compressed size of the tag.
1228 short nCompressionType; // Compression method used.
1229 short nSampleSize; // Size of the samples acquired.
1230 ABFLONG lSamplesPerSecond; // Rate at which the sound was acquired.
1231 DWORD dwCRC; // CRC used to check data integrity.
1232 WORD wChannels; // Number of channels in the tag (usually 1).
1233 WORD wUnused; // Unused space.
1234}; // Size 32
1235
1236//
1237// Constants for lParameterID in the ABFDelta structure.
1238//
1239// NOTE: If any changes are made to this list, the code in ABF_UpdateHeader must
1240// be updated to include the new items.
1241#define ABF_DELTA_HOLDING0 0
1242#define ABF_DELTA_HOLDING1 1
1243#define ABF_DELTA_HOLDING2 2
1244#define ABF_DELTA_HOLDING3 3
1245#define ABF_DELTA_DIGITALOUTS 4
1246#define ABF_DELTA_THRESHOLD 5
1247#define ABF_DELTA_PRETRIGGER 6
1248
1249// Because of lack of space, the Autosample Gain ID also contains the ADC number.
1250#define ABF_DELTA_AUTOSAMPLE_GAIN 100 // +ADC channel.
1251
1252// Because of lack of space, the Signal Gain ID also contains the ADC number.
1253#define ABF_DELTA_SIGNAL_GAIN 200 // +ADC channel.
1254
1255//
1256// Definition of the ABF Delta structure.
1257//
1258
1259struct ABFDelta
1260{
1261 ABFLONG lDeltaTime; // Time at which the parameter was changed in fSynchTimeUnit units.
1262 ABFLONG lParameterID; // Identifier for the parameter changed
1263 union
1264 {
1265 ABFLONG lNewParamValue; // Depending on the value of lParameterID
1266 float fNewParamValue; // this entry may be either a float or a long.
1267 };
1268}; // Size = 12
1269*/
1270
1271#ifndef RC_INVOKED
1272#pragma pack(pop) // return to default packing
1273#endif
1274
1275/*
1276//
1277// The size of the buffers to be passed to ABFH_GetWaveformVertor
1278//
1279#define ABFH_MAXVECTORS 30
1280*/
1281//
1282// Function prototypes for functions in ABFHEADR.C
1283//
1284
1286/*
1287void WINAPI ABFH_InitializeScopeConfig(const ABFFileHeader *pFH, ABFScopeConfig *pCfg);
1288
1289BOOL WINAPI ABFH_CheckScopeConfig(ABFFileHeader *pFH, ABFScopeConfig *pCfg);
1290
1291void WINAPI ABFH_GetADCDisplayRange( const ABFFileHeader *pFH, int nChannel,
1292 float *pfUUTop, float *pfUUBottom);
1293*/
1294void WINAPI ABFH_GetADCtoUUFactors( const ABFFileHeader *pFH, int nChannel,
1295 float *pfADCToUUFactor, float *pfADCToUUShift );
1296/*
1297void WINAPI ABFH_ClipADCUUValue(const ABFFileHeader *pFH, int nChannel, float *pfUUValue);
1298*/
1299void WINAPI ABFH_GetDACtoUUFactors( const ABFFileHeader *pFH, int nChannel,
1300 float *pfDACToUUFactor, float *pfDACToUUShift );
1301/*
1302void WINAPI ABFH_ClipDACUUValue(const ABFFileHeader *pFH, int nChannel, float *pfUUValue);
1303*/
1304BOOL WINAPI ABFH_GetMathValue(const ABFFileHeader *pFH, float fA, float fB, float *pfRval);
1305/*
1306int WINAPI ABFH_GetMathChannelName(char *pszName, UINT uNameLen);
1307*/
1309/*
1310BOOL WINAPI ABFH_ParamReaderEx( HANDLE hFile, ABFFileHeader *pFH, int *pnError );
1311BOOL WINAPI ABFH_ParamWriter( HANDLE hFile, ABFFileHeader *pFH, int *pnError );
1312*/
1313BOOL WINAPI ABFH_GetErrorText( int nError, char *pszBuffer, UINT nBufferSize );
1314/*
1315// ABFHWAVE.CPP
1316
1317// Constants for ABFH_GetEpochLimits
1318#define ABFH_FIRSTHOLDING -1
1319#define ABFH_LASTHOLDING ABF_EPOCHCOUNT
1320
1321// Return the bounds of a given epoch in a given episode. Values returned are ZERO relative.
1322BOOL WINAPI ABFH_GetEpochLimits(const ABFFileHeader *pFH, int nADCChannel, DWORD dwEpisode,
1323 int nEpoch, UINT *puEpochStart, UINT *puEpochEnd,
1324 int *pnError);
1325
1326BOOL WINAPI ABFH_GetEpochLimitsEx(const ABFFileHeader *pFH, int nADCChannel, UINT uDACChannel, DWORD dwEpisode,
1327 int nEpoch, UINT *puEpochStart, UINT *puEpochEnd,
1328 int *pnError);
1329*/
1330// Get the offset in the sampling sequence for the given physical channel.
1331BOOL WINAPI ABFH_GetChannelOffset( const ABFFileHeader *pFH, int nChannel, UINT *puChannelOffset );
1332/*
1333// This function forms the de-multiplexed DAC output waveform for the
1334// particular channel in the pfBuffer, in DAC UserUnits.
1335BOOL WINAPI ABFH_GetWaveform( const ABFFileHeader *pFH, int nADCChannel, DWORD dwEpisode,
1336 float *pfBuffer, int *pnError);
1337
1338BOOL WINAPI ABFH_GetWaveformEx( const ABFFileHeader *pFH, UINT uDACChannel, DWORD dwEpisode,
1339 float *pfBuffer, int *pnError);
1340
1341// This function forms the de-multiplexed Digital output waveform for the
1342// particular channel in the pdwBuffer, as a bit mask. Digital OUT 0 is in bit 0.
1343BOOL WINAPI ABFH_GetDigitalWaveform( const ABFFileHeader *pFH, int nChannel, DWORD dwEpisode,
1344 DWORD *pdwBuffer, int *pnError);
1345
1346// Returns vector pairs for displaying a waveform made up of epochs.
1347BOOL WINAPI ABFH_GetWaveformVector(const ABFFileHeader *pFH, DWORD dwEpisode, UINT uStart,
1348 UINT uFinish, float *pfLevels, float *pfTimes,
1349 int *pnVectors, int *pnError);
1350
1351// Returns vector pairs for displaying the digital outs.
1352BOOL WINAPI ABFH_GetDigitalWaveformVector(const ABFFileHeader *pFH, DWORD dwEpisode, UINT uStart,
1353 UINT uFinish, DWORD *pdwLevels, float *pfTimes,
1354 int *pnVectors, int *pnError);
1355
1356// Calculates the timebase array for the file.
1357void WINAPI ABFH_GetTimebase(const ABFFileHeader *pFH, float fTimeOffset, float *pfBuffer, UINT uBufferSize);
1358void WINAPI ABFH_GetTimebaseEx(const ABFFileHeader *pFH, double dTimeOffset, double *pdBuffer, UINT uBufferSize);
1359
1360// Constant for ABFH_GetHoldingDuration
1361#define ABFH_HOLDINGFRACTION 64
1362
1363// Get the duration of the first holding period.
1364UINT WINAPI ABFH_GetHoldingDuration(const ABFFileHeader *pFH);
1365
1366// Checks whether the waveform varies from episode to episode.
1367BOOL WINAPI ABFH_IsConstantWaveform(const ABFFileHeader *pFH);
1368
1369BOOL WINAPI ABFH_IsConstantWaveformEx(const ABFFileHeader *pFH, UINT uDACChannel);
1370
1371// Checks that the sample intervals in the header are valid.
1372BOOL WINAPI ABFH_CheckSampleIntervals(const ABFFileHeader *pFH, float fClockResolution, int *pnError);
1373
1374// Gets the closest sample intervals higher and lower than the passed interval.
1375void WINAPI ABFH_GetClosestSampleIntervals(float fSampleInterval, float fClockResolution,
1376 int nOperationMode, float fMinPeriod, float fMaxPeriod,
1377 float *pfHigher, float *pfLower);
1378
1379// Sets up the list for the spinner to drive the sampling interval through.
1380UINT WINAPI ABFH_SetupSamplingList(UINT uNumChannels, float fMinPeriod, float fMaxPeriod,
1381 float *pfIntervalList, UINT uListEntries);
1382
1383// Get the full sweep length given the length available to epochs or vice-versa.
1384int WINAPI ABFH_SweepLenFromUserLen(int nUserLength, int nNumChannels);
1385int WINAPI ABFH_UserLenFromSweepLen(int nSweepLength, int nNumChannels);
1386
1387// Converts a display range to the equivalent gain and offset factors.
1388void WINAPI ABFH_GainOffsetToDisplayRange( const ABFFileHeader *pFH, int nChannel,
1389 float fDisplayGain, float fDisplayOffset,
1390 float *pfUUTop, float *pfUUBottom);
1391
1392// Converts a display range to the equivalent gain and offset factors.
1393void WINAPI ABFH_DisplayRangeToGainOffset( const ABFFileHeader *pFH, int nChannel,
1394 float fUUTop, float fUUBottom,
1395 float *pfDisplayGain, float *pfDisplayOffset);
1396
1397// Converts a time value to a synch time count or vice-versa.
1398void WINAPI ABFH_SynchCountToMS(const ABFFileHeader *pFH, UINT uCount, double *pdTimeMS);
1399UINT WINAPI ABFH_MSToSynchCount(const ABFFileHeader *pFH, double dTimeMS);
1400
1401// Gets the point at which the sampling interval changes if split clock.
1402UINT WINAPI ABFH_GetClockChange(const ABFFileHeader *pFH);
1403
1404// Gets the duration of the Waveform Episode (in us), allowing for split clock etc.
1405void WINAPI ABFH_GetEpisodeDuration(const ABFFileHeader *pFH, double *pdEpisodeDuration);
1406
1407// Gets the duration of a P/N sequence (in us), including settling times.
1408void WINAPI ABFH_GetPNDuration(const ABFFileHeader *pFH, double *pdPNDuration);
1409
1410void WINAPI ABFH_GetPNDurationEx(const ABFFileHeader *pFH, UINT uDAC, double *pdPNDuration);
1411
1412// Gets the duration of a pre-sweep train in us.
1413void WINAPI ABFH_GetTrainDuration(const ABFFileHeader *pFH, double *pdTrainDuration);
1414
1415void WINAPI ABFH_GetTrainDurationEx (const ABFFileHeader *pFH, UINT uDAC, double *pdTrainDuration);
1416
1417// Gets the duration of a whole meta-episode (in us).
1418void WINAPI ABFH_GetMetaEpisodeDuration(const ABFFileHeader *pFH, double *pdMetaEpisodeDuration);
1419
1420// Gets the start to start period for the episode in us.
1421void WINAPI ABFH_GetEpisodeStartToStart(const ABFFileHeader *pFH, double *pdEpisodeStartToStart);
1422
1423// Checks that the user list contains valid entries for the protocol.
1424BOOL WINAPI ABFH_CheckUserList(const ABFFileHeader *pFH, int *pnError);
1425
1426BOOL WINAPI ABFH_CheckUserListEx(const ABFFileHeader *pFH, UINT uListNum, int *pnError);
1427*/
1428// Checks if the ABFFileHeader is a new (6k) or old (2k) header.
1430
1431// Demotes a new ABF header to a 1.5 version ABF header.
1433
1434// Promotes an old ABF header to a 1.8 version ABF header.
1436
1437// Gets the first sample interval, expressed as a double.
1439/*
1440// Gets the second sample interval expressed as a double.
1441double WINAPI ABFH_GetSecondSampleInterval( const ABFFileHeader *pFH );
1442
1443// Counts the number of changing sweeps.
1444UINT WINAPI ABFH_GetNumberOfChangingSweeps( const ABFFileHeader *pFH );
1445
1446// // Checks whether the digital output varies from episode to episode.
1447BOOL WINAPI ABFH_IsConstantDigitalOutput(const ABFFileHeader *pFH);
1448
1449BOOL WINAPI ABFH_IsConstantDigitalOutputEx(const ABFFileHeader *pFH, UINT uDACChannel);
1450
1451int WINAPI ABFH_GetEpochDuration(const ABFFileHeader *pFH, UINT uDACChannel, UINT uEpisode, int nEpoch);
1452
1453float WINAPI ABFH_GetEpochLevel(const ABFFileHeader *pFH, UINT uDACChannel, UINT uEpisode, int nEpoch);
1454BOOL WINAPI ABFH_GetEpochLevelRange(const ABFFileHeader *pFH, UINT uDACChannel, int nEpoch, float *pfMin, float *pfMax);
1455UINT WINAPI ABFH_GetMaxPNSubsweeps(const ABFFileHeader *pFH, UINT uDACChannel);
1456*/
1457//
1458// Error return values that may be returned by the ABFH_xxx functions.
1459//
1460
1461#define ABFH_FIRSTERRORNUMBER 2001
1462#define ABFH_EHEADERREAD 2001
1463#define ABFH_EHEADERWRITE 2002
1464#define ABFH_EINVALIDFILE 2003
1465#define ABFH_EUNKNOWNFILETYPE 2004
1466#define ABFH_CHANNELNOTSAMPLED 2005
1467#define ABFH_EPOCHNOTPRESENT 2006
1468#define ABFH_ENOWAVEFORM 2007
1469#define ABFH_EDACFILEWAVEFORM 2008
1470#define ABFH_ENOMEMORY 2009
1471#define ABFH_BADSAMPLEINTERVAL 2010
1472#define ABFH_BADSECONDSAMPLEINTERVAL 2011
1473#define ABFH_BADSAMPLEINTERVALS 2012
1474#define ABFH_ENOCONDITTRAINS 2013
1475#define ABFH_EMETADURATION 2014
1476#define ABFH_ECONDITNUMPULSES 2015
1477#define ABFH_ECONDITBASEDUR 2016
1478#define ABFH_ECONDITBASELEVEL 2017
1479#define ABFH_ECONDITPOSTTRAINDUR 2018
1480#define ABFH_ECONDITPOSTTRAINLEVEL 2019
1481#define ABFH_ESTART2START 2020
1482#define ABFH_EINACTIVEHOLDING 2021
1483#define ABFH_EINVALIDCHARS 2022
1484#define ABFH_ENODIG 2023
1485#define ABFH_EDIGHOLDLEVEL 2024
1486#define ABFH_ENOPNPULSES 2025
1487#define ABFH_EPNNUMPULSES 2026
1488#define ABFH_ENOEPOCH 2027
1489#define ABFH_EEPOCHLEN 2028
1490#define ABFH_EEPOCHINITLEVEL 2029
1491#define ABFH_EDIGLEVEL 2030
1492#define ABFH_ECONDITSTEPDUR 2031
1493#define ABFH_ECONDITSTEPLEVEL 2032
1494#define ABFH_EINVALIDBINARYCHARS 2033
1495#define ABFH_EBADWAVEFORM 2034
1496
1497
1498#ifdef __cplusplus
1499}
1500#endif
1501
1502#endif /* INC_ABFHEADR_H */
#define ABFLONG
Definition AxAbffio32.h:21
#define C_ASSERT(e)
Definition IgorBin.h:13
BOOL WINAPI ABFH_GetMathValue(const ABFFileHeader *pFH, float fA, float fB, float *pfRval)
#define ABF_HEADERSIZE
Definition abfheadr.h:100
#define ABF_ADCCOUNT
Definition abfheadr.h:67
#define ABF_BELLCOUNT
Definition abfheadr.h:71
#define ABF_NATIVESIGNATURE
Definition abfheadr.h:102
#define ABF_ADCNAMELEN
Definition abfheadr.h:73
#define ABF_ADCUNITLEN
Definition abfheadr.h:72
void WINAPI ABFH_GetADCtoUUFactors(const ABFFileHeader *pFH, int nChannel, float *pfADCToUUFactor, float *pfADCToUUShift)
#define ABF_CREATORINFOLEN
Definition abfheadr.h:82
#define ABF_PATHLEN
Definition abfheadr.h:86
#define ABF_DACFILEPATHLEN
Definition abfheadr.h:85
#define ABF_STATS_REGIONS
Definition abfheadr.h:115
#define ABF_FILECOMMENTLEN
Definition abfheadr.h:80
#define ABF_DACUNITLEN
Definition abfheadr.h:74
void WINAPI ABFH_PromoteHeader(ABFFileHeader *pOut, const ABFFileHeader *pIn)
#define ABF_EPOCHCOUNT
Definition abfheadr.h:70
#define ABF_USERLISTLEN
Definition abfheadr.h:77
void WINAPI ABFH_DemoteHeader(ABFFileHeader *pOut, const ABFFileHeader *pIn)
double WINAPI ABFH_GetFirstSampleInterval(const ABFFileHeader *pFH)
#define ABF_ARITHMETICUNITSLEN
Definition abfheadr.h:88
#define ABF_USERLISTCOUNT
Definition abfheadr.h:78
void WINAPI ABFH_Initialize(ABFFileHeader *pFH)
#define ABF_DACNAMELEN
Definition abfheadr.h:75
#define ABF_MACRONAMELEN
Definition abfheadr.h:95
#define ABF_CURRENTVERSION
Definition abfheadr.h:97
#define ABF_DACCOUNT
Definition abfheadr.h:68
#define ABF_VARPARAMLISTLEN
Definition abfheadr.h:76
void WINAPI ABFH_GetDACtoUUFactors(const ABFFileHeader *pFH, int nChannel, float *pfDACToUUFactor, float *pfDACToUUShift)
#define ABF_WAVEFORMCOUNT
Definition abfheadr.h:69
BOOL WINAPI ABFH_IsNewHeader(const ABFFileHeader *pFH)
#define ABF_ARITHMETICOPLEN
Definition abfheadr.h:87
#define ABF_OLDFILECOMMENTLEN
Definition abfheadr.h:79
BOOL WINAPI ABFH_GetErrorText(int nError, char *pszBuffer, UINT nBufferSize)
BOOL WINAPI ABFH_GetChannelOffset(const ABFFileHeader *pFH, int nChannel, UINT *puChannelOffset)
BOOL WINAPI ABFH_ParamReader(FILEHANDLE hFile, ABFFileHeader *pFH, int *pnError)
short nADCSamplingSeq[ABF_ADCCOUNT]
Definition abfheadr.h:700
short nDD132xTriggerOut
Definition abfheadr.h:961
char sULParamValueList[ABF_USERLISTCOUNT][ABF_USERLISTLEN]
Definition abfheadr.h:889
short nAutoAnalyseEnable
Definition abfheadr.h:911
short nPNNumPulses
Definition abfheadr.h:805
short nCreatorMinorVersion
Definition abfheadr.h:946
short nRiseTopPercentile[ABF_STATS_REGIONS]
Definition abfheadr.h:937
short nModifierMajorVersion
Definition abfheadr.h:949
short nAveragingMode
Definition abfheadr.h:642
float fArithmeticK2
Definition abfheadr.h:791
float fADCDisplayOffset[ABF_ADCCOUNT]
Definition abfheadr.h:705
short _nInterEpisodeLevel
Definition abfheadr.h:732
float fSecondsPerRun
Definition abfheadr.h:627
short _nPNEnable
Definition abfheadr.h:802
short nBellEnable[ABF_BELLCOUNT]
Definition abfheadr.h:815
float fInstrumentScaleFactor[ABF_ADCCOUNT]
Definition abfheadr.h:706
float fPNSettlingTime
Definition abfheadr.h:808
float _fAutosampleAdditGain
Definition abfheadr.h:685
short _nAutopeakPolarity
Definition abfheadr.h:771
ABFLONG lDACResolution
Definition abfheadr.h:678
ABFLONG lNumDeltas
Definition abfheadr.h:587
ABFLONG lPreTriggerSamples
Definition abfheadr.h:638
short nArithmeticEnable
Definition abfheadr.h:785
short nStatsEnable
Definition abfheadr.h:923
short nSimultaneousScan
Definition abfheadr.h:594
short nFileType
Definition abfheadr.h:574
ABFLONG lFinishDisplayNum
Definition abfheadr.h:667
short _nParamToVary
Definition abfheadr.h:766
float _fPostTrainLevel
Definition abfheadr.h:762
float fPNInterpulse
Definition abfheadr.h:809
ABFLONG _lAutopeakEnd
Definition abfheadr.h:775
short nStatisticsSaveStrategy
Definition abfheadr.h:672
ABFLONG lEpochPulsePeriod[ABF_WAVEFORMCOUNT][ABF_EPOCHCOUNT]
Definition abfheadr.h:851
short nBellRepetitions[ABF_BELLCOUNT]
Definition abfheadr.h:817
short nPNPosition
Definition abfheadr.h:803
char sUnavailable1866[2]
Definition abfheadr.h:779
char sUnused005[6]
Definition abfheadr.h:743
short nStatisticsDisplayStrategy
Definition abfheadr.h:829
float fADCProgrammableGain[ABF_ADCCOUNT]
Definition abfheadr.h:703
float fCellID2
Definition abfheadr.h:690
float fDACCalibrationOffset[ABF_DACCOUNT]
Definition abfheadr.h:847
char nPNADCSamplingSeq[ABF_WAVEFORMCOUNT][ABF_ADCCOUNT]
Definition abfheadr.h:899
short nTriggerPolarity
Definition abfheadr.h:648
float fEpisodeStartToStart
Definition abfheadr.h:650
short nCreatorBugfixVersion
Definition abfheadr.h:947
float fHeaderVersionNumber
Definition abfheadr.h:573
ABFLONG lActualEpisodes
Definition abfheadr.h:569
float fArithmeticK4
Definition abfheadr.h:793
ABFLONG lDeltaArrayPtr
Definition abfheadr.h:586
ABFLONG lActualAcqLength
Definition abfheadr.h:567
short nAlternateDigitalOutputState
Definition abfheadr.h:973
short nAlternateDigitalValue[ABF_EPOCHCOUNT]
Definition abfheadr.h:971
float _fAutosampleFilter
Definition abfheadr.h:686
short nDigitalHolding
Definition abfheadr.h:738
ABFLONG lNumberOfTrials
Definition abfheadr.h:641
char sProtocolPath[ABF_PATHLEN]
Definition abfheadr.h:913
ABFLONG lClockChange
Definition abfheadr.h:654
short nMultiColor
Definition abfheadr.h:668
short _nAutopeakSearchMode
Definition abfheadr.h:773
ABFLONG lDACFilePtr[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:838
float fADCSampleInterval
Definition abfheadr.h:612
ABFLONG lStatisticsConfigPtr
Definition abfheadr.h:595
short nLastEpisodeOUT
Definition abfheadr.h:724
char sDACChannelName[ABF_DACCOUNT][ABF_DACNAMELEN]
Definition abfheadr.h:712
short nModifierBugfixVersion
Definition abfheadr.h:951
char sUnused020[4]
Definition abfheadr.h:958
char sADCChannelName[ABF_ADCCOUNT][ABF_ADCNAMELEN]
Definition abfheadr.h:701
short nCreatorMajorVersion
Definition abfheadr.h:945
float fADCDisplayAmplification[ABF_ADCCOUNT]
Definition abfheadr.h:704
char sUnused004[10]
Definition abfheadr.h:717
short nULEnable[ABF_USERLISTCOUNT]
Definition abfheadr.h:887
short nBellLocation[ABF_BELLCOUNT]
Definition abfheadr.h:816
ABFLONG lStopwatchTime
Definition abfheadr.h:572
short nAllowExternalTags
Definition abfheadr.h:821
float fSignalGain[ABF_ADCCOUNT]
Definition abfheadr.h:708
short nStatsSmoothing
Definition abfheadr.h:928
short nStatsBaseline
Definition abfheadr.h:930
float _fDACFileOffset
Definition abfheadr.h:747
short channel_count_acquired
Definition abfheadr.h:605
short _nDACFileADCNum
Definition abfheadr.h:750
short nAverageAlgorithm
Definition abfheadr.h:825
ABFLONG lTagSectionPtr
Definition abfheadr.h:579
ABFLONG lDataSectionPtr
Definition abfheadr.h:578
short nRiseBottomPercentile[ABF_STATS_REGIONS]
Definition abfheadr.h:936
ABFLONG _lAutopeakBaselineEnd
Definition abfheadr.h:781
float fDACScaleFactor[ABF_DACCOUNT]
Definition abfheadr.h:714
char sUnused021[6]
Definition abfheadr.h:962
short nWaveformEnable[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:855
char sFileComment[ABF_FILECOMMENTLEN]
Definition abfheadr.h:915
short nDigitalTrainActiveLogic
Definition abfheadr.h:864
char sUnused006[2]
Definition abfheadr.h:748
short nNumPointsIgnored
Definition abfheadr.h:568
char sDACChannelUnits[ABF_DACCOUNT][ABF_DACUNITLEN]
Definition abfheadr.h:713
char sUnused012[18]
Definition abfheadr.h:865
short nLTPUsageOfDAC[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:956
ABFLONG lStatsBaselineEnd
Definition abfheadr.h:932
ABFLONG lDACFileEpisodeNum[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:870
ABFLONG lRunsPerTrial
Definition abfheadr.h:640
float fSignalLowpassFilter[ABF_ADCCOUNT]
Definition abfheadr.h:710
short _nAutopeakADCNum
Definition abfheadr.h:772
short _nWaveformSource
Definition abfheadr.h:730
float _fPostTrainPeriod
Definition abfheadr.h:761
short nInterEpisodeLevel[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:857
float fArithmeticK3
Definition abfheadr.h:792
ABFLONG _lDACFileNumEpisodes
Definition abfheadr.h:584
float fSynchTimeUnit
Definition abfheadr.h:626
short _nListEnable
Definition abfheadr.h:813
float fArithmeticUpperLimit
Definition abfheadr.h:786
short nEpochType[ABF_WAVEFORMCOUNT][ABF_EPOCHCOUNT]
Definition abfheadr.h:858
float fADCRange
Definition abfheadr.h:675
char _sDACFilePath[ABF_DACFILEPATHLEN]
Definition abfheadr.h:751
float fADCSecondSampleInterval
Definition abfheadr.h:618
char _sParamValueList[ABF_VARPARAMLISTLEN]
Definition abfheadr.h:767
ABFLONG lStatsStart[ABF_STATS_REGIONS]
Definition abfheadr.h:934
short nStatsSelectedRegion
Definition abfheadr.h:926
float _fEpochInitLevel[ABF_EPOCHCOUNT]
Definition abfheadr.h:734
short nFirstEpisodeInRun
Definition abfheadr.h:644
short nFirstEpisodeOUT
Definition abfheadr.h:723
float fArithmeticK5
Definition abfheadr.h:796
short _nAutosampleInstrument
Definition abfheadr.h:684
short nCreatorBuildVersion
Definition abfheadr.h:948
short nManualInfoStrategy
Definition abfheadr.h:688
char sUnused013[12]
Definition abfheadr.h:873
float fStepLevel[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:881
short _nStatsSearchMode
Definition abfheadr.h:927
float _fStepDuration
Definition abfheadr.h:759
short nDigitalDACChannel
Definition abfheadr.h:742
ABFLONG lEpochPulseWidth[ABF_WAVEFORMCOUNT][ABF_EPOCHCOUNT]
Definition abfheadr.h:852
short nTelegraphMode[ABF_ADCCOUNT]
Definition abfheadr.h:907
ABFLONG _lAutopeakBaselineStart
Definition abfheadr.h:780
ABFLONG lNumAnnotations
Definition abfheadr.h:597
short nPNPolarity[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:895
short nULRepeat[ABF_USERLISTCOUNT]
Definition abfheadr.h:890
float fPostTrainPeriod[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:882
short nOperationMode
Definition abfheadr.h:566
short nExternalTagType
Definition abfheadr.h:830
short nDigitalValue[ABF_EPOCHCOUNT]
Definition abfheadr.h:740
ABFLONG lUnused002
Definition abfheadr.h:590
short nDigitalInterEpisode
Definition abfheadr.h:739
float fCellID3
Definition abfheadr.h:691
short nPNEnable[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:894
float fAverageWeighting
Definition abfheadr.h:826
ABFLONG lHeaderSize
Definition abfheadr.h:831
short nSampleNumberOUT2
Definition abfheadr.h:722
float fDACFileOffset[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:869
char sUnused011[30]
Definition abfheadr.h:848
char sUnused001[4]
Definition abfheadr.h:585
float fArithmeticK6
Definition abfheadr.h:797
short _nDACFileEpisodeNum
Definition abfheadr.h:749
short nAutoTriggerStrategy
Definition abfheadr.h:655
short nAlternateDigitalTrainValue[ABF_EPOCHCOUNT]
Definition abfheadr.h:972
ABFLONG lStatsBaselineStart
Definition abfheadr.h:931
char sEpochResistanceSignalName[ABF_WAVEFORMCOUNT][ABF_ADCNAMELEN]
Definition abfheadr.h:965
short nTelegraphInstrument[ABF_ADCCOUNT]
Definition abfheadr.h:903
float _fStepLevel
Definition abfheadr.h:760
float fTelegraphMembraneCap[ABF_ADCCOUNT]
Definition abfheadr.h:906
float fBaselineDuration[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:878
char _sFileComment[ABF_OLDFILECOMMENTLEN]
Definition abfheadr.h:693
short nShowPNRawData
Definition abfheadr.h:669
short nStatsSearchMode[ABF_STATS_REGIONS]
Definition abfheadr.h:941
short _nAutosampleEnable
Definition abfheadr.h:682
short nPNNumADCChannels[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:898
short nModifierBuildVersion
Definition abfheadr.h:952
char sUnused010[6]
Definition abfheadr.h:843
short nArithmeticADCNumB
Definition abfheadr.h:789
char sArithmeticOperator[ABF_ARITHMETICOPLEN]
Definition abfheadr.h:794
ABFLONG lNumTagEntries
Definition abfheadr.h:580
float _fBaselineLevel
Definition abfheadr.h:758
ABFLONG lSynchArrayPtr
Definition abfheadr.h:591
float fSignalOffset[ABF_ADCCOUNT]
Definition abfheadr.h:709
float fRunStartToStart
Definition abfheadr.h:651
ABFLONG _lDACFilePtr
Definition abfheadr.h:583
short nSampleNumberOUT1
Definition abfheadr.h:721
unsigned short nStatsSearchRegionFlags
Definition abfheadr.h:925
char sCreatorInfo[ABF_CREATORINFOLEN]
Definition abfheadr.h:692
char sUnused016a[24]
Definition abfheadr.h:909
char sUnused015[48]
Definition abfheadr.h:891
short nActiveDACChannel
Definition abfheadr.h:731
short nDataFormat
Definition abfheadr.h:593
short nCommentsEnable
Definition abfheadr.h:695
ABFLONG lScopeConfigPtr
Definition abfheadr.h:581
short nAlternateDACOutputState
Definition abfheadr.h:970
ABFLONG lNumScopes
Definition abfheadr.h:582
short nArithmeticExpression
Definition abfheadr.h:798
short nModifierMinorVersion
Definition abfheadr.h:950
short nTriggerSource
Definition abfheadr.h:646
char sADCUnits[ABF_ADCCOUNT][ABF_ADCUNITLEN]
Definition abfheadr.h:702
float fDACRange
Definition abfheadr.h:676
ABFLONG lVoiceTagPtr
Definition abfheadr.h:588
char sUnused003a[8]
Definition abfheadr.h:696
short nTiledDisplay
Definition abfheadr.h:659
float fTriggerThreshold
Definition abfheadr.h:645
short _nAutopeakSmoothing
Definition abfheadr.h:776
ABFLONG lTimeHysteresis
Definition abfheadr.h:820
short nStatsSmoothingEnable
Definition abfheadr.h:929
short nTelegraphEnable[ABF_ADCCOUNT]
Definition abfheadr.h:902
short nDataDisplayMode
Definition abfheadr.h:661
ABFLONG lAnnotationSectionPtr
Definition abfheadr.h:596
short nArithmeticADCNumA
Definition abfheadr.h:788
char nHighpassFilterType[ABF_ADCCOUNT]
Definition abfheadr.h:824
short nDACFileADCNum[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:871
short nFileStartMillisecs
Definition abfheadr.h:694
short _nAutopeakAverage
Definition abfheadr.h:778
char nPostProcessLowpassFilterType[ABF_ADCCOUNT]
Definition abfheadr.h:978
float fDACCalibrationFactor[ABF_DACCOUNT]
Definition abfheadr.h:846
short __nPNADCNum[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:896
short nUndoRunCount
Definition abfheadr.h:643
short nEraseStrategy
Definition abfheadr.h:660
ABFLONG lNumSamplesPerEpisode
Definition abfheadr.h:637
char sArithmeticUnits[ABF_ARITHMETICUNITSLEN]
Definition abfheadr.h:795
char sUnused018[156]
Definition abfheadr.h:942
ABFLONG lStatisticsMeasurements
Definition abfheadr.h:671
float fCellID1
Definition abfheadr.h:689
ABFLONG lStatsEnd[ABF_STATS_REGIONS]
Definition abfheadr.h:935
short nLTPPresynapticPulses[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:957
char sAutoAnalysisMacroName[ABF_MACRONAMELEN]
Definition abfheadr.h:912
short _nAutopeakBaseline
Definition abfheadr.h:777
short nSignalType
Definition abfheadr.h:716
short nDrawingStrategy
Definition abfheadr.h:658
ABFLONG lEpisodesPerRun
Definition abfheadr.h:639
float fEpochLevelInc[ABF_WAVEFORMCOUNT][ABF_EPOCHCOUNT]
Definition abfheadr.h:860
float fTrialStartToStart
Definition abfheadr.h:652
short nPulseSamplesOUT2
Definition abfheadr.h:726
ABFLONG lStartDisplayNum
Definition abfheadr.h:666
char sUnused007[12]
Definition abfheadr.h:763
ABFLONG _lAutopeakStart
Definition abfheadr.h:774
short nLevelHysteresis
Definition abfheadr.h:819
float fArithmeticLowerLimit
Definition abfheadr.h:787
short _nAutopeakEnable
Definition abfheadr.h:770
short nADCPtoLChannelMap[ABF_ADCCOUNT]
Definition abfheadr.h:699
float fArithmeticK1
Definition abfheadr.h:790
float fPostTrainLevel[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:883
float fEpochInitLevel[ABF_WAVEFORMCOUNT][ABF_EPOCHCOUNT]
Definition abfheadr.h:859
short _nEpochDurationInc[ABF_EPOCHCOUNT]
Definition abfheadr.h:737
unsigned short nStatsActiveChannels
Definition abfheadr.h:924
short nStatisticsClearStrategy
Definition abfheadr.h:833
short _nPNADCNum
Definition abfheadr.h:806
short _nAutosampleADCNum
Definition abfheadr.h:683
short nPulseSamplesOUT1
Definition abfheadr.h:725
char sUnavailable1608[4]
Definition abfheadr.h:741
float fTelegraphAdditGain[ABF_ADCCOUNT]
Definition abfheadr.h:904
ABFLONG lVoiceTagEntries
Definition abfheadr.h:589
float _fPNHoldingLevel
Definition abfheadr.h:807
float fTelegraphFilter[ABF_ADCCOUNT]
Definition abfheadr.h:905
float fPNHoldingLevel[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:897
short nLTPType
Definition abfheadr.h:955
float fStepDuration[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:880
ABFLONG _lConditNumPulses
Definition abfheadr.h:756
char sUnused014[40]
Definition abfheadr.h:884
short _nEpochInitDuration[ABF_EPOCHCOUNT]
Definition abfheadr.h:736
ABFLONG lEpochDurationInc[ABF_WAVEFORMCOUNT][ABF_EPOCHCOUNT]
Definition abfheadr.h:862
char sUnused017[76]
Definition abfheadr.h:920
short nTelegraphDACScaleFactorEnable[ABF_DACCOUNT]
Definition abfheadr.h:908
short nChannelStatsStrategy
Definition abfheadr.h:663
short nADCNumChannels
Definition abfheadr.h:611
unsigned ABFLONG ulFileCRC
Definition abfheadr.h:918
ABFLONG lDisplayAverageUpdate
Definition abfheadr.h:662
char sUnused009[12]
Definition abfheadr.h:810
ABFLONG lSynchArraySize
Definition abfheadr.h:592
char sUnused2048[130]
Definition abfheadr.h:982
short nULParamToVary[ABF_USERLISTCOUNT]
Definition abfheadr.h:888
short _nConditChannel
Definition abfheadr.h:755
ABFLONG lSamplesPerTrace
Definition abfheadr.h:665
float fFirstRunDelay
Definition abfheadr.h:842
char sUnused003[2]
Definition abfheadr.h:598
ABFLONG lCalculationPeriod
Definition abfheadr.h:664
short nTriggerAction
Definition abfheadr.h:647
float fBaselineLevel[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:879
ABFLONG lConditNumPulses[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:877
short _nPNPolarity
Definition abfheadr.h:804
char nLowpassFilterType[ABF_ADCCOUNT]
Definition abfheadr.h:823
ABFLONG lEpochInitDuration[ABF_WAVEFORMCOUNT][ABF_EPOCHCOUNT]
Definition abfheadr.h:861
ABFLONG lFileStartTime
Definition abfheadr.h:571
float fSignalHighpassFilter[ABF_ADCCOUNT]
Definition abfheadr.h:711
char sDACFilePath[ABF_WAVEFORMCOUNT][ABF_PATHLEN]
Definition abfheadr.h:872
short nMSBinFormat
Definition abfheadr.h:575
short nExperimentType
Definition abfheadr.h:681
short nEpochResistanceState[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:966
double dFileDuration
Definition abfheadr.h:832
float fFileVersionNumber
Definition abfheadr.h:565
float fStatisticsPeriod
Definition abfheadr.h:670
short _nEpochType[ABF_EPOCHCOUNT]
Definition abfheadr.h:733
float _fAutosampleMembraneCap
Definition abfheadr.h:687
float _fDACFileScale
Definition abfheadr.h:746
short nWaveformSource[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:856
short nDecayTopPercentile[ABF_STATS_REGIONS]
Definition abfheadr.h:939
ABFLONG lAverageCount
Definition abfheadr.h:653
float _fBaselineDuration
Definition abfheadr.h:757
float fScopeOutputInterval
Definition abfheadr.h:649
ABFLONG lFileStartDate
Definition abfheadr.h:570
ABFLONG lStatsMeasurements[ABF_STATS_REGIONS]
Definition abfheadr.h:933
char sModifierInfo[ABF_CREATORINFOLEN]
Definition abfheadr.h:919
short _nConditEnable
Definition abfheadr.h:754
float fDACFileScale[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:868
ABFLONG _lAutopeakMeasurements
Definition abfheadr.h:782
float _fEpochLevelInc[ABF_EPOCHCOUNT]
Definition abfheadr.h:735
ABFLONG lDACFileNumEpisodes[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:839
short nTrialTriggerSource
Definition abfheadr.h:828
short nStatsChannelPolarity[ABF_ADCCOUNT]
Definition abfheadr.h:940
short nUndoPromptStrategy
Definition abfheadr.h:827
ABFLONG lFileSignature
Definition abfheadr.h:564
short nOUTEnable
Definition abfheadr.h:720
float fDACHoldingLevel[ABF_DACCOUNT]
Definition abfheadr.h:715
float fInstrumentHoldingLevel[ABF_DACCOUNT]
Definition abfheadr.h:917
short nDigitalEnable
Definition abfheadr.h:729
short nConditEnable[ABF_WAVEFORMCOUNT]
Definition abfheadr.h:876
short nDigitalTrainValue[ABF_EPOCHCOUNT]
Definition abfheadr.h:863
char sUnused023[14]
Definition abfheadr.h:974
short nDecayBottomPercentile[ABF_STATS_REGIONS]
Definition abfheadr.h:938
float fPostProcessLowpassFilter[ABF_ADCCOUNT]
Definition abfheadr.h:977
char sUnused022[16]
Definition abfheadr.h:967
float fInstrumentOffset[ABF_ADCCOUNT]
Definition abfheadr.h:707
char sUnused008[2]
Definition abfheadr.h:799
ABFLONG lADCResolution
Definition abfheadr.h:677
ABFLONG lStart
Definition abfheadr.h:1178
ABFLONG lLength
Definition abfheadr.h:1179
int BOOL
Definition unix.h:49
unsigned int UINT
Definition unix.h:47
FILE * FILEHANDLE
Definition unix.h:38
#define WINAPI
Definition unix.h:198
struct _GUID GUID