-
Notifications
You must be signed in to change notification settings - Fork 0
/
autocorrChopMaster.py
71 lines (54 loc) · 1.43 KB
/
autocorrChopMaster.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#
# run_OUFit.py
# OUFit
#
# Created by nicain on 5/18/10.
# Copyright (c) 2010 __MyCompanyName__. All rights reserved.
#
################################################################################
# Preamble:
################################################################################
# Import necessary packages:
from subprocess import call as call
# Compile cython extension cythonOU.pyx:
call('python setup.py build_ext --inplace', shell=True)
# Import cython extension:
from autocorrChop import autocorr
import pbsTools as pt
################################################################################
# Call the main function:
################################################################################
# Settings:
FFTN = 2**18 #23 max
dt = .01 #.001 min
saveFileName = 'autocorr.dat'
saveResults = False
displayResults = True
# Parameters:
mu = .1
sigma = 2
tau = .1
R = 0
maxS = .3
# Initializations:
T = FFTN*dt
# Do the computation:
A, lags = autocorr(mu, sigma, tau, R, T, dt, maxS)
################################################################################
# Generating Output:
################################################################################
# Save Results:
if saveResults is True:
pt.pickle({
'mu':mu,
'sigma':sigma,
'tau':tau,
'R':R,
'A':h0,
'lags':Ez,
'dt':dt,
'FFTN':FFTN
}, saveFileName = saveFileName)
# Display results:
if displayResults is True:
print A, lags