view model/table.c @ 0:5242703e91d3 tip

Initial checkin for AIM92 aimR8.2 (last updated May 1997).
author tomwalters
date Fri, 20 May 2011 15:19:45 +0100
parents
children
line wrap: on
line source
/*
    Copyright (c) Applied Psychology Unit, Medical Research Council. 1988, 1989
    ===========================================================================

    Permission to use, copy, modify, and distribute this software without fee 
    is hereby granted for research purposes, provided that this copyright 
    notice appears in all copies and in all supporting documentation, and that 
    the software is not redistributed for any fee (except for a nominal shipping 
    charge). Anyone wanting to incorporate all or part of this software in a
    commercial product must obtain a license from the Medical Research Council.

    The MRC makes no representations about the suitability of this 
    software for any purpose.  It is provided "as is" without express or implied 
    warranty.
 
*/

/*
 table.c - Options tables for model parameters

*/

/***************************************************************************
* The model options are grouped according to the processing stages which use
* them. The stages which use each group are listed above each group. These
* lists contain sub-lists of stages from each model type, (ie, envelope, fine,
* complex, nonmult, noncalc. See model.c:FindStage() ).
* The options table for a particular group must be installed in the options
* field of the stage structure (see model.c:FindStage()) which is the lowest
* stage (as listed textually in the stage table) of the stages which use that
* group. In this way, the other stages which use that group will pick up the
* options when the complete options table is constructed, by accumulating all
* options groups from a given stage name to the bottom of the stage table.
* For example, the "auditory filter output" group listed just below is used
* by stage fbm (a "fine" model), stage bmm (a "nonmult" model), and stages
* fcp and fcr (both "complex" models). The group options table (fbmopts)
* should be installed in the stage table in the options fields for the stages
* fbm, bmm, and fcr. The stage fcp can be assigned NO_OPTS because it will
* pick up the options from stage fcr when the complete options table is
* constructed, (see gen.c:constructOptions()).
*
* Routes through the model.
* There are two parallel routes (ie sequential stages of processing):
* a) an auditory route (conventionally displayed as landscapes).
* b) a speech route (conventionally displayed as greyscales).
* Either route is a three-stage model, composed of a sequence of modules.
* The names of each of the three stages are an alias for the corresponding
* module at a particular stage of processing. (Eg, genbmm is the first of the
* three model stages in the auditory route. It is displayed as a landscape.
* It is an alias for genfbm, and the sequence of modules leading to this is
* wav,fbm).
* An additional route displays excitation patterns, which are basically
* spectra, (for example, genepn is like gennap, but viewed with the frequency
* axis as the abscissa. Similarly, gensas is like genbmm).
*
* Process                       Module     Auditory    Speech    Excitation
* ----------------------------  ------     --------    -------   ----------
* Input wave                    genwav
* Filterbank                    genfbm      genbmm
* Rectifier                     genfbr
* Compressor                    genfbc                  gensgm     genasa
* LP filter                     genfbl
* Adaptive threshold            genfbt      gennap
* Integration and downsampling  genfbd                  gencgm     genepn
* Triggered integration         gensai      gensai
* Integration and downsampling  gensas                  gensas
*
* In addition, there is a spiral mapping of the auditory image, genspl,
* which is a spiral version of gensai.
*
* Note that on the speech route, gensgm is identical to gencgm but with
* enable_at=off.
* Originally, gensgm and gencgm were simply aliases for the genfbd module,
* which were to have distinct parameters using distinct options files.
*
****************************************************************************/


/******* [fbm] [bmm] [fcp,fcr] stage: "auditory filter output" ************/

