previous next Up Title Contents

StepFun:


File name
StStepFun.[ch]


Description
This module generates a step function stimulus.


Example parameter file format
20.0		Stimulus signal amplitude (arbitary units).
10.0e-3		Stimulus signal duration (s).
10.0		Begin-end period amplitude (arbitrary units).
2.0e-3		Stimulus period before the signal begins (s).
5.0e-3		Stimulus period after the signal ends (s).
1.0e-3		Stimulus sampling interval, dt (seconds).



Test program directory
Tests/Combinations

Generic Module Routines

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

The GenerateSignal_StepFunction(...) Process Routine

Syntax
BOOLN GenerateSignal_StepFunction(EarObjectPtr theObject);


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

The SetBeginPeriodDuration_StepFunction(...) Routine

Syntax
BOOLN SetBeginPeriodDuration_StepFunction(double theBeginPeriodDuration);


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

The SetBeginEndAmplitude_StepFunction(...) Routine

Syntax
BOOLN SetBeginEndAmplitude_StepFunction(double theBeginEndAmplitude);


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

The SetEndPeriodDuration_StepFunction(...) Routine

Syntax
BOOLN SetEndPeriodDuration_StepFunction(double theEndPeriodDuration);


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

The SetPars_StepFunction(...) Routine

Syntax
BOOLN SetPars_StepFunction(double theStepAmplitude, double theStepDuration, double theSamplingInterval, double theBeginPeriodDuration, double theEndPeriodDuration, double theBeginEndAmplitude);


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

The SetSamplingInterval_StepFunction(...) Routine

Syntax
BOOLN SetSamplingInterval_StepFunction(double theSamplingInterval);


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

The SetAmplitude_StepFunction(...) Routine

Syntax
BOOLN SetAmplitude_StepFunction(double theStepAmplitude);


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

The SetDuration_StepFunction(...) Routine

Syntax
BOOLN SetDuration_StepFunction(double theStepDuration);


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

Example: Tests/Combinations/StimulusResp.c

Parameter file: StimulusResp.par:
#
# Main Parameter file
#

output.dat	Name of output file.

# Module specifications
#Par. file				Name		Description
#---------				-----		-------------
ParFiles/St/StepFun1.par	StepFun	Stimulus generation paradigm.
ParFiles/PE/PreEmph1.par	null		Outer-/middler-ear filter model.
ParFiles/BM/GammaT5k.par	null		Basilar membrane filter model.
ParFiles/IHC/CarneyRP1.par	null		IHC receptor potential model.
ParFiles/IHC/Meddis86.par	null		Inner hair cell (IHC) model.
ParFiles/AN/BinomSG1.par	null		Auditory nerve spike generation.
ParFiles/NC/Dendrite3.par	null		Dendritic filtering.
ParFiles/NC/MG92Stellate.par	null		Neural cell model.

# Miscellaneous parameters

2.5e-3	Ramp up rise time for signal (s).
Output

Figure [145] A stimulus generated by the StepFun module. This stimulus has been used where a current pulse is required, though it can be applied to other cases.

Example: Tests/Segmented_Mode/SegModeResp.c

Parameter file: SegModeResp.par:
#
# SimulationSpec main parameter file.
#

output1.dat				Output file.
output2.dat				Output file.

# Module specifications.
#Par. file				Name			Description
#---------				-----			-------------
ParFiles/St/StepFun1.par	StepFun		Stimulus generation paradigm.
SimSpecs/AN/Carney.sim	null				Simulation specification.

# Miscellaneous parameters
3		Number of repeated runs
10e-3	Single run duration (s or max. samples).
3e-3	Segment duration (s or max. samples).
2.5e-3	Ramp up rise time for signal (s).
Output

Figure [146] The StepFun stimulus behaviour in segmented processing mode. The full stimulus is generated once in normal mode "output1.dat", then the stimulus is generated in segments in segment processing mode "output2.dat". Note that in segmented processing mode the stimulus repeats.


previous next Up Title Contents