previous next Up Title Contents

Utility_Compression: Signal Transformation


File name
UtCompress.[ch]


Description
This module generates a compressed signal using the EarObject's input signal. It can use log or power compression.


Example parameter file format
log		Compression mode ("log" or "power").
1.0		Signal multiplier (arbitrary units).
0.1		Power exponent.



Test program directory
Tests/Utilities

Generic Module Routines

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

The Process_Utility_Compression(...) Process Routine

Syntax
BOOLN Process_Utility_Compression(EarObjectPtr data);


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

The SetMode_Utility_Compression(...) Routine

Syntax
BOOLN SetMode_Utility_Compression(char *theMode);


Special Values
Mode options: "LOG" = logarithmic compression (y = log10(|x|)), or "POWER" = power comression (y = |x|^z, were z is the power exponent).


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

The SetPars_Utility_Compression(...) Routine

Syntax
BOOLN SetPars_Utility_Compression(char *mode, double signalMultiplier, double powerExponent);


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

The SetPowerExponent_Utility_Compression(...) Routine

Syntax
BOOLN SetPowerExponent_Utility_Compression(double thePowerExponent);


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

The SetSignalMultiplier_Utility_Compression(...) Routine

Syntax
BOOLN SetSignalMultiplier_Utility_Compression(double theSignalMultiplier);


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

Example: Tests/Utilities/Compress.c

Parameter file: Compress.par:
#
# Main Parameter file
#

output1.dat		Name of stimulus output file.
output2.dat		Name of compressed file.

# Module specifications.

#Par. file		Name			Description
#---------		-----			-------------
StepFun2.par		StepFun		Stimulus generation paradigm.

Compres1.par	Compression utility module parameter file.

# Miscellaneous parameters

1		No. of repeated runs.
50e-3	Ramp interval time.
Output

Figure [152] Output from the Compression utility module, showing both "log" and "power" compression (see Patterson et al. ??).


previous next Up Title Contents