set current to 0 for time < tdelay
This commit is contained in:
parent
c309cb3932
commit
40375934da
|
|
@ -103,7 +103,7 @@ NON-STANDARD FEATURES
|
|||
|
||||
==============================================================================*/
|
||||
|
||||
/*=== CM_ILIMIT ROUTINE ===*/
|
||||
/*=== CM_SEEGEN ROUTINE ===*/
|
||||
|
||||
void cm_seegen(ARGS) /* structure holding parms,
|
||||
inputs, outputs, etc. */
|
||||
|
|
@ -115,9 +115,6 @@ void cm_seegen(ARGS) /* structure holding parms,
|
|||
double out;
|
||||
double tcurr = TIME;
|
||||
|
||||
Mif_Complex_t ac_gain;
|
||||
|
||||
|
||||
|
||||
/* Retrieve frequently used parameters... */
|
||||
|
||||
|
|
@ -126,7 +123,10 @@ void cm_seegen(ARGS) /* structure holding parms,
|
|||
tdelay = PARAM(tdelay);
|
||||
inull = PARAM(inull);
|
||||
|
||||
out = inull * (exp(-(tcurr-tdelay)/talpha) - exp(-(tcurr-tdelay)/tbeta));
|
||||
if (tcurr < tdelay)
|
||||
out = 0;
|
||||
else
|
||||
out = inull * (exp(-(tcurr-tdelay)/talpha) - exp(-(tcurr-tdelay)/tbeta));
|
||||
|
||||
OUTPUT(out) = out;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,13 +30,13 @@ Description: "single event effect generator"
|
|||
|
||||
PORT_TABLE:
|
||||
|
||||
Port_Name: out
|
||||
Port_Name: out
|
||||
Description: "output"
|
||||
Direction: out
|
||||
Default_Type: i
|
||||
Direction: out
|
||||
Default_Type: i
|
||||
Allowed_Types: [i,id]
|
||||
Vector: no
|
||||
Vector_Bounds: -
|
||||
Vector_Bounds: -
|
||||
Null_Allowed: no
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue