Index: fact/tools/pyscripts/new_pyfact/pyfact.py
===================================================================
--- fact/tools/pyscripts/new_pyfact/pyfact.py	(revision 17972)
+++ fact/tools/pyscripts/new_pyfact/pyfact.py	(revision 17973)
@@ -8,7 +8,4 @@
 import numpy as np
 import ROOT
-import pylab
-
-from scipy.signal import firwin, iirdesign, lfilter
 
 ########## BUILDING OF THE SHARED OBJECT FILES ###############################
@@ -248,110 +245,2 @@
     f.next(3)
     print "Event Id:", f.cols['EventNum']
-
-    import matplotlib.pyplot as plt
-    plt.ion()
-    """
-    for i in range(f.header['NPIX']):
-        plt.cla()
-        plt.title("Event %d"%(f.cols['EventNum']))
-        plt.plot(f.cols['CalibData2D'][i], '.:', label='pixel %d'%i)
-        plt.legend()
-        answer = raw_input('anykey for next pixel; "q" to quit. :')
-        if 'q' in answer.lower():
-            break
-    """
-
-
-
-    from scipy import signal
-    from scipy.signal import freqs, iirfilter
-    #b, a = iirfilter(4, [1, 10], 1, 60, analog=True, ftype='cheby1')
-    #b, a = signal.iirfilter(17, [50, 200], rs=60, btype='band',
-    #                                analog=True, ftype='cheby2')
-    #w, h = signal.freqs(b, a, 1000)
-    #w, h = freqs(b, a, worN=np.logspace(-1, 2, 1000))
-
-    b, a = iirfilter(N=4, # the order of the filter
-            Wn = [0.15, 0.25], # critical frequencies
-            rp = 1,       # maximum ripple in passband
-            rs = 60,      # minimum attenuation in stopband
-            btype='bandstop', # {'bandpass', 'lowpass', 'highpass', 'bandstop'}
-            #analog=True,
-            ftype='cheby1')
-    #w, h = freqs(b, a, worN=np.logspace(-1, 5, 1000))
-    w, h = freqs(b, a)
-    plt.figure()
-    plt.semilogx(w, 20 * np.log10(abs(h)))
-    plt.xlabel('Frequency')
-    plt.ylabel('Amplitude response [dB]')
-    plt.grid()
-    plt.show()
-
-
-
-
-
-    fig1, (ax11,ax12) = plt.subplots(nrows=2)
-    fig2, (ax21,ax22) = plt.subplots(nrows=2)
-
-    flt = firwin(13, [0.15,0.25])
-    t = np.arange(f.cols['CalibData2D'].shape[1])/2.*1e-9
-    fig3, (ax31, ax32) = plt.subplots(nrows=2)
-    ax31.plot(flt)
-    #w, h = freqs(flt, [1.0])
-    w, h = freqs(flt, [1.0], worN=np.logspace(-1, 5, 1000))
-    ax32.semilogx(w, 20 * np.log10(abs(h)))
-    ax32.set_xlabel('Frequency')
-    ax32.set_ylabel('Amplitude response [dB]')
-    ax32.grid()
-
-
-
-    for i in range(f.header['NPIX']):
-        data = f.cols['CalibData2D'][i]
-        fil_data = lfilter(flt, [1.0], data)
-
-        ax11.cla()
-        ax12.cla()
-        ax11.set_title("Event %d"%(f.cols['EventNum']))
-        ax11.plot(t, data, '.:', label='pixel %d'%i)
-        ax11.legend()
-        ax11.set_ylim(-20,40)
-        ax12.plot(t[:fil_data.size], fil_data, '.:', label='pixel %d'%i)
-        ax12.legend()
-        ax12.set_ylim(-20,40)
-
-        """
-        Pxx, freqs, t, plot = pylab.specgram( f.cols['CalibData2D'][i],
-                NFFT=32, Fs=2000000000,
-                detrend=pylab.detrend_none,
-                window=pylab.window_hanning,
-                noverlap=16)
-        """
-        ax21.cla()
-        ax22.cla()
-        dat, freqs, bins, im = ax21.specgram(data,
-                NFFT=64, Fs=2000000000,
-                detrend=pylab.detrend_none,
-                window=pylab.window_hanning,
-                noverlap=60,
-                interpolation='nearest')
-        ax21.axis('tight')
-        ax21.set_ylabel("frequency [Hz]")
-        ax21.set_xlabel("time [s]")
-
-        dat2, freqs2, bins2, im2 = ax22.specgram(data,
-                NFFT=64, Fs=2000000000,
-                detrend=pylab.detrend_none,
-                window=pylab.window_hanning,
-                noverlap=60,
-                interpolation='nearest')
-        ax22.axis('tight')
-        ax22.set_ylabel("frequency [Hz]")
-        ax22.set_xlabel("time [s]")
-
-        plt.show()
-
-        answer = raw_input('anykey for next pixel; "q" to quit. :')
-        if 'q' in answer.lower():
-            break
