previous next Up Title Contents

Analysis_FindNextIndex:


File name
AnFindNextIndex.[ch]


Description
This routine finds the index position of the next minimum or maximum after a specified time, offset (s) for each channel of its process EarObject input signal. The result for each channel is returned in the output signal.

The agorithm looks for the first minimum after a negative gradient. A negative gradient is where cPtr(i + 1) - cPtr(i) < 0.



Example parameter file format
maximum	Index search mode ("minimum" or "maximum").
0.0e-3		Time offset for start of search (s).



Test program directory
Tests/Analysis

Generic Module Routines

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

The Calc_Analysis_FindNextIndex (...) Process Routine

Syntax
BOOLN Calc_Analysis_FindNextIndex(EarObjectPtr data);


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

The SetMode_Analysis_FindNextIndex(...) Routine

Syntax
BOOLN SetMode_Analysis_FindNextIndex(char *theMode);


Special Values
Mode Options: "Maximum" or "Minimum"


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

The SetPars_Analysis_FindNextIndex(...) Routine

Syntax
BOOLN SetPars_Analysis_FindNextIndex(char *mode, double timeOffset);


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

The SetTimeOffset_Analysis_FindNextIndex(...) Routine

Syntax
BOOLN SetTimeOffset_Analysis_FindNextIndex(double theTimeOffset);


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

Example: Tests/Analysis/FindNextIndex.c

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

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

Figure [37] Output for FindNextIndex test.

Comments:

The program outputs the results of its analysis, the stimulus is also output so the resuts can be checked


previous next Up Title Contents