rm(list=ls()) source ("source demo spectro.R") par(mar=c(4,4,1,1)) i <- s.current (counting.rate=10000,energy= 1.0, variable.rise.time=FALSE) v.csp <- s.CSP(i) + n.CSP() max (v.csp) v.fastout <- s.fastout (v.csp, 0.1) v.sa <- s.SA.CRRC4 (v.csp,.5) v.sa.cpz<-s.CPZ(v.sa,tau.zero=200) v.trig <- s.trigger (v.fastout, 0.001, 2.0) length(v.trig[v.trig>0.5]) oscilloscope (s=v.fastout,trig= v.trig, t.before=1,t.after=3, v.min=-0.001, v.max=max(v.fastout),N=0) oscilloscope (s=v.csp,trig= v.trig, t.before=-10,t.after= 100, v.min=-0.001, v.max=1,N=0) oscilloscope (s=v.sa.cpz,trig= v.trig, t.before=1,t.after= 50, v.min=-0.001, v.max=max(v.sa),N=20) s.peak <- s.peak_hold (v.sa.cpz, 0.001) spectro(s.peak)