x100 = xo[-100:]/1000. x1000 = xo/1000. filen = 'testsavetls.py' res_pacf = HoldIt('mlpacf') res_pacf.comment = 'mlab.parcorr(x, [], 2, nout=3)' res_pacf.pacf100, res_pacf.lags100, res_pacf.bounds100 = \ mlab.parcorr(x100, [], 2, nout=3) res_pacf.pacf1000, res_pacf.lags1000, res_pacf.bounds1000 = \ mlab.parcorr(x1000, [], 2, nout=3) res_pacf.save(filename=filen, header=True) res_acf = HoldIt('mlacf') res_acf.comment = 'mlab.autocorr(x, [], 2, nout=3)' res_acf.acf100, res_acf.lags100, res_acf.bounds100 = \ mlab.autocorr(x100, [], 2, nout=3) res_acf.acf1000, res_acf.lags1000, res_acf.bounds1000 = \ mlab.autocorr(x1000, [], 2, nout=3) res_acf.save(filename=filen, header=False) res_ccf = HoldIt('mlccf') res_ccf.comment = 'mlab.crosscorr(x[4:], x[:-4], [], 2, nout=3)' res_ccf.ccf100, res_ccf.lags100, res_ccf.bounds100 = \ mlab.crosscorr(x100[4:], x100[:-4], [], 2, nout=3) res_ccf.ccf1000, res_ccf.lags1000, res_ccf.bounds1000 = \ mlab.crosscorr(x1000[4:], x1000[:-4], [], 2, nout=3) res_ccf.save(filename=filen, header=False) res_ywar = HoldIt('mlywar')
x100 = xo[-100:] / 1000. x1000 = xo / 1000. filen = 'testsavetls.py' res_pacf = HoldIt('mlpacf') res_pacf.comment = 'mlab.parcorr(x, [], 2, nout=3)' res_pacf.pacf100, res_pacf.lags100, res_pacf.bounds100 = \ mlab.parcorr(x100, [], 2, nout=3) res_pacf.pacf1000, res_pacf.lags1000, res_pacf.bounds1000 = \ mlab.parcorr(x1000, [], 2, nout=3) res_pacf.save(filename=filen, header=True) res_acf = HoldIt('mlacf') res_acf.comment = 'mlab.autocorr(x, [], 2, nout=3)' res_acf.acf100, res_acf.lags100, res_acf.bounds100 = \ mlab.autocorr(x100, [], 2, nout=3) res_acf.acf1000, res_acf.lags1000, res_acf.bounds1000 = \ mlab.autocorr(x1000, [], 2, nout=3) res_acf.save(filename=filen, header=False) res_ccf = HoldIt('mlccf') res_ccf.comment = 'mlab.crosscorr(x[4:], x[:-4], [], 2, nout=3)' res_ccf.ccf100, res_ccf.lags100, res_ccf.bounds100 = \ mlab.crosscorr(x100[4:], x100[:-4], [], 2, nout=3) res_ccf.ccf1000, res_ccf.lags1000, res_ccf.bounds1000 = \ mlab.crosscorr(x1000[4:], x1000[:-4], [], 2, nout=3) res_ccf.save(filename=filen, header=False) res_ywar = HoldIt('mlywar') res_ywar.comment = "mlab.ar(x100-x100.mean(), 10, 'yw').a.ravel()" mbaryw = mlab.ar(x100 - x100.mean(), 10, 'yw')