module: OpticalSD_LPFReset
parameters: double fp, double gain, double offset
inputs: double in, double_interp clk
outputs:  double out
static_variables:
classes: 
Filter filt("1","1 + 1/(2*pi*fp)*s","fp,Ts",fp,Ts);
EdgeDetect clkedge();
Amp amp("off + A*x","off,A,Min,Max",offset,gain,-1,1);
init: 
code:
if (clkedge.inp(clk) || clkedge.inp(-clk) || clk > 1.0)
   {
    filt.inp(0.0);
    out = filt.out;
   }
else 
   {
    amp.inp(in);
    filt.inp(amp.out);
    out = filt.out;
   }