static  Option fbmopts[] = {

 { "channels_afb",  chansdflt,  &chansstr, "Number of channels in filter",               InOutOption},
 {    "mincf_afb",    mindflt,    &minstr, "Minimum center frequency (Hz)",              InOutOption},
 {    "maxcf_afb",    maxdflt,    &maxstr, "Maximum center frequency (Hz)",              InOutOption},
 {    "dencf_afb",    dendflt,    &denstr, "Filter density (filters/critical band)",     InOutOption},
 {   "interp_afb", interpdflt, &interpstr, "Levels of interpolation to apply",          OutputOption},
 {   "interp_afb", interpdflt, &interpstr, "Levels of interpolation to apply",          SilentOption},
 {    "bwmin_afb",  limitdflt,  &limitstr, "Minimum filter bandwith",                    InOutOption},
 {  "quality_afb",   qualdflt,   &qualstr, "Ultimate qualtity factor of filters",        InOutOption},
 {"audiogram_afb",  audiodflt,  &audiostr, "Audiogram equalisation parameter\n",         InOutOption},

 {    "float_gtf",  floatdflt,  &floatstr, "Floating point filter calculations",        OutputOption},
 {    "float_gtf",  floatdflt,  &floatstr, "Floating point filter calculations",        SilentOption},
 {     "gain_gtf",   gaindflt,   &gainstr, "Filter output amplification",                InOutOption},
 {    "phase_gtf",  phasedflt,  &phasestr, "Phase compensation option",                  InOutOption},
 {    "order_gtf",  orderdflt,  &orderstr, "Filter order\n",                             InOutOption},

 ( char * ) 0 } ;

/************** [fbr] stage: "rectified filter output" ******************/

static  Option fbropts[] = {

 {      "rectify",   rectdflt,   &rectstr, "Rectify filter output",                      InOutOption},

 ( char * ) 0 } ;

/*********** [fbc] [fec] stage: "compressed filter output" **************/

static  Option fbcopts[] = {

 {     "compress",    logdflt,    &logstr, "Apply log compression",                    InOutOption},
 {   "compensate",   compdflt,   &compstr, "Cochlea output compressor\n",              InputOption},

 ( char * ) 0 } ;

/*********** [fbu] [feu] stage: "uncompressed filter output" **************/

static  Option fbuopts[] = {

 {        "power",  powerdflt,  &powerstr, "Power of Compression",                      SilentOption},

 ( char * ) 0 } ;

/*********** [fbs] [fes] stage: "saturated filter output" **************/

static  Option fbsopts[] = {

 {     "saturate",    satdflt,    &satstr, "Introduce Saturation of non-linearity\n",   SilentOption},

 ( char * ) 0 } ;

/*********** [fbl] [fel] stage: "low-pass filtered filter output ***********/

static  Option fblopts[] = {

 {       "meddis", meddisdflt, &meddisstr, "Enables Meddis haircell model\n",           OutputOption},
 {       "meddis", meddisdflt, &meddisstr, "Enables Meddis haircell model\n",           SilentOption},

 {    "igain_lpf", ligaindflt, &ligainstr, "Gain of integration stage\n",               OutputOption},
 {    "igain_lpf", ligaindflt, &ligainstr, "Gain of integration stage\n",               SilentOption},
 {    "vloss_lpf", lvlossdflt, &lvlossstr, "Rest level for loss",                       OutputOption},
 {    "vloss_lpf", lvlossdflt, &lvlossstr, "Rest level for loss",                       SilentOption},
 {     "loss_lpf",  llossdflt,  &llossstr, "Loss time constant",                        OutputOption},
 {     "loss_lpf",  llossdflt,  &llossstr, "Loss time constant",                        SilentOption},
 {    "tdown_lpf",  ldowndflt,  &ldownstr, "Downward time constant in ms",              OutputOption},
 {    "tdown_lpf",  ldowndflt,  &ldownstr, "Downward time constant in ms",              SilentOption},
 {      "tup_lpf",    lupdflt,    &lupstr, "Upward time constant in ms",                SilentOption},
 {   "stages_lpf", lstagedflt, &lstagestr, "Stages of integration\n",                   SilentOption},

 ( char * ) 0 } ;

/*********** [nap,fbt] [fet] stage: "neural activity pattern" **************/

static  Option fbtopts[] = {

 {    "enable_at",    stxdflt,    &stxstr, "Enable adaptive thresholding module",        InOutOption},
 {     "trise_at",   risedflt,   &risestr, "Threshold adaptation rate (upwards)",        InOutOption},
 {"t1recovery_at",  rapiddflt,  &rapidstr, "Initial recovery rate relative to filter",   InOutOption},
 {"t2recovery_at",   fastdflt,   &faststr, "Secondary recovery rate relative to filter", InOutOption},
 {  "propt2t1_at",   propdflt,   &propstr, "Relative height of secondary adaptation",    InOutOption},
 { "frecovery_at",    latdflt,    &latstr, "Recovery rate across frequency",             InOutOption},
 {  "reclimit_at", vdraindflt, &vdrainstr, "Limitation on recovery level\n",             InOutOption},

 {     "times_at",  timesdflt,  &timesstr, "Oversampling of calculation of threshold",  OutputOption},
 {     "times_at",  timesdflt,  &timesstr, "Oversampling of calculation of threshold",  SilentOption},

 ( char * ) 0 } ;

/*********** [fba] [fea] stage: "adapted transduced filter output" *********/

static  Option fbaopts[] = {

 {   "mmincf_mfb",  minmfdflt,  &minmfstr, "Minimum modulation frequency (Hz)",          InOutOption},
 {   "mmaxcf_mfb",  maxmfdflt,  &maxmfstr, "Maximum modulation frequency (Hz)",          InOutOption},
 {   "mdencf_mfb",  denmfdflt,  &denmfstr, "Modulation filter density ",                 InOutOption},
 {   "stepcf_mfb", stepmfdflt, &stepmfstr, "Step between images\n",                      InOutOption},

 {  "tadaptation",   adapdflt,   &adapstr, "Time constant of long term adaptation\n",   SilentOption},

 ( char * ) 0 } ;

/*********** [fbh] [feh] stage: "hard limited filter output" **************/

static  Option fbhopts[] = {

 {   "hard_limit",   harddflt,   &hardstr, "Hardlimit firing rate before integration\n",OutputOption},
 {   "hard_limit",   harddflt,   &hardstr, "Hardlimit firing rate before integration\n",SilentOption},

 ( char * ) 0 } ;

/***** [sgm,cgm,fbd,fbi] [fed,fei] stage: "integrated filter output" *******/

static  Option fbiopts[] = {

 {    "igain_idt",  igaindflt,  &igainstr, "Gain of integration stage\n",               OutputOption},
 {    "igain_idt",  igaindflt,  &igainstr, "Gain of integration stage\n",               SilentOption},

 {    "vloss_idt",  vlossdflt,  &vlossstr, "Rest level for loss",                       OutputOption},
 {    "vloss_idt",  vlossdflt,  &vlossstr, "Rest level for loss",                       SilentOption},
 {     "loss_idt",   lossdflt,   &lossstr, "Loss time constant",                        OutputOption},
 {     "loss_idt",   lossdflt,   &lossstr, "Loss time constant",                        SilentOption},
 {    "tdown_idt",   downdflt,   &downstr, "Downward time constant in ms",              OutputOption},
 {    "tdown_idt",   downdflt,   &downstr, "Downward time constant in ms",              SilentOption},
 {      "tup_idt",     updflt,     &upstr, "Low-pass filter time constant in ms",        InOutOption},
 {   "stages_idt",  stagedflt,  &stagestr, "Stages of integration\n",                    InOutOption},

 ( char * ) 0 } ;

/*********** [spl,sai] [sie] stage: "stabilized auditory image" ************/

static  Option saiopts[] = {

 {  "napdecay_ai",    cgmdflt,    &cgmstr,  "Neural activity decay time constant",                    InOutOption},
 {   "ttdecay_ai",     ttdflt,     &ttstr,  "Trigger threshold decay time constant",     InOutOption},
 {    "utrate_ai",  utlimdflt,  &utlimstr,  "Upper trigger rate limit (Hz)",             InOutOption},
 {    "ltrate_ai",  ltlimdflt,  &ltlimstr,  "Lower trigger rate limit (Hz)",             InOutOption},
 {     "decay_ai",  decaydflt,  &decaystr,  "Auditory image decay time constant\n",      InOutOption},

 ( char * ) 0 } ;

/*********** [sas] [sse] stage: "stabilized auditory spectrogram" **********/

static  Option sasopts[] = {

 {     "ulim_sas",   ulimdflt,   &ulimstr,  "Upper integration limit for auditory image",   InOutOption},
 {     "llim_sas",   llimdflt,   &llimstr,  "Lower integration limit for auditory image\n", InOutOption},

 ( char * ) 0 } ;