previous next Up Title Contents

Analysis_FindBin:


File name
AnFindBin.[ch]


Description
This module finds the maximum or minimum bin values or index position for a signal. The search is implemented using a bin "window" of binWidth


Example parameter file format
max_index	search mode (MAX_VALUE,MAX_INDEX,MIN_VALUE,MIN_INDEX).
-1		Bin width (time window) for bin (s).
0.0		Time from which to start search (s).
-1.0e-3		Time range search (s).



Test program directory
Tests/Analysis

Generic Module Routines

This module has the standard Generic Module Routines (see Basic Module Routines used in Generic Programming, page 52).

The Calc_Analysis_FindBin(...) Process Routine

Syntax
BOOLN Calc_Analysis_FindBin(EarObjectPtr data);


Returns
TRUE if the process is successful, otherwise it returns FALSE.

The SetBinWidth_Analysis_FindBin(...) Routine

Syntax
BOOLN SetBinWidth_Analysis_FindBin(double theBinWidth);


Special Values
A negative bin width assumes a value the same as the input signal's sampling interval.


Returns
TRUE if the function is successful, otherwise it returns FALSE.

The SetMode_Analysis_FindBin(...) Routine

Syntax
BOOLN SetMode_Analysis_FindBin(char *theMode);


Special Values
Mode options: "MAX_VALUE", "MAX_INDEX", "MIN_VALUE", "MIN_INDEX"


Returns
TRUE if the function is successful, otherwise it returns FALSE.

The SetPars_Analysis_FindBin(...) Routine

Syntax
BOOLN SetPars_Analysis_FindBin(char *mode, double binWidth, double timeOffset, double timeRange);


Returns
TRUE if the function is successful, otherwise it returns FALSE.

The SetTimeOffset_Analysis_FindBin(...) Routine

Syntax
BOOLN SetTimeOffset_Analysis_FindBin(double theTimeOffset);


Returns
TRUE if the function is successful, otherwise it returns FALSE.

The SetTimeRange_Analysis_FindBin(...) Routine

Syntax
BOOLN SetTimeRange_Analysis_FindBin(double theTimeRange);


Special Values
A negative value assumes the range extends to the end of the signal.


Returns
TRUE if the function is successful, otherwise it returns FALSE.

Example: Tests/Analysis/FindBin.c

Parameter file: FindBin.par:
#
# Main Parameter file
#
output.dat		Name of stimulus output file.
#
# Module specifications.
#
#Par. file		Name			Description
#---------		-----			-------------
Click1.par		Click			Stimulus generation paradigm.

FindBin1.par	Find next minimum index analysis module parameter file.
Output

Figure [36] Output for FindBin test.

Comments:

The program prints diganostics, including the result of the process. The stimulus upon which it operates is also output, so the results can be checked if you so wish.


previous next Up Title Contents