import numpy as np
import sys
import getopt
sys.path.insert(1,"/usr/local/science/clag/")
import clag
%pylab inline
from scipy.stats import norm
from scipy.stats import lognorm
ref_file="lc/1367A.lc"
echo_file="lc/3471A.lc"
dt = 0.01
t1, l1, l1e = np.loadtxt(ref_file).T
errorbar(t1, l1, yerr=l1e, fmt='o')
Populating the interactive namespace from numpy and matplotlib
<Container object of 3 artists>
fqL = np.array([0.0049999999, 0.018619375, 0.044733049, 0.069336227, 0.10747115, 0.16658029,
0.25819945, 0.40020915, 0.62032418])
# fqL = np.logspace(np.log10(0.0006),np.log10(1.2),11)
nfq = len(fqL) - 1
fqd = 10**(np.log10( (fqL[:-1]*fqL[1:]) )/2.)
fqL
array([ 0.005 , 0.01861938, 0.04473305, 0.06933623, 0.10747115, 0.16658029, 0.25819945, 0.40020915, 0.62032418])
P1 = clag.clag('psd10r', [t1], [l1], [l1e], dt, fqL)
p1 = np.ones(nfq)
p1, p1e = clag.optimize(P1, p1)
1 4.342e-01 5.077e+01 inf -- -5.530e+02 -- 1 1 1 1 1 1 1 1 2 7.674e-01 5.065e+01 8.300e+01 -- -4.700e+02 -- 0.653018 0.587019 0.568277 0.567457 0.566281 0.566085 0.565773 0.566163 3 3.298e+00 5.043e+01 8.075e+01 -- -3.893e+02 -- 0.414806 0.209135 0.141159 0.13784 0.133393 0.132728 0.131612 0.132761 4 1.572e+00 5.010e+01 7.754e+01 -- -3.117e+02 -- 0.322539 -0.0834456 -0.273066 -0.284295 -0.297612 -0.299435 -0.302479 -0.300412 5 5.908e-01 4.964e+01 7.386e+01 -- -2.379e+02 -- 0.302357 -0.214604 -0.654658 -0.688754 -0.723838 -0.729279 -0.736418 -0.733888 6 3.713e-01 4.877e+01 6.953e+01 -- -1.683e+02 -- 0.284419 -0.200357 -0.96379 -1.05472 -1.13798 -1.15477 -1.17031 -1.16748 7 2.709e-01 4.671e+01 6.269e+01 -- -1.056e+02 -- 0.277768 -0.185001 -1.13047 -1.34026 -1.52128 -1.56845 -1.6043 -1.60101 8 2.135e-01 4.361e+01 5.281e+01 -- -5.282e+01 -- 0.277012 -0.185189 -1.16375 -1.49463 -1.83211 -1.9477 -2.03737 -2.03476 9 1.764e-01 3.767e+01 4.019e+01 -- -1.264e+01 -- 0.282161 -0.184207 -1.17891 -1.53049 -2.01851 -2.24569 -2.46562 -2.46922 10 1.508e-01 2.738e+01 2.645e+01 -- 1.382e+01 -- 0.289545 -0.182463 -1.18795 -1.52893 -2.08812 -2.41103 -2.87498 -2.90486 11 1.349e-01 1.468e+01 1.390e+01 -- 2.772e+01 -- 0.293547 -0.180898 -1.1897 -1.52803 -2.10944 -2.46526 -3.22702 -3.34288 12 1.358e-01 5.365e+00 5.378e+00 -- 3.309e+01 -- 0.295456 -0.179941 -1.19052 -1.52801 -2.11928 -2.48294 -3.46233 -3.79368 13 1.868e-01 1.338e+00 1.633e+00 -- 3.473e+01 -- 0.297315 -0.17923 -1.19104 -1.52666 -2.12491 -2.48975 -3.55567 -4.30889 14 6.248e-01 2.604e-01 4.517e-01 -- 3.518e+01 -- 0.299091 -0.178645 -1.191 -1.52463 -2.12805 -2.4915 -3.5672 -5.11363 15 2.744e+02 2.611e-01 7.022e-02 -- 3.525e+01 -- 0.300248 -0.178286 -1.19075 -1.52307 -2.12961 -2.49161 -3.56337 -8 16 2.745e+02 2.782e-01 4.368e-04 -- 3.525e+01 -- 0.300566 -0.178158 -1.19062 -1.52252 -2.13009 -2.49151 -3.5617 -8 17 2.745e+02 2.805e-01 6.410e-05 -- 3.525e+01 -- 0.300599 -0.178134 -1.19059 -1.52242 -2.13017 -2.49148 -3.56148 -8 ******************** 0.300599 -0.178134 -1.19059 -1.52242 -2.13017 -2.49148 -3.56148 -8 0.238931 0.202434 0.232634 0.177249 0.153039 0.132988 0.297259 3285.23 -0.000915535 -0.00131061 -0.00195128 -0.00497899 -0.0226059 -0.0776175 -0.280541 -0.000206646 ********************
p1, p1e = clag.errors(P1, p1, p1e)
### errors for param 0 ### +++ 3.525e+01 3.480e+01 3.006e-01 5.395e-01 0.891 +++ +++ 3.525e+01 3.431e+01 3.006e-01 6.590e-01 1.87 +++ +++ 3.525e+01 3.458e+01 3.006e-01 5.993e-01 1.34 +++ +++ 3.525e+01 3.469e+01 3.006e-01 5.694e-01 1.11 +++ +++ 3.525e+01 3.475e+01 3.006e-01 5.545e-01 0.997 +++ ### errors for param 1 ### +++ 3.525e+01 3.476e+01 -1.781e-01 2.430e-02 0.973 +++ +++ 3.525e+01 3.421e+01 -1.781e-01 1.255e-01 2.07 +++ +++ 3.525e+01 3.451e+01 -1.781e-01 7.491e-02 1.48 +++ +++ 3.525e+01 3.464e+01 -1.781e-01 4.961e-02 1.21 +++ +++ 3.525e+01 3.470e+01 -1.781e-01 3.696e-02 1.09 +++ +++ 3.525e+01 3.473e+01 -1.781e-01 3.063e-02 1.03 +++ +++ 3.525e+01 3.475e+01 -1.781e-01 2.747e-02 1 +++ ### errors for param 2 ### +++ 3.525e+01 3.511e+01 -1.191e+00 -1.074e+00 0.276 +++ +++ 3.525e+01 3.495e+01 -1.191e+00 -1.016e+00 0.598 +++ +++ 3.525e+01 3.485e+01 -1.191e+00 -9.870e-01 0.8 +++ +++ 3.525e+01 3.479e+01 -1.191e+00 -9.725e-01 0.91 +++ +++ 3.525e+01 3.476e+01 -1.191e+00 -9.652e-01 0.968 +++ +++ 3.525e+01 3.475e+01 -1.191e+00 -9.616e-01 0.997 +++ ### errors for param 3 ### +++ 3.525e+01 3.482e+01 -1.522e+00 -1.345e+00 0.865 +++ +++ 3.525e+01 3.432e+01 -1.522e+00 -1.257e+00 1.86 +++ +++ 3.525e+01 3.459e+01 -1.522e+00 -1.301e+00 1.32 +++ +++ 3.525e+01 3.471e+01 -1.522e+00 -1.323e+00 1.08 +++ +++ 3.525e+01 3.476e+01 -1.522e+00 -1.334e+00 0.97 +++ +++ 3.525e+01 3.473e+01 -1.522e+00 -1.329e+00 1.03 +++ +++ 3.525e+01 3.475e+01 -1.522e+00 -1.331e+00 0.998 +++ ### errors for param 4 ### +++ 3.525e+01 3.481e+01 -2.130e+00 -1.977e+00 0.874 +++ +++ 3.525e+01 3.429e+01 -2.130e+00 -1.901e+00 1.91 +++ +++ 3.525e+01 3.457e+01 -2.130e+00 -1.939e+00 1.35 +++ +++ 3.525e+01 3.470e+01 -2.130e+00 -1.958e+00 1.1 +++ +++ 3.525e+01 3.476e+01 -2.130e+00 -1.968e+00 0.983 +++ +++ 3.525e+01 3.473e+01 -2.130e+00 -1.963e+00 1.04 +++ +++ 3.525e+01 3.474e+01 -2.130e+00 -1.965e+00 1.01 +++ +++ 3.525e+01 3.475e+01 -2.130e+00 -1.966e+00 0.997 +++ ### errors for param 5 ### +++ 3.525e+01 3.474e+01 -2.491e+00 -2.358e+00 1.01 +++ +++ 3.525e+01 3.512e+01 -2.491e+00 -2.425e+00 0.263 +++ +++ 3.525e+01 3.496e+01 -2.491e+00 -2.392e+00 0.579 +++ +++ 3.525e+01 3.486e+01 -2.491e+00 -2.375e+00 0.781 +++ +++ 3.525e+01 3.480e+01 -2.491e+00 -2.367e+00 0.893 +++ +++ 3.525e+01 3.477e+01 -2.491e+00 -2.363e+00 0.952 +++ +++ 3.525e+01 3.476e+01 -2.491e+00 -2.361e+00 0.982 +++ +++ 3.525e+01 3.475e+01 -2.491e+00 -2.360e+00 0.997 +++ ### errors for param 6 ### +++ 3.525e+01 3.507e+01 -3.561e+00 -3.413e+00 0.363 +++ +++ 3.525e+01 3.484e+01 -3.561e+00 -3.339e+00 0.814 +++ +++ 3.525e+01 3.468e+01 -3.561e+00 -3.301e+00 1.13 +++ +++ 3.525e+01 3.477e+01 -3.561e+00 -3.320e+00 0.962 +++ +++ 3.525e+01 3.473e+01 -3.561e+00 -3.311e+00 1.04 +++ +++ 3.525e+01 3.475e+01 -3.561e+00 -3.315e+00 1 +++ ### errors for param 7 ### +++ 3.525e+01 3.524e+01 -8.000e+00 -6.000e+00 0.0178 +++ +++ 3.525e+01 3.515e+01 -8.000e+00 -5.000e+00 0.187 +++ +++ 3.525e+01 3.494e+01 -8.000e+00 -4.500e+00 0.618 +++ +++ 3.525e+01 3.466e+01 -8.000e+00 -4.250e+00 1.18 +++ +++ 3.525e+01 3.482e+01 -8.000e+00 -4.375e+00 0.851 +++ +++ 3.525e+01 3.475e+01 -8.000e+00 -4.312e+00 1 +++ ******************** 0.300605 -0.178131 -1.19059 -1.52241 -2.13019 -2.49148 -3.56144 -8 0.253864 0.205597 0.228999 0.191096 0.1638 0.131949 0.246154 3.6875 ********************
xscale('log'); ylim(-4,2)
errorbar(fqd, p1, yerr=p1e, fmt='o', ms=10, color="black")
<Container object of 3 artists>
t2, l2, l2e = np.loadtxt(echo_file).T
errorbar(t1, l1, yerr=l1e, fmt='o', color="green")
errorbar(t2, l2, yerr=l2e, fmt='o', color="black")
<Container object of 3 artists>
P2 = clag.clag('psd10r', [t2], [l2], [l2e], dt, fqL)
p2 = np.ones(nfq)
p2, p2e = clag.optimize(P2, p2)
1 4.362e-01 5.425e+01 inf -- -3.468e+02 -- 1 1 1 1 1 1 1 1 2 7.747e-01 5.347e+01 7.019e+01 -- -2.766e+02 -- 0.58045 0.569962 0.564602 0.563764 0.567626 0.565054 0.565279 0.564008 3 3.447e+00 5.213e+01 6.905e+01 -- -2.076e+02 -- 0.198681 0.140203 0.130333 0.127063 0.134237 0.12998 0.131082 0.127044 4 1.448e+00 4.998e+01 6.682e+01 -- -1.408e+02 -- -0.0825582 -0.283347 -0.300715 -0.310826 -0.299703 -0.304649 -0.30132 -0.310849 5 5.884e-01 4.684e+01 6.330e+01 -- -7.746e+01 -- -0.194194 -0.676998 -0.726162 -0.750752 -0.733583 -0.738758 -0.729946 -0.74976 6 3.739e-01 4.258e+01 5.850e+01 -- -1.895e+01 -- -0.203226 -0.953186 -1.14229 -1.19152 -1.16459 -1.17342 -1.15279 -1.19094 7 2.741e-01 3.740e+01 5.292e+01 -- 3.397e+01 -- -0.205901 -0.9956 -1.54459 -1.63073 -1.58521 -1.61127 -1.5669 -1.63629 8 2.128e-01 3.180e+01 4.679e+01 -- 8.076e+01 -- -0.180502 -0.943953 -1.92935 -2.06126 -1.98071 -2.05288 -1.97074 -2.08385 9 1.675e-01 2.595e+01 3.791e+01 -- 1.187e+02 -- -0.15428 -0.934563 -2.26437 -2.45352 -2.31988 -2.48374 -2.35707 -2.52729 10 1.286e-01 2.002e+01 2.537e+01 -- 1.440e+02 -- -0.13956 -0.939381 -2.49352 -2.71726 -2.56371 -2.84902 -2.70919 -2.95055 11 9.197e-02 1.277e+01 1.299e+01 -- 1.570e+02 -- -0.130332 -0.946187 -2.57446 -2.74449 -2.69402 -3.05697 -3.00449 -3.33007 12 5.076e-02 6.047e+00 5.021e+00 -- 1.621e+02 -- -0.124515 -0.945944 -2.55165 -2.71422 -2.73704 -3.10737 -3.209 -3.63633 13 1.434e-02 1.485e+00 1.060e+00 -- 1.631e+02 -- -0.12047 -0.945369 -2.54157 -2.70197 -2.76441 -3.10602 -3.30159 -3.8209 14 4.769e-03 3.557e-01 7.280e-02 -- 1.632e+02 -- -0.119516 -0.946002 -2.53635 -2.69518 -2.78858 -3.10381 -3.32152 -3.8757 15 2.150e-03 1.530e-01 4.222e-03 -- 1.632e+02 -- -0.119506 -0.945491 -2.53265 -2.69429 -2.80187 -3.10094 -3.32488 -3.87969 16 1.017e-03 7.109e-02 8.430e-04 -- 1.632e+02 -- -0.119394 -0.945124 -2.53033 -2.69448 -2.8079 -3.09858 -3.32603 -3.87983 17 4.817e-04 3.356e-02 1.918e-04 -- 1.632e+02 -- -0.119311 -0.944963 -2.52941 -2.69447 -2.81076 -3.09727 -3.32654 -3.87984 18 2.335e-04 1.618e-02 4.417e-05 -- 1.632e+02 -- -0.119282 -0.944891 -2.52886 -2.69454 -2.81211 -3.09664 -3.32676 -3.87987 ******************** -0.119282 -0.944891 -2.52886 -2.69454 -2.81211 -3.09664 -3.32676 -3.87987 0.233661 0.204163 0.319993 0.254151 0.198248 0.179386 0.161786 0.221522 0.000372164 0.000983332 0.00164575 -0.000696472 -0.0161795 0.00744155 -0.00415795 -0.000828998 ********************
p2, p2e = clag.errors(P2, p2, p2e)
### errors for param 0 ### +++ 1.632e+02 1.627e+02 -1.193e-01 1.144e-01 0.905 +++ +++ 1.632e+02 1.622e+02 -1.193e-01 2.312e-01 1.9 +++ +++ 1.632e+02 1.625e+02 -1.193e-01 1.728e-01 1.37 +++ +++ 1.632e+02 1.626e+02 -1.193e-01 1.436e-01 1.13 +++ +++ 1.632e+02 1.627e+02 -1.193e-01 1.290e-01 1.01 +++ +++ 1.632e+02 1.627e+02 -1.193e-01 1.217e-01 0.958 +++ +++ 1.632e+02 1.627e+02 -1.193e-01 1.254e-01 0.985 +++ +++ 1.632e+02 1.627e+02 -1.193e-01 1.272e-01 0.999 +++ ### errors for param 1 ### +++ 1.632e+02 1.627e+02 -9.449e-01 -7.407e-01 0.961 +++ +++ 1.632e+02 1.622e+02 -9.449e-01 -6.386e-01 2.04 +++ +++ 1.632e+02 1.625e+02 -9.449e-01 -6.897e-01 1.46 +++ +++ 1.632e+02 1.626e+02 -9.449e-01 -7.152e-01 1.2 +++ +++ 1.632e+02 1.627e+02 -9.449e-01 -7.279e-01 1.08 +++ +++ 1.632e+02 1.627e+02 -9.449e-01 -7.343e-01 1.02 +++ +++ 1.632e+02 1.627e+02 -9.449e-01 -7.375e-01 0.989 +++ +++ 1.632e+02 1.627e+02 -9.449e-01 -7.359e-01 1 +++ ### errors for param 2 ### +++ 1.632e+02 1.630e+02 -2.529e+00 -2.369e+00 0.307 +++ +++ 1.632e+02 1.629e+02 -2.529e+00 -2.289e+00 0.681 +++ +++ 1.632e+02 1.627e+02 -2.529e+00 -2.249e+00 0.919 +++ +++ 1.632e+02 1.627e+02 -2.529e+00 -2.229e+00 1.05 +++ +++ 1.632e+02 1.627e+02 -2.529e+00 -2.239e+00 0.984 +++ +++ 1.632e+02 1.627e+02 -2.529e+00 -2.234e+00 1.02 +++ +++ 1.632e+02 1.627e+02 -2.529e+00 -2.236e+00 1 +++ ### errors for param 3 ### +++ 1.632e+02 1.630e+02 -2.695e+00 -2.567e+00 0.306 +++ +++ 1.632e+02 1.629e+02 -2.695e+00 -2.504e+00 0.681 +++ +++ 1.632e+02 1.627e+02 -2.695e+00 -2.472e+00 0.922 +++ +++ 1.632e+02 1.627e+02 -2.695e+00 -2.456e+00 1.05 +++ +++ 1.632e+02 1.627e+02 -2.695e+00 -2.464e+00 0.988 +++ +++ 1.632e+02 1.627e+02 -2.695e+00 -2.460e+00 1.02 +++ +++ 1.632e+02 1.627e+02 -2.695e+00 -2.462e+00 1 +++ ### errors for param 4 ### +++ 1.632e+02 1.629e+02 -2.813e+00 -2.614e+00 0.665 +++ +++ 1.632e+02 1.624e+02 -2.813e+00 -2.515e+00 1.57 +++ +++ 1.632e+02 1.627e+02 -2.813e+00 -2.565e+00 1.07 +++ +++ 1.632e+02 1.628e+02 -2.813e+00 -2.590e+00 0.853 +++ +++ 1.632e+02 1.627e+02 -2.813e+00 -2.577e+00 0.956 +++ +++ 1.632e+02 1.627e+02 -2.813e+00 -2.571e+00 1.01 +++ +++ 1.632e+02 1.627e+02 -2.813e+00 -2.574e+00 0.983 +++ +++ 1.632e+02 1.627e+02 -2.813e+00 -2.573e+00 0.997 +++ ### errors for param 5 ### +++ 1.632e+02 1.628e+02 -3.096e+00 -2.917e+00 0.837 +++ +++ 1.632e+02 1.623e+02 -3.096e+00 -2.827e+00 1.87 +++ +++ 1.632e+02 1.625e+02 -3.096e+00 -2.872e+00 1.29 +++ +++ 1.632e+02 1.627e+02 -3.096e+00 -2.895e+00 1.06 +++ +++ 1.632e+02 1.627e+02 -3.096e+00 -2.906e+00 0.947 +++ +++ 1.632e+02 1.627e+02 -3.096e+00 -2.900e+00 1 +++ ### errors for param 6 ### +++ 1.632e+02 1.627e+02 -3.327e+00 -3.165e+00 0.992 +++ ### errors for param 7 ### +++ 1.632e+02 1.631e+02 -3.880e+00 -3.769e+00 0.278 +++ +++ 1.632e+02 1.629e+02 -3.880e+00 -3.714e+00 0.631 +++ +++ 1.632e+02 1.628e+02 -3.880e+00 -3.686e+00 0.862 +++ +++ 1.632e+02 1.627e+02 -3.880e+00 -3.672e+00 0.991 +++ ******************** -0.119263 -0.944854 -2.52866 -2.69453 -2.81277 -3.09632 -3.32687 -3.87987 0.246439 0.208948 0.29245 0.232296 0.24017 0.196142 0.161799 0.207668 ********************
xscale('log'); ylim(-6,2)
errorbar(fqd, p1, yerr=p1e, fmt='o', ms=10, color="green")
errorbar(fqd, p2, yerr=p2e, fmt='o', ms=10, color="black")
<Container object of 3 artists>
Cx = clag.clag('cxd10r', [[t1,t2]], [[l1,l2]], [[l1e,l2e]], dt, fqL, p1, p2)
p = np.concatenate( ((p1+p2)*0.5-0.3,p1*0+0.1) ) # a good starting point generally
p, pe = clag.optimize(Cx, p)
1 2.664e+02 1.060e+01 inf -- 2.187e+02 -- -0.209329 -0.861493 -2.15962 -2.40847 -2.77148 -3.0939 -3.74416 -6.23993 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 3 2.987e+01 1.264e+01 2.257e+00 -- 2.210e+02 -- -0.16831 -0.824919 -2.12464 -2.39488 -2.7608 -3.0706 -3.74724 -5.93993 0.0804747 0.16472 0.155918 0.19816 0.150032 0.148466 -0.0426696 2.76354 5 3.330e+01 1.479e+01 2.062e+00 -- 2.230e+02 -- -0.134691 -0.793404 -2.09481 -2.37915 -2.74942 -3.04926 -3.74185 -6.23993 0.0666414 0.2131 0.199386 0.281712 0.193626 0.185727 -0.170109 -2.41599 7 4.032e+02 1.707e+01 1.889e+00 -- 2.249e+02 -- -0.106698 -0.766368 -2.06929 -2.36269 -2.73774 -3.02999 -3.73105 -6.53993 0.0565128 0.250258 0.234434 0.352126 0.231411 0.214451 -0.279352 -0.654819 9 1.006e+02 1.948e+01 1.734e+00 -- 2.267e+02 -- -0.0831017 -0.743148 -2.04735 -2.34643 -2.7261 -3.0127 -3.71739 -6.23993 0.0489265 0.27947 0.263536 0.411371 0.264011 0.236678 -0.370557 0.617417 11 5.264e+01 2.201e+01 1.603e+00 -- 2.283e+02 -- -0.0630157 -0.723142 -2.02838 -2.33091 -2.71472 -2.99725 -3.70277 -5.93993 0.0431576 0.302888 0.288287 0.46139 0.292059 0.253914 -0.445773 0.691506 13 3.251e+00 2.467e+01 1.448e+00 -- 2.297e+02 -- -0.0457823 -0.705838 -2.0119 -2.31642 -2.70374 -2.98344 -3.68838 -5.63993 0.0387303 0.321962 0.309779 0.503862 0.316158 0.267284 -0.507655 -2.9489 15 5.697e+00 2.744e+01 1.389e+00 -- 2.311e+02 -- -0.0308979 -0.690819 -1.99751 -2.30307 -2.6933 -2.97112 -3.67473 -5.93993 0.0353185 0.337702 0.32866 0.540271 0.336854 0.27759 -0.559235 -3.12456 17 9.962e+01 3.030e+01 1.295e+00 -- 2.324e+02 -- -0.0179753 -0.677732 -1.9849 -2.29088 -2.68339 -2.9601 -3.66228 -6.23993 0.0326949 0.350836 0.34562 0.571642 0.354613 0.285527 -0.602072 1.49229 19 8.259e+01 3.325e+01 1.196e+00 -- 2.336e+02 -- -0.00670527 -0.666291 -1.97381 -2.2798 -2.67406 -2.95025 -3.6511 -5.93993 0.0306947 0.361894 0.361049 0.598897 0.369841 0.291591 -0.63793 -0.807155 21 5.466e+01 3.625e+01 1.126e+00 -- 2.347e+02 -- 0.00316205 -0.65626 -1.96403 -2.26977 -2.6653 -2.94143 -3.64118 -5.63993 0.0291917 0.371274 0.375204 0.622756 0.382913 0.296138 -0.668602 -0.4239 23 9.811e+00 3.926e+01 1.030e+00 -- 2.358e+02 -- 0.0118288 -0.647441 -1.95537 -2.26071 -2.65711 -2.93352 -3.63242 -5.33993 0.0280965 0.379279 0.388328 0.643807 0.394112 0.29949 -0.69488 1.89304 24 1.540e+02 1.799e+03 6.966e+00 -- 2.427e+02 -- 0.0881649 -0.569745 -1.87911 -2.17878 -2.58105 -2.86227 -3.55241 -6.66644 0.0206511 0.447973 0.510379 0.832388 0.489337 0.32364 -0.914155 2.17049 25 6.954e+03 5.225e+01 3.722e+00 -- 2.464e+02 -- 0.0820074 -0.577455 -1.8985 -2.17524 -2.54532 -2.85023 -3.57378 -8 0.0966827 0.412543 0.647274 0.885367 0.477195 0.280838 -0.833819 0.980251 26 6.093e+00 2.044e+01 2.548e-01 -- 2.467e+02 -- 0.0836413 -0.576897 -1.8864 -2.18141 -2.55069 -2.85268 -3.54966 -5 0.0710854 0.434328 0.591545 0.904499 0.417485 0.266475 -0.938934 1.34469 27 1.995e+00 5.009e+00 1.592e-01 -- 2.469e+02 -- 0.0831948 -0.576805 -1.88848 -2.17663 -2.54734 -2.85305 -3.5567 -4.22205 0.0761925 0.426631 0.625953 0.910649 0.424127 0.266244 -0.891405 -0.565813 28 1.248e+00 1.375e+01 4.599e-02 -- 2.469e+02 -- 0.0833105 -0.576655 -1.88396 -2.17799 -2.5475 -2.85314 -3.57374 -4.03476 0.0730522 0.429262 0.625062 0.905512 0.418149 0.264942 -0.967314 0.563133 29 2.171e+00 9.396e+00 3.382e-01 -- 2.472e+02 -- 0.0829995 -0.576375 -1.88776 -2.17599 -2.54493 -2.85329 -3.58608 -4.02931 0.0763743 0.428086 0.638377 0.920493 0.411594 0.274496 -0.815157 -0.139608 30 9.841e-01 1.149e+01 1.388e-01 -- 2.474e+02 -- 0.0832295 -0.57636 -1.88467 -2.17976 -2.54698 -2.8543 -3.58978 -3.89975 0.0738415 0.429686 0.629413 0.910992 0.412336 0.271501 -0.957932 0.163421 31 2.338e+01 3.752e+00 6.030e-02 -- 2.474e+02 -- 0.0829583 -0.576172 -1.88634 -2.17783 -2.54432 -2.85466 -3.60447 -3.874 0.0761271 0.428633 0.633503 0.910755 0.410289 0.277401 -0.858061 0.00260138 32 3.920e-01 3.182e+00 1.581e-02 -- 2.475e+02 -- 0.0830523 -0.576117 -1.88559 -2.18042 -2.54532 -2.85537 -3.60659 -3.85372 0.0749087 0.429912 0.628364 0.908088 0.410987 0.278401 -0.917876 0.0634286 33 3.181e-01 1.292e+00 4.081e-03 -- 2.475e+02 -- 0.0829733 -0.576083 -1.88614 -2.17987 -2.54423 -2.85554 -3.60968 -3.84594 0.0757541 0.429324 0.627903 0.906455 0.410964 0.280705 -0.882158 0.0385634 34 9.740e-02 4.768e-01 1.118e-03 -- 2.475e+02 -- 0.0830058 -0.576059 -1.88614 -2.18078 -2.54437 -2.85582 -3.61078 -3.84115 0.0755814 0.429797 0.625777 0.906066 0.411713 0.281667 -0.897167 0.0508303 35 6.139e-02 4.667e-01 3.378e-04 -- 2.475e+02 -- 0.0829936 -0.576051 -1.88632 -2.18077 -2.54398 -2.85585 -3.61168 -3.83901 0.0759106 0.429622 0.624827 0.905205 0.411841 0.282606 -0.888007 0.0458794 36 2.074e-02 6.100e-02 1.146e-04 -- 2.475e+02 -- 0.0830052 -0.576043 -1.8864 -2.18106 -2.54393 -2.85595 -3.61204 -3.83759 0.0759487 0.42976 0.623936 0.905027 0.412248 0.283153 -0.891435 0.0486959 37 1.454e-02 1.834e-01 4.331e-05 -- 2.475e+02 -- 0.0830055 -0.57604 -1.88647 -2.18112 -2.54378 -2.85597 -3.61236 -3.83689 0.0760799 0.429719 0.623352 0.904662 0.412343 0.283555 -0.889115 0.047686 ******************** 0.0830055 -0.57604 -1.88647 -2.18112 -2.54378 -2.85597 -3.61236 -3.83689 0.0760799 0.429719 0.623352 0.904662 0.412343 0.283555 -0.889115 0.047686 0.00496524 0.0080639 0.0332817 0.053869 0.0497847 0.0510814 0.188809 0.22006 0.0806462 0.0938084 0.215752 0.243886 0.211727 0.201233 0.481882 0.380625 0.183432 0.0383088 -0.0465819 -0.037514 0.0169821 -0.0145299 -0.00365015 0.00975964 0.0073746 0.00371696 -0.00866648 -0.0017458 0.00395749 0.0070437 -0.00320102 0.00463012 ********************
%autoreload
p, pe = clag.errors(Cx, p, pe)
ERROR:root:Line magic function `%autoreload` not found.
### errors for param 0 ### +++ 2.475e+02 2.473e+02 8.301e-02 8.549e-02 0.306 +++ +++ 2.475e+02 2.470e+02 8.301e-02 8.673e-02 0.912 +++ +++ 2.475e+02 2.467e+02 8.301e-02 8.735e-02 1.46 +++ +++ 2.475e+02 2.469e+02 8.301e-02 8.704e-02 1.16 +++ +++ 2.475e+02 2.469e+02 8.301e-02 8.689e-02 1.03 +++ +++ 2.475e+02 2.470e+02 8.301e-02 8.681e-02 0.969 +++ +++ 2.475e+02 2.470e+02 8.301e-02 8.685e-02 0.999 +++ ### errors for param 1 ### +++ 2.475e+02 2.473e+02 -5.760e-01 -5.720e-01 0.399 +++ +++ 2.475e+02 2.469e+02 -5.760e-01 -5.700e-01 1.13 +++ +++ 2.475e+02 2.471e+02 -5.760e-01 -5.710e-01 0.698 +++ +++ 2.475e+02 2.470e+02 -5.760e-01 -5.705e-01 0.897 +++ +++ 2.475e+02 2.470e+02 -5.760e-01 -5.702e-01 1.01 +++ ### errors for param 2 ### +++ 2.475e+02 2.473e+02 -1.887e+00 -1.870e+00 0.291 +++ +++ 2.475e+02 2.470e+02 -1.887e+00 -1.862e+00 0.915 +++ +++ 2.475e+02 2.467e+02 -1.887e+00 -1.857e+00 1.53 +++ +++ 2.475e+02 2.469e+02 -1.887e+00 -1.859e+00 1.18 +++ +++ 2.475e+02 2.469e+02 -1.887e+00 -1.860e+00 1.04 +++ +++ 2.475e+02 2.470e+02 -1.887e+00 -1.861e+00 0.971 +++ +++ 2.475e+02 2.470e+02 -1.887e+00 -1.861e+00 1 +++ ### errors for param 3 ### +++ 2.475e+02 2.473e+02 -2.181e+00 -2.154e+00 0.29 +++ +++ 2.475e+02 2.471e+02 -2.181e+00 -2.141e+00 0.808 +++ +++ 2.475e+02 2.468e+02 -2.181e+00 -2.134e+00 1.25 +++ +++ 2.475e+02 2.470e+02 -2.181e+00 -2.137e+00 1.01 +++ +++ 2.475e+02 2.470e+02 -2.181e+00 -2.139e+00 0.905 +++ +++ 2.475e+02 2.470e+02 -2.181e+00 -2.138e+00 0.957 +++ +++ 2.475e+02 2.470e+02 -2.181e+00 -2.138e+00 0.984 +++ +++ 2.475e+02 2.470e+02 -2.181e+00 -2.138e+00 0.997 +++ ### errors for param 4 ### +++ 2.475e+02 2.470e+02 -2.544e+00 -2.494e+00 0.973 +++ +++ 2.475e+02 2.459e+02 -2.544e+00 -2.469e+00 3.08 +++ +++ 2.475e+02 2.466e+02 -2.544e+00 -2.482e+00 1.78 +++ +++ 2.475e+02 2.468e+02 -2.544e+00 -2.488e+00 1.32 +++ +++ 2.475e+02 2.469e+02 -2.544e+00 -2.491e+00 1.14 +++ +++ 2.475e+02 2.469e+02 -2.544e+00 -2.492e+00 1.05 +++ +++ 2.475e+02 2.470e+02 -2.544e+00 -2.493e+00 1.01 +++ +++ 2.475e+02 2.470e+02 -2.544e+00 -2.494e+00 0.993 +++ ### errors for param 5 ### +++ 2.475e+02 2.473e+02 -2.856e+00 -2.830e+00 0.277 +++ +++ 2.475e+02 2.471e+02 -2.856e+00 -2.818e+00 0.713 +++ +++ 2.475e+02 2.469e+02 -2.856e+00 -2.811e+00 1.04 +++ +++ 2.475e+02 2.470e+02 -2.856e+00 -2.814e+00 0.867 +++ +++ 2.475e+02 2.470e+02 -2.856e+00 -2.813e+00 0.953 +++ +++ 2.475e+02 2.470e+02 -2.856e+00 -2.812e+00 0.993 +++ ### errors for param 6 ### +++ 2.475e+02 2.473e+02 -3.612e+00 -3.518e+00 0.392 +++ +++ 2.475e+02 2.469e+02 -3.612e+00 -3.471e+00 1.06 +++ +++ 2.475e+02 2.471e+02 -3.612e+00 -3.494e+00 0.67 +++ +++ 2.475e+02 2.470e+02 -3.612e+00 -3.483e+00 0.845 +++ +++ 2.475e+02 2.470e+02 -3.612e+00 -3.477e+00 0.947 +++ +++ 2.475e+02 2.470e+02 -3.612e+00 -3.474e+00 1 +++ ### errors for param 7 ### +++ 2.475e+02 2.474e+02 -3.836e+00 -3.727e+00 0.218 +++ +++ 2.475e+02 2.471e+02 -3.836e+00 -3.672e+00 0.684 +++ +++ 2.475e+02 2.469e+02 -3.836e+00 -3.644e+00 1.16 +++ +++ 2.475e+02 2.470e+02 -3.836e+00 -3.658e+00 0.894 +++ +++ 2.475e+02 2.470e+02 -3.836e+00 -3.651e+00 1.02 +++ +++ 2.475e+02 2.470e+02 -3.836e+00 -3.654e+00 0.955 +++ +++ 2.475e+02 2.470e+02 -3.836e+00 -3.653e+00 0.988 +++ +++ 2.475e+02 2.470e+02 -3.836e+00 -3.652e+00 1 +++ ### errors for param 8 ### +++ 2.475e+02 2.470e+02 7.613e-02 1.568e-01 0.869 +++ +++ 2.475e+02 2.465e+02 7.613e-02 1.971e-01 1.9 +++ +++ 2.475e+02 2.468e+02 7.613e-02 1.769e-01 1.35 +++ +++ 2.475e+02 2.469e+02 7.613e-02 1.668e-01 1.1 +++ +++ 2.475e+02 2.470e+02 7.613e-02 1.618e-01 0.98 +++ +++ 2.475e+02 2.469e+02 7.613e-02 1.643e-01 1.04 +++ +++ 2.475e+02 2.470e+02 7.613e-02 1.630e-01 1.01 +++ ### errors for param 9 ### +++ 2.475e+02 2.473e+02 4.298e-01 4.767e-01 0.29 +++ +++ 2.475e+02 2.471e+02 4.298e-01 5.001e-01 0.641 +++ +++ 2.475e+02 2.470e+02 4.298e-01 5.118e-01 0.863 +++ +++ 2.475e+02 2.470e+02 4.298e-01 5.177e-01 0.985 +++ +++ 2.475e+02 2.469e+02 4.298e-01 5.206e-01 1.05 +++ +++ 2.475e+02 2.470e+02 4.298e-01 5.192e-01 1.02 +++ +++ 2.475e+02 2.470e+02 4.298e-01 5.184e-01 1 +++ ### errors for param 10 ### +++ 2.475e+02 2.471e+02 6.230e-01 8.388e-01 0.802 +++ +++ 2.475e+02 2.466e+02 6.230e-01 9.467e-01 1.77 +++ +++ 2.475e+02 2.468e+02 6.230e-01 8.928e-01 1.25 +++ +++ 2.475e+02 2.470e+02 6.230e-01 8.658e-01 1.02 +++ +++ 2.475e+02 2.470e+02 6.230e-01 8.523e-01 0.906 +++ +++ 2.475e+02 2.470e+02 6.230e-01 8.591e-01 0.96 +++ +++ 2.475e+02 2.470e+02 6.230e-01 8.624e-01 0.988 +++ +++ 2.475e+02 2.470e+02 6.230e-01 8.641e-01 1 +++ ### errors for param 11 ### +++ 2.475e+02 2.470e+02 9.046e-01 1.149e+00 0.88 +++ +++ 2.475e+02 2.465e+02 9.046e-01 1.271e+00 1.88 +++ +++ 2.475e+02 2.468e+02 9.046e-01 1.210e+00 1.35 +++ +++ 2.475e+02 2.469e+02 9.046e-01 1.179e+00 1.1 +++ +++ 2.475e+02 2.470e+02 9.046e-01 1.164e+00 0.989 +++ +++ 2.475e+02 2.469e+02 9.046e-01 1.171e+00 1.05 +++ +++ 2.475e+02 2.470e+02 9.046e-01 1.168e+00 1.02 +++ +++ 2.475e+02 2.470e+02 9.046e-01 1.166e+00 1 +++ ### errors for param 12 ### +++ 2.475e+02 2.471e+02 4.125e-01 6.242e-01 0.737 +++ +++ 2.475e+02 2.467e+02 4.125e-01 7.300e-01 1.59 +++ +++ 2.475e+02 2.469e+02 4.125e-01 6.771e-01 1.13 +++ +++ 2.475e+02 2.470e+02 4.125e-01 6.507e-01 0.924 +++ +++ 2.475e+02 2.469e+02 4.125e-01 6.639e-01 1.02 +++ +++ 2.475e+02 2.470e+02 4.125e-01 6.573e-01 0.974 +++ +++ 2.475e+02 2.470e+02 4.125e-01 6.606e-01 0.999 +++ ### errors for param 13 ### +++ 2.475e+02 2.470e+02 2.838e-01 4.851e-01 0.854 +++ +++ 2.475e+02 2.465e+02 2.838e-01 5.857e-01 1.84 +++ +++ 2.475e+02 2.468e+02 2.838e-01 5.354e-01 1.31 +++ +++ 2.475e+02 2.469e+02 2.838e-01 5.103e-01 1.07 +++ +++ 2.475e+02 2.470e+02 2.838e-01 4.977e-01 0.96 +++ +++ 2.475e+02 2.470e+02 2.838e-01 5.040e-01 1.01 +++ +++ 2.475e+02 2.470e+02 2.838e-01 5.008e-01 0.987 +++ +++ 2.475e+02 2.470e+02 2.838e-01 5.024e-01 1 +++ ### errors for param 14 ### +++ 2.475e+02 2.470e+02 -8.899e-01 -4.078e-01 0.957 +++ +++ 2.475e+02 2.465e+02 -8.899e-01 -1.668e-01 1.91 +++ +++ 2.475e+02 2.468e+02 -8.899e-01 -2.873e-01 1.41 +++ +++ 2.475e+02 2.469e+02 -8.899e-01 -3.476e-01 1.18 +++ +++ 2.475e+02 2.469e+02 -8.899e-01 -3.777e-01 1.07 +++ +++ 2.475e+02 2.470e+02 -8.899e-01 -3.928e-01 1.01 +++ +++ 2.475e+02 2.470e+02 -8.899e-01 -4.003e-01 0.984 +++ +++ 2.475e+02 2.470e+02 -8.899e-01 -3.965e-01 0.998 +++ ### errors for param 15 ### +++ 2.475e+02 2.471e+02 4.838e-02 4.285e-01 0.661 +++ +++ 2.475e+02 2.470e+02 4.838e-02 6.186e-01 0.961 +++ +++ 2.475e+02 2.469e+02 4.838e-02 7.136e-01 1.07 +++ +++ 2.475e+02 2.470e+02 4.838e-02 6.661e-01 1.02 +++ +++ 2.475e+02 2.470e+02 4.838e-02 6.424e-01 0.991 +++ ******************** 0.0830101 -0.576037 -1.88651 -2.18123 -2.54372 -2.856 -3.61248 -3.8364 0.0761257 0.429759 0.622953 0.90456 0.412522 0.283831 -0.889856 0.0483793 0.00383825 0.00579502 0.025767 0.0436043 0.050153 0.0439107 0.138708 0.1845 0.086924 0.0886716 0.241158 0.261188 0.248061 0.218563 0.493323 0.593987 ********************
phi, phie = p[nfq:], pe[nfq:]
lag, lage = phi/(2*np.pi*fqd), phie/(2*np.pi*fqd)
cx, cxe = p[:nfq], pe[:nfq]
xscale('log'); ylim(-10,10)
errorbar(fqd, lag, yerr=lage, fmt='o', ms=10,color="black")
<Container object of 3 artists>
s, loc, scale = lognorm.fit(lag,loc=.01)
xscale('log'); ylim(-1,5)
errorbar(fqd, lag, yerr=lage, fmt='o', ms=10,color="black")
plot(fqd,lognorm.pdf(fqd,s,loc,scale))
np.linspace(fqd[0],fqd[-1]),np.logspace(fqd[0],fqd[-1]),fqd
(array([ 0.00964867, 0.01962026, 0.02959184, 0.03956343, 0.04953501, 0.0595066 , 0.06947819, 0.07944977, 0.08942136, 0.09939294, 0.10936453, 0.11933612, 0.1293077 , 0.13927929, 0.14925087, 0.15922246, 0.16919404, 0.17916563, 0.18913722, 0.1991088 , 0.20908039, 0.21905197, 0.22902356, 0.23899514, 0.24896673, 0.25893832, 0.2689099 , 0.27888149, 0.28885307, 0.29882466, 0.30879624, 0.31876783, 0.32873942, 0.338711 , 0.34868259, 0.35865417, 0.36862576, 0.37859734, 0.38856893, 0.39854052, 0.4085121 , 0.41848369, 0.42845527, 0.43842686, 0.44839844, 0.45837003, 0.46834162, 0.4783132 , 0.48828479, 0.49825637]), array([ 1.02246552, 1.04621335, 1.07051275, 1.09537652, 1.12081779, 1.14684995, 1.17348674, 1.20074219, 1.22863069, 1.25716692, 1.28636593, 1.31624312, 1.34681424, 1.37809541, 1.41010312, 1.44285423, 1.47636603, 1.51065617, 1.54574274, 1.58164423, 1.61837957, 1.65596812, 1.69442971, 1.73378461, 1.77405357, 1.81525782, 1.85741907, 1.90055957, 1.94470205, 1.98986979, 2.03608659, 2.08337683, 2.13176543, 2.18127791, 2.23194037, 2.28377951, 2.33682268, 2.39109782, 2.44663357, 2.50345919, 2.56160464, 2.62110058, 2.68197838, 2.74427013, 2.80800867, 2.8732276 , 2.93996131, 3.00824498, 3.07811461, 3.14960704]), array([ 0.00964867, 0.02886003, 0.0556922 , 0.08632291, 0.13380051, 0.20739079, 0.32145572, 0.49825637]))