mirror of
https://asciireactor.com/otho/phy-4660.git
synced 2024-11-25 08:35:07 +00:00
624 lines
126 KiB
Plaintext
624 lines
126 KiB
Plaintext
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 1,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"Populating the interactive namespace from numpy and matplotlib\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<Container object of 3 artists>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 1,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAg8AAAFkCAYAAACn/timAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAIABJREFUeJzt3X18VPWd9/9XSAKSRBRwbFEoxFBYg1pNKhD6s+qCqFBy\n1UI35PGzbbjorle73V2vSzK22u7P31W07aRre117tbXXlpL21zWmWnYXoevderNU7mro9sb4kxID\nyO2MiDcQhNyc64/vHOcmM8lM5szMOTPv5+ORR2BmMufkmzPnfM73+/l+viAiIiIiIiIiIiIiIiIi\nIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIjJm+4GhBF//K4/7JCIiIi42Fbg46msxJnj4\neD53SkRERLzju8DefO+EiIiIeMN44A3gy/neEREREXFOWRbf+5PABUD7CK+ZFv4SERGR9BwNf+Vc\nSRbf+0ngPeA/JXl+2iWXXHLkyJEjWdwFERGRgnUYuJY8BBDZ6nmYiUmWvG2E10w7cuQIP/vZz7j8\n8suztBsS78477+S73/1uvnejqKjNc09tnntq89x65ZVXuP322y/F9N4XTPCwBjgObB3thZdffjl1\ndXVZ2g2Jd+GFF6q9c0xt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24loKHkRSFAwG+cUvniVxkKDx62IUm7dgqkbCVmAz8EsGBj7E2rW+\nhEGAz+fjD3/oZPXqn1FVVQdcCXyUqqq/orFxHj/7mZJtxb2U8yCSorvvbqO//xISBwkavy5Go+Ut\nzJw5yObNyX/esix+/et
|
||
|
"text/plain": [
|
||
|
"<matplotlib.figure.Figure at 0x7f736504bd10>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"import numpy as np\n",
|
||
|
"import sys\n",
|
||
|
"import getopt\n",
|
||
|
"sys.path.insert(1,\"/usr/local/science/clag/\")\n",
|
||
|
"import clag\n",
|
||
|
"%pylab inline\n",
|
||
|
"\n",
|
||
|
"from scipy.stats import norm\n",
|
||
|
"from scipy.stats import lognorm\n",
|
||
|
"from scipy.optimize import curve_fit\n",
|
||
|
"import numpy.fft\n",
|
||
|
"\n",
|
||
|
"ref_file=\"lc/1367A.lc\"\n",
|
||
|
"echo_file=\"lc/5404A.lc\"\n",
|
||
|
"\n",
|
||
|
"dt = 0.01\n",
|
||
|
"t1, l1, l1e = np.loadtxt(ref_file).T\n",
|
||
|
"errorbar(t1, l1, yerr=l1e, fmt='o')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 2,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"array([ 0.005 , 0.01861938, 0.04473305, 0.06933623, 0.10747115,\n",
|
||
|
" 0.16658029, 0.25819945, 0.40020915, 0.62032418])"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 2,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"fqL = np.array([0.0049999999, 0.018619375, 0.044733049, 0.069336227, 0.10747115, 0.16658029, \n",
|
||
|
" 0.25819945, 0.40020915, 0.62032418])\n",
|
||
|
"# fqL = np.logspace(np.log10(0.0006),np.log10(1.2),11)\n",
|
||
|
"nfq = len(fqL) - 1\n",
|
||
|
"fqd = 10**(np.log10( (fqL[:-1]*fqL[1:]) )/2.)\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"fqL\n",
|
||
|
"\n",
|
||
|
"\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 3,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
" 1 4.342e-01 5.077e+01 inf -- -5.530e+02 -- 1 1 1 1 1 1 1 1\n",
|
||
|
" 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\n",
|
||
|
" 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\n",
|
||
|
" 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\n",
|
||
|
" 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\n",
|
||
|
" 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\n",
|
||
|
" 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\n",
|
||
|
" 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\n",
|
||
|
" 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\n",
|
||
|
" 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\n",
|
||
|
" 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\n",
|
||
|
" 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\n",
|
||
|
" 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\n",
|
||
|
" 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\n",
|
||
|
" 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\n",
|
||
|
" 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\n",
|
||
|
" 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\n",
|
||
|
"********************\n",
|
||
|
"0.300599 -0.178134 -1.19059 -1.52242 -2.13017 -2.49148 -3.56148 -8\n",
|
||
|
"0.238931 0.202434 0.232634 0.177249 0.153039 0.132988 0.297259 3285.23\n",
|
||
|
"-0.000915535 -0.00131061 -0.00195128 -0.00497899 -0.0226059 -0.0776175 -0.280541 -0.000206646\n",
|
||
|
"********************\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"P1 = clag.clag('psd10r', [t1], [l1], [l1e], dt, fqL)\n",
|
||
|
"p1 = np.ones(nfq)\n",
|
||
|
"p1, p1e = clag.optimize(P1, p1)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 4,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"\t### errors for param 0 ###\n",
|
||
|
"+++ 3.525e+01 3.480e+01 3.006e-01 5.395e-01 0.891 +++\n",
|
||
|
"+++ 3.525e+01 3.431e+01 3.006e-01 6.590e-01 1.87 +++\n",
|
||
|
"+++ 3.525e+01 3.458e+01 3.006e-01 5.993e-01 1.34 +++\n",
|
||
|
"+++ 3.525e+01 3.469e+01 3.006e-01 5.694e-01 1.11 +++\n",
|
||
|
"+++ 3.525e+01 3.475e+01 3.006e-01 5.545e-01 0.997 +++\n",
|
||
|
"\t### errors for param 1 ###\n",
|
||
|
"+++ 3.525e+01 3.476e+01 -1.781e-01 2.430e-02 0.973 +++\n",
|
||
|
"+++ 3.525e+01 3.421e+01 -1.781e-01 1.255e-01 2.07 +++\n",
|
||
|
"+++ 3.525e+01 3.451e+01 -1.781e-01 7.491e-02 1.48 +++\n",
|
||
|
"+++ 3.525e+01 3.464e+01 -1.781e-01 4.961e-02 1.21 +++\n",
|
||
|
"+++ 3.525e+01 3.470e+01 -1.781e-01 3.696e-02 1.09 +++\n",
|
||
|
"+++ 3.525e+01 3.473e+01 -1.781e-01 3.063e-02 1.03 +++\n",
|
||
|
"+++ 3.525e+01 3.475e+01 -1.781e-01 2.747e-02 1 +++\n",
|
||
|
"\t### errors for param 2 ###\n",
|
||
|
"+++ 3.525e+01 3.511e+01 -1.191e+00 -1.074e+00 0.276 +++\n",
|
||
|
"+++ 3.525e+01 3.495e+01 -1.191e+00 -1.016e+00 0.598 +++\n",
|
||
|
"+++ 3.525e+01 3.485e+01 -1.191e+00 -9.870e-01 0.8 +++\n",
|
||
|
"+++ 3.525e+01 3.479e+01 -1.191e+00 -9.725e-01 0.91 +++\n",
|
||
|
"+++ 3.525e+01 3.476e+01 -1.191e+00 -9.652e-01 0.968 +++\n",
|
||
|
"+++ 3.525e+01 3.475e+01 -1.191e+00 -9.616e-01 0.997 +++\n",
|
||
|
"\t### errors for param 3 ###\n",
|
||
|
"+++ 3.525e+01 3.482e+01 -1.522e+00 -1.345e+00 0.865 +++\n",
|
||
|
"+++ 3.525e+01 3.432e+01 -1.522e+00 -1.257e+00 1.86 +++\n",
|
||
|
"+++ 3.525e+01 3.459e+01 -1.522e+00 -1.301e+00 1.32 +++\n",
|
||
|
"+++ 3.525e+01 3.471e+01 -1.522e+00 -1.323e+00 1.08 +++\n",
|
||
|
"+++ 3.525e+01 3.476e+01 -1.522e+00 -1.334e+00 0.97 +++\n",
|
||
|
"+++ 3.525e+01 3.473e+01 -1.522e+00 -1.329e+00 1.03 +++\n",
|
||
|
"+++ 3.525e+01 3.475e+01 -1.522e+00 -1.331e+00 0.998 +++\n",
|
||
|
"\t### errors for param 4 ###\n",
|
||
|
"+++ 3.525e+01 3.481e+01 -2.130e+00 -1.977e+00 0.874 +++\n",
|
||
|
"+++ 3.525e+01 3.429e+01 -2.130e+00 -1.901e+00 1.91 +++\n",
|
||
|
"+++ 3.525e+01 3.457e+01 -2.130e+00 -1.939e+00 1.35 +++\n",
|
||
|
"+++ 3.525e+01 3.470e+01 -2.130e+00 -1.958e+00 1.1 +++\n",
|
||
|
"+++ 3.525e+01 3.476e+01 -2.130e+00 -1.968e+00 0.983 +++\n",
|
||
|
"+++ 3.525e+01 3.473e+01 -2.130e+00 -1.963e+00 1.04 +++\n",
|
||
|
"+++ 3.525e+01 3.474e+01 -2.130e+00 -1.965e+00 1.01 +++\n",
|
||
|
"+++ 3.525e+01 3.475e+01 -2.130e+00 -1.966e+00 0.997 +++\n",
|
||
|
"\t### errors for param 5 ###\n",
|
||
|
"+++ 3.525e+01 3.474e+01 -2.491e+00 -2.358e+00 1.01 +++\n",
|
||
|
"+++ 3.525e+01 3.512e+01 -2.491e+00 -2.425e+00 0.263 +++\n",
|
||
|
"+++ 3.525e+01 3.496e+01 -2.491e+00 -2.392e+00 0.579 +++\n",
|
||
|
"+++ 3.525e+01 3.486e+01 -2.491e+00 -2.375e+00 0.781 +++\n",
|
||
|
"+++ 3.525e+01 3.480e+01 -2.491e+00 -2.367e+00 0.893 +++\n",
|
||
|
"+++ 3.525e+01 3.477e+01 -2.491e+00 -2.363e+00 0.952 +++\n",
|
||
|
"+++ 3.525e+01 3.476e+01 -2.491e+00 -2.361e+00 0.982 +++\n",
|
||
|
"+++ 3.525e+01 3.475e+01 -2.491e+00 -2.360e+00 0.997 +++\n",
|
||
|
"\t### errors for param 6 ###\n",
|
||
|
"+++ 3.525e+01 3.507e+01 -3.561e+00 -3.413e+00 0.363 +++\n",
|
||
|
"+++ 3.525e+01 3.484e+01 -3.561e+00 -3.339e+00 0.814 +++\n",
|
||
|
"+++ 3.525e+01 3.468e+01 -3.561e+00 -3.301e+00 1.13 +++\n",
|
||
|
"+++ 3.525e+01 3.477e+01 -3.561e+00 -3.320e+00 0.962 +++\n",
|
||
|
"+++ 3.525e+01 3.473e+01 -3.561e+00 -3.311e+00 1.04 +++\n",
|
||
|
"+++ 3.525e+01 3.475e+01 -3.561e+00 -3.315e+00 1 +++\n",
|
||
|
"\t### errors for param 7 ###\n",
|
||
|
"+++ 3.525e+01 3.524e+01 -8.000e+00 -6.000e+00 0.0178 +++\n",
|
||
|
"+++ 3.525e+01 3.515e+01 -8.000e+00 -5.000e+00 0.187 +++\n",
|
||
|
"+++ 3.525e+01 3.494e+01 -8.000e+00 -4.500e+00 0.618 +++\n",
|
||
|
"+++ 3.525e+01 3.466e+01 -8.000e+00 -4.250e+00 1.18 +++\n",
|
||
|
"+++ 3.525e+01 3.482e+01 -8.000e+00 -4.375e+00 0.851 +++\n",
|
||
|
"+++ 3.525e+01 3.475e+01 -8.000e+00 -4.312e+00 1 +++\n",
|
||
|
"********************\n",
|
||
|
"0.300605 -0.178131 -1.19059 -1.52241 -2.13019 -2.49148 -3.56144 -8\n",
|
||
|
"0.253864 0.205597 0.228999 0.191096 0.1638 0.131949 0.246154 3.6875\n",
|
||
|
"********************\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"p1, p1e = clag.errors(P1, p1, p1e)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 5,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<Container object of 3 artists>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 5,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAgkAAAFrCAYAAABbtho0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAGp1JREFUeJzt3X9s4/d93/HnxZaj5dxOi12RZ+98bLhdaBhJDbLSHzrb\n5TIn2IY26dBOIbFsiLTCQdoOuHUrcMMgzZCAYS2G9uqua3FbD9kQjNQNaDYH2LXFUKW5UVqnimm7\nbmadUT+W5kxmTXvr6kSpVnt/UHeR1I9+8I7fL389HwAhivx8vp+3cJ+TXvx+P9/vFyRJkiRJkiRJ\nkiRJkiRJkiRJkiRJkiRJkiRJkiRJkiRJkvSA/iGwBvwh0AQ+A1zsakWSJKkn3AT+NvA08H7gs8AW\n8K4u1iRJknrQ48BbwHPdLkSSJJ3sHTGONbb39fdjHFOSJPW4M7QON/xqtw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EVKtVcrkcpVKJbDbb5cqkwdROSPhp4N+e0Gb7AWrh8uXL\njI2NHXjNTwaSJLXs35t21507dyIbr52Q8NW9R2SuXr3qJwJJko4Q+uB8d69aFKJak/AU8O69rw8B\n3wGcAb4IvBnRmJIkqYOiOrthgdbahJeBs8AXgHUgmqgjaWhsbW0xOzvL9PQ0ANPT08zOzrK1tdXd\nwqQBFNWehI/jNRIkdVCz2aRQKFCr1Wg0Gvder9fr1Ot1bt68SSaToVwuk0gkulipNDg8BVJSz2s2\nm0xNTbGxsXFkm0ajQaPR4NKlS1QqFYOC1AFeTElSzysUCscGhP3q9TqFQiHiiqThYEiQ1NM2Nzep\n1Wpt9anVaq5RkDrAkCC
|
||
|
"text/plain": [
|
||
|
"<matplotlib.figure.Figure at 0x7f7388dbb2d0>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"xscale('log'); ylim(-4,2)\n",
|
||
|
"errorbar(fqd, p1, yerr=p1e, fmt='o', ms=10, color=\"black\")\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 6,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<Container object of 3 artists>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 6,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAg8AAAFkCAYAAACn/timAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAIABJREFUeJzt3Xt8XNV97/3P6GokWZYJwgbLWLKMHMuYGjsRxiaQ1Abj\n0nJLTDyEk8gPLU5f5FDatOa0aXuc8/Rc6qe5lCZPwS3FEJohQFsuIdiO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UDFWzbto158+Zl7sOIpEA9\nDyJJuv+b99Nf1h8/SAiiLugJKCpvoRzTA/El4A7gThiYPMBdLXfF7UGorq7muR88x+Ttk6Ex9Jo7\ngC9Dz8oefu/O3yMQCGTok4ikRsGDSJLa3m6DQuIHCdWo3sMENFbewqzKWTznfS5usSffLh8rv76S\nU9efUq6M5BwFDyJJGmAgcZCwDNgKHET1HiKkUrY5F6VTJMy7wEvlyUrlykhOUvAgkqQiimAp8RPj\nPoKis0WsYQ11W+rgh1C3pY7m0uYJvSx3vldRTLdImKZrSq7SQKxIkpoWNuE/5h+ZGBcEyqCwvpC9\nTXuZ89k5FJ8oZtaUWXxU9BF3tdyF9zLvhFynIKqKosXqlsd0yz/y/UeytXvjZtX7ePOpNzl+/Di8\ngAkaSqBgUgFVs6rCi1x5qxP/3bU2iuQqHZkiSQpnx1/RASswF8EhoMvcZe54buL2MCQSno0Qzwxo\na8nNbnlrIayPr/jYzL4Jza6gC+reqmOHL7ljoWlhE/5Of3RwZVGujLiYhi1EklRdXc2OLTtoLm1O\nODSR72P8qcrXbnm71qX
|
||
|
"text/plain": [
|
||
|
"<matplotlib.figure.Figure at 0x7f7364bb1710>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"t2, l2, l2e = np.loadtxt(echo_file).T\n",
|
||
|
"errorbar(t1, l1, yerr=l1e, fmt='o', color=\"green\")\n",
|
||
|
"errorbar(t2, l2, yerr=l2e, fmt='o', color=\"black\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 7,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
" 1 4.610e-01 9.098e+01 inf -- 1.744e+02 -- 1 1 1 1 1 1 1 1\n",
|
||
|
" 2 8.066e-01 8.980e+01 1.014e+02 -- 2.758e+02 -- 0.764458 0.592778 0.539049 0.562235 0.572289 0.566582 0.574488 0.570186\n",
|
||
|
" 3 4.133e+00 8.890e+01 1.012e+02 -- 3.771e+02 -- 0.390803 0.167503 0.104265 0.129187 0.143015 0.13475 0.14757 0.142553\n",
|
||
|
" 4 7.028e+01 8.821e+01 1.004e+02 -- 4.775e+02 -- 0.00503816 -0.253372 -0.326662 -0.304159 -0.285875 -0.29734 -0.280456 -0.284431\n",
|
||
|
" 5 8.140e-01 8.698e+01 9.903e+01 -- 5.765e+02 -- -0.34905 -0.657519 -0.755903 -0.73766 -0.713908 -0.729735 -0.710276 -0.71228\n",
|
||
|
" 6 3.770e-01 8.522e+01 9.618e+01 -- 6.727e+02 -- -0.633175 -1.02654 -1.18245 -1.1696 -1.13984 -1.16159 -1.14079 -1.13949\n",
|
||
|
" 7 2.735e-01 8.339e+01 9.226e+01 -- 7.650e+02 -- -0.806027 -1.33498 -1.60319 -1.59717 -1.56166 -1.59163 -1.57085 -1.56469\n",
|
||
|
" 8 2.138e-01 8.120e+01 8.777e+01 -- 8.527e+02 -- -0.862131 -1.54146 -2.00828 -2.01427 -1.9772 -2.01825 -2.00048 -1.98894\n",
|
||
|
" 9 1.754e-01 7.801e+01 8.241e+01 -- 9.351e+02 -- -0.842095 -1.59954 -2.37394 -2.40556 -2.38506 -2.43954 -2.42825 -2.41302\n",
|
||
|
" 10 1.483e-01 7.298e+01 7.502e+01 -- 1.010e+03 -- -0.783896 -1.56622 -2.64497 -2.73499 -2.78365 -2.85462 -2.85094 -2.83628\n",
|
||
|
" 11 1.272e-01 6.498e+01 6.421e+01 -- 1.074e+03 -- -0.728704 -1.54164 -2.75253 -2.94491 -3.15964 -3.25681 -3.26391 -3.25681\n",
|
||
|
" 12 1.111e-01 5.364e+01 4.985e+01 -- 1.124e+03 -- -0.697013 -1.52135 -2.76748 -3.01573 -3.47965 -3.61977 -3.65793 -3.67111\n",
|
||
|
" 13 9.921e-02 3.928e+01 3.311e+01 -- 1.157e+03 -- -0.68286 -1.50549 -2.78198 -3.01943 -3.7022 -3.88826 -4.01576 -4.07908\n",
|
||
|
" 14 8.742e-02 2.316e+01 1.815e+01 -- 1.175e+03 -- -0.67696 -1.49524 -2.79447 -3.00982 -3.82195 -4.00921 -4.30702 -4.48377\n",
|
||
|
" 15 6.880e-02 9.460e+00 7.667e+00 -- 1.183e+03 -- -0.675273 -1.48938 -2.80142 -2.99712 -3.87606 -4.02132 -4.49151 -4.87573\n",
|
||
|
" 16 3.697e-02 2.241e+00 2.003e+00 -- 1.185e+03 -- -0.675444 -1.48628 -2.80573 -2.98594 -3.90153 -4.01347 -4.55974 -5.21119\n",
|
||
|
" 17 6.073e-03 2.318e-01 2.232e-01 -- 1.185e+03 -- -0.675725 -1.48454 -2.80827 -2.9785 -3.91588 -4.0101 -4.56645 -5.40386\n",
|
||
|
" 18 8.426e-04 9.306e-02 4.878e-03 -- 1.185e+03 -- -0.675636 -1.48368 -2.80908 -2.97402 -3.92351 -4.00944 -4.56338 -5.43668\n",
|
||
|
" 19 4.159e-04 3.811e-02 3.790e-04 -- 1.185e+03 -- -0.675401 -1.48333 -2.809 -2.97151 -3.92669 -4.00953 -4.56255 -5.4346\n",
|
||
|
" 20 1.919e-04 1.760e-02 7.212e-05 -- 1.185e+03 -- -0.675286 -1.48317 -2.80889 -2.97028 -3.92799 -4.00961 -4.56253 -5.43514\n",
|
||
|
"********************\n",
|
||
|
"-0.675286 -1.48317 -2.80889 -2.97028 -3.92799 -4.00961 -4.56253 -5.43514\n",
|
||
|
"0.231904 0.203388 0.246283 0.177512 0.182405 0.144335 0.166268 0.423476\n",
|
||
|
"0.000864464 0.00208153 0.00125836 0.0175976 -0.0171085 -0.00187558 -1.56774e-05 2.12549e-05\n",
|
||
|
"********************\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"P2 = clag.clag('psd10r', [t2], [l2], [l2e], dt, fqL)\n",
|
||
|
"p2 = np.ones(nfq)\n",
|
||
|
"p2, p2e = clag.optimize(P2, p2)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 8,
|
||
|
"metadata": {
|
||
|
"collapsed": false,
|
||
|
"scrolled": true
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"\t### errors for param 0 ###\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -6.752e-01 -4.433e-01 0.84 +++\n",
|
||
|
"+++ 1.185e+03 1.184e+03 -6.752e-01 -3.274e-01 1.76 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -6.752e-01 -3.854e-01 1.27 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -6.752e-01 -4.144e-01 1.04 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -6.752e-01 -4.288e-01 0.94 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -6.752e-01 -4.216e-01 0.992 +++\n",
|
||
|
"\t### errors for param 1 ###\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -1.483e+00 -1.280e+00 0.943 +++\n",
|
||
|
"+++ 1.185e+03 1.184e+03 -1.483e+00 -1.178e+00 2 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -1.483e+00 -1.229e+00 1.43 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -1.483e+00 -1.254e+00 1.18 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -1.483e+00 -1.267e+00 1.06 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -1.483e+00 -1.273e+00 0.999 +++\n",
|
||
|
"\t### errors for param 2 ###\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -2.809e+00 -2.563e+00 0.987 +++\n",
|
||
|
"+++ 1.185e+03 1.184e+03 -2.809e+00 -2.439e+00 2.1 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -2.809e+00 -2.501e+00 1.5 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -2.809e+00 -2.532e+00 1.23 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -2.809e+00 -2.547e+00 1.11 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -2.809e+00 -2.555e+00 1.05 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -2.809e+00 -2.559e+00 1.02 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -2.809e+00 -2.561e+00 1 +++\n",
|
||
|
"\t### errors for param 3 ###\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -2.970e+00 -2.792e+00 0.612 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -2.970e+00 -2.703e+00 1.31 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -2.970e+00 -2.748e+00 0.934 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -2.970e+00 -2.726e+00 1.12 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -2.970e+00 -2.737e+00 1.02 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -2.970e+00 -2.742e+00 0.978 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -2.970e+00 -2.740e+00 1 +++\n",
|
||
|
"\t### errors for param 4 ###\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -3.929e+00 -3.746e+00 0.715 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -3.929e+00 -3.655e+00 1.61 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -3.929e+00 -3.701e+00 1.12 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -3.929e+00 -3.723e+00 0.906 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -3.929e+00 -3.712e+00 1.01 +++\n",
|
||
|
"\t### errors for param 5 ###\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -4.010e+00 -3.865e+00 0.991 +++\n",
|
||
|
"\t### errors for param 6 ###\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -4.563e+00 -4.396e+00 1.01 +++\n",
|
||
|
"\t### errors for param 7 ###\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -5.435e+00 -5.223e+00 0.386 +++\n",
|
||
|
"+++ 1.185e+03 1.185e+03 -5.435e+00 -5.118e+00 0.993 +++\n",
|
||
|
"********************\n",
|
||
|
"-0.675245 -1.48309 -2.80886 -2.96971 -3.92857 -4.00963 -4.56252 -5.43512\n",
|
||
|
"0.253646 0.209743 0.248217 0.230185 0.21667 0.144334 0.166265 0.317595\n",
|
||
|
"********************\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"p2, p2e = clag.errors(P2, p2, p2e)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 9,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<Container object of 3 artists>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 9,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAgkAAAFrCAYAAABbtho0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAIABJREFUeJzt3X9w2/d93/GnLDFW67ZWZI2AHHlChE6B4sjOyFC1ydil\nurZLvTbtklYFlmwXMpqzxq1P2+yb1p44H7nL0kbXuE7a5lSb6bpYIL1rssZ3Zp3+gGuXolOWTGyr\nJuIUJGgrFqAqitw2iVTa1v4AGVEyKBIkvvj5fNzhSAGfD75vSV9BL36/n+/3DZIkSZIkSZIkSZIk\nSZIkSZIkSZIkSZIkSZIkSZIkSZIkSVqj/w6MA38P5IEvADurWpEkSaoJI8B/AHYBNwGPAlng+6tY\nkyRJqkFbgNeBd1e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\nx8crOk+SGp0hQQ1jbm6uovMkqdEZEtQwWlpaKjpPkhqdIUENo6OjY1Xz9uzZU+ZKJKkxGBLUMPr6\n+giHwyXNCYfDHDp0KKCKJKm+GRLUMCKRCLFYrKQ5sViMSCQSTEGSVOcMCWooQ0NDRKPRFY2NRqMM\nDw8HXJEk1a+gQsKvAceA7wDfCmgb0huEQiFGR0fp7u5e8tRDOBymu7ubY8eO0draWuEKJal+BBUS\nWoBh4HcCen9pSaFQiFQqxdjYGD09Pd87shCNRunp6WFsbIxUKmVAkKRlBNXg6b75rx8K6P2lZUUi\nEQYHB5mcnKS9vZ1HHnmEtra2apclSXXDLpBqSMlkkmQyCcC5c+fYuXMnBw8eZOPGjQAkEgkSiUQ1\nS5SkmmdIUEMyBEjS2pU
|
||
|
"text/plain": [
|
||
|
"<matplotlib.figure.Figure at 0x7f7365078710>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"xscale('log'); ylim(-6,2)\n",
|
||
|
"errorbar(fqd, p1, yerr=p1e, fmt='o', ms=10, color=\"green\")\n",
|
||
|
"errorbar(fqd, p2, yerr=p2e, fmt='o', ms=10, color=\"black\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 10,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
" 1 3.996e+02 1.150e+01 inf -- 1.244e+03 -- -0.48732 -1.13061 -2.29972 -2.54606 -3.32938 -3.55056 -4.36198 -7.01756 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1\n",
|
||
|
" 3 1.146e+02 1.274e+01 2.644e+00 -- 1.247e+03 -- -0.46592 -1.09839 -2.27929 -2.51606 -3.2945 -3.53263 -4.40205 -7.31756 0.173375 0.179509 0.201787 0.171316 0.150055 0.152867 0.0990853 -2.1868\n",
|
||
|
" 5 6.107e+01 1.422e+01 2.363e+00 -- 1.249e+03 -- -0.445096 -1.06944 -2.25767 -2.48924 -3.26504 -3.51627 -4.44162 -7.01756 0.23367 0.240665 0.283299 0.22705 0.187337 0.196036 0.0982347 -2.11553\n",
|
||
|
" 7 2.105e+01 1.585e+01 2.131e+00 -- 1.251e+03 -- -0.425484 -1.04389 -2.23659 -2.46561 -3.24012 -3.50157 -4.48059 -6.71756 0.283283 0.288529 0.348404 0.27129 0.21583 0.231595 0.0974289 -2.46919\n",
|
||
|
" 9 2.358e+01 1.743e+01 1.909e+00 -- 1.253e+03 -- -0.40737 -1.02151 -2.21687 -2.44489 -3.21894 -3.48846 -4.51886 -6.41756 0.324291 0.326635 0.400676 0.306939 0.238059 0.261125 0.0966177 -1.38312\n",
|
||
|
" 11 4.074e+01 1.911e+01 1.751e+00 -- 1.255e+03 -- -0.390833 -1.00195 -2.19886 -2.42677 -3.20086 -3.47683 -4.55632 -6.71756 0.358383 0.357437 0.443033 0.336042 0.255704 0.285884 0.0957404 1.63909\n",
|
||
|
" 13 1.370e+01 2.129e+01 1.587e+00 -- 1.256e+03 -- -0.375838 -0.984839 -2.18261 -2.41092 -3.18537 -3.46656 -4.59286 -6.41756 0.386914 0.382651 0.477698 0.360091 0.269847 0.306761 0.095098 2.03338\n",
|
||
|
" 15 1.158e+01 2.351e+01 1.408e+00 -- 1.258e+03 -- -0.362294 -0.96986 -2.16805 -2.39704 -3.17203 -3.45749 -4.62837 -6.11756 0.410934 0.403523 0.506367 0.380155 0.281317 0.324474 0.0944395 -1.46371\n",
|
||
|
" 16 1.607e+03 7.266e+02 8.010e+00 -- 1.266e+03 -- -0.240266 -0.83846 -2.03814 -2.27523 -3.05681 -3.37736 -4.97188 -8 0.614202 0.577977 0.745974 0.548634 0.37576 0.476151 0.0813258 0.437418\n",
|
||
|
" 17 9.038e+02 4.128e+00 3.834e+00 -- 1.270e+03 -- -0.232783 -0.852575 -2.04678 -2.29283 -3.08252 -3.39513 -5.04543 -8 0.548929 0.498486 0.710668 0.487552 0.327531 0.450717 -0.157389 -0.565487\n",
|
||
|
" 18 2.647e+02 5.497e-01 2.932e-02 -- 1.270e+03 -- -0.23322 -0.852233 -2.04339 -2.2905 -3.07964 -3.39057 -5.07095 -8 0.552004 0.51698 0.698282 0.491552 0.331349 0.451833 -0.156166 -2.69909\n",
|
||
|
" 19 9.652e-01 2.219e+00 6.531e-01 -- 1.269e+03 -- -0.233246 -0.852217 -2.0438 -2.29075 -3.08035 -3.39107 -5.06163 -5 0.551423 0.515009 0.700327 0.490665 0.330402 0.452209 -0.176384 -0.814953\n",
|
||
|
" 20 7.789e+00 7.955e-01 6.402e-01 -- 1.270e+03 -- -0.233412 -0.852282 -2.04423 -2.29033 -3.07948 -3.38989 -5.09639 -5.98364 0.551849 0.515428 0.700779 0.489124 0.333636 0.45985 -0.205833 -1.60153\n",
|
||
|
" 21 8.557e+01 4.082e-02 1.163e-02 -- 1.270e+03 -- -0.233294 -0.852207 -2.04379 -2.29075 -3.08047 -3.39073 -5.05794 -7.0122 0.551775 0.515347 0.699486 0.490646 0.330835 0.451633 -0.186288 -1.50956\n",
|
||
|
" 22 1.000e+03 9.633e-02 1.325e-03 -- 1.270e+03 -- -0.233263 -0.852211 -2.04374 -2.29072 -3.08027 -3.39085 -5.06491 -8 0.551627 0.515234 0.700132 0.49056 0.330468 0.452479 -0.17545 1.26429\n",
|
||
|
" 23 6.947e+01 7.583e-02 5.012e-04 -- 1.270e+03 -- -0.23325 -0.852208 -2.04374 -2.29072 -3.08029 -3.39091 -5.06372 -8 0.551664 0.515214 0.700074 0.490679 0.330402 0.452326 -0.175132 2.98034\n",
|
||
|
" 24 1.062e+00 2.147e+00 6.150e-01 -- 1.269e+03 -- -0.23325 -0.852208 -2.04374 -2.29072 -3.08028 -3.39091 -5.06387 -5 0.551636 0.515215 0.70009 0.490675 0.330405 0.452326 -0.175244 -0.97755\n",
|
||
|
" 25 5.159e+00 7.693e-01 6.227e-01 -- 1.270e+03 -- -0.233412 -0.852294 -2.04429 -2.29036 -3.07951 -3.38938 -5.09276 -5.9203 0.551804 0.515509 0.700612 0.48922 0.334134 0.458766 -0.237317 -2.01536\n",
|
||
|
" 26 3.256e+00 2.577e+00 8.259e-01 -- 1.269e+03 -- -0.233292 -0.852208 -2.04377 -2.29076 -3.08053 -3.3906 -5.0573 -4.88481 0.551755 0.515396 0.699418 0.490641 0.330803 0.451361 -0.185258 0.154178\n",
|
||
|
" 27 8.306e+00 8.513e-01 7.419e-01 -- 1.269e+03 -- -0.2334 -0.85217 -2.04371 -2.2903 -3.07979 -3.394 -5.12588 -5.6438 0.551608 0.514436 0.70228 0.489167 0.329463 0.464863 0.0259555 0.65621\n",
|
||
|
" 28 3.018e+02 2.512e-01 7.557e-02 -- 1.270e+03 -- -0.23325 -0.852177 -2.04375 -2.29075 -3.08018 -3.3918 -5.06768 -7.58414 0.552082 0.51496 0.699848 0.491275 0.330113 0.452176 -0.189638 -1.62114\n",
|
||
|
" 29 9.648e+02 1.054e-01 5.781e-05 -- 1.270e+03 -- -0.233258 -0.852207 -2.04374 -2.29072 -3.08024 -3.39094 -5.06451 -8 0.551479 0.515219 0.700113 0.49073 0.330409 0.452292 -0.172337 -0.754914\n",
|
||
|
"********************\n",
|
||
|
"-0.233258 -0.852207 -2.04374 -2.29072 -3.08024 -3.39094 -5.06451 -8 0.551479 0.515219 0.700113 0.49073 0.330409 0.452292 -0.172337 -0.754914\n",
|
||
|
"0.0271527 0.0112859 0.0294371 0.0238447 0.0419821 0.0761252 1.60955 678.342 0.189103 0.111853 0.196777 0.152506 0.193957 0.252076 3.72644 1583.62\n",
|
||
|
"0.0121717 -0.0302322 -0.0279866 -0.0393548 -0.105374 -0.0168605 -0.00293106 -0.000917936 0.00679344 -3.13658e-05 -4.94438e-05 -0.00117381 0.00319937 0.00794062 0.00314398 -0.000234878\n",
|
||
|
"********************\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"Cx = clag.clag('cxd10r', [[t1,t2]], [[l1,l2]], [[l1e,l2e]], dt, fqL, p1, p2)\n",
|
||
|
"p = np.concatenate( ((p1+p2)*0.5-0.3,p1*0+0.1) ) # a good starting point generally\n",
|
||
|
"p, pe = clag.optimize(Cx, p)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 12,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"phi, phie = p[nfq:], pe[nfq:]\n",
|
||
|
"lag, lage = phi/(2*np.pi*fqd), phie/(2*np.pi*fqd) \n",
|
||
|
"cx, cxe = p[:nfq], pe[:nfq]"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 18,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"array([ 9.0966594 , 2.8412865 , 2.00075511, 0.90476609, 0.39301911,\n",
|
||
|
" 0.34709626, -0.08532525, -0.24113739])"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 18,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAhkAAAFtCAYAAACqQXjBAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAGUhJREFUeJzt3X2QXWd9H/Cvg2REUFL5Be+aNLbwBnkdogzZHTm11aFr\n6jKFBhhSELoDQ1kB9jTMOGqTP8wfFow8kwYynVGnk6YVRe5MoFdWQtyh8YiaNKvCyJqg0cL4pV7K\nrCXHxd4NRgiMi7DA6h9n11qtd6W7q/vcc+/u5zNzZ3fPyz0/SY92v3vO85IAAAAAAAAAAAAAAAAA\nAAAAAAAA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EDKBl09PTufXWW/Pkk08ueszU1FSmpqaydevWHD58WNCAVczjEqBl\n27dvv2DAmGtycjLbt28vXBHQzYQMoCXHjx/PxMTEks6ZmJjIiRMnyhQEdD0hA2jJvffee14fjFZM\nTU1l9+7dhSoCup2QAbTk6NGjHT0P6H1CBtCSM2fOdPQ8oPcJGUBL1q5d29HzgN4nZAAt2bJly7LO\nu/nmm9tcCdArhAygJbt27Up/f/+Szunv788999xTqCKg2wkZQEs2btyYwcHBJZ0zODiYjRs3lilo\niUyFDp0nZAAt279/fwYGBlo6dmBgIPfff3/hilozOxX6448/nqeffvrl6c9feOGFPP3003n88cez\nd+/eTE9P110qrChCBtCyvr6+HD58OCMjI4s+Ounv78/IyEgefvjhXHPNNR2u8JVmp0I/dOjQovN8\nTE1N5dChQ9m6daugAW0
|
||
|
"text/plain": [
|
||
|
"<matplotlib.figure.Figure at 0x7f736317bf10>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"xscale('log'); ylim(-10,15)\n",
|
||
|
"errorbar(fqd, lag, yerr=lage, fmt='o', ms=10,color=\"black\")\n",
|
||
|
"\n",
|
||
|
"lag"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 19,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"[<matplotlib.lines.Line2D at 0x7f7363203250>]"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 19,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjgAAAGYCAYAAABPgZiFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQ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Dyd8diSJEkVZQ1wbkiWHyfmwgF4NzGHDMAvK+wzNVk+nvHY\nkiRJFWUNcL5NTIa3DXAXcauDy4lanb8Dl1TY5x3J8q6Mx5YkSaooa4DzAHA08AIR1BSbn5YDXcTt\nEdK2pRTg/DbjsSVJkirK415UPyfmwTmUCGAWA1cQ92Yqtw/w38ToqkrNV5IkSZnldbPNJ4F5daT7\ndfKQJElqmqxNVJIkSUNO1gDnPuDTRCdjSZKkISFrgDMJ+ArwN+AXwHtwAj9JktRiWQOcPyXLMcTk\nfpcRsxefDeyZMW9JkqQByeNu4vsC3wSWJOu2AU4E7gH+j7hr+KYZjyNJklS3PDoZ3wl8EtgeOJK4\nueY6Srdw+AExa/F84B9zOJ4kSVK/8hxFtQa4lGiqehUwC7g/2bYJcAxwEzE54CxguxyPLUmS9LJm\nDRN/AvgaMBl4I/BDSncR3x04E3gEuAo4HDsmS5KkHA3GPDh/AP4f8CEi8CkaAxxC3K/qEaKZK6+J\nByVJ0gjW7ABnJ2A2sIgYRr5tsn4tcA0xvByi/84c4FZgyyaXSZIktblmBDgbETfg/A0R2MwGdiE6\nHT9I9L95JVF7swvwT8D1yb77Aac1oUySJGkEyTPAeQOlEVM/Bg5K8l8F/ASYDuxB9M15KtmnF7iO\nuMP4t5N178qxTJIkaQTK2udle+BfgBlE8JL2Z6Jz8UXAs3Xk9SPgBGIEliRJ0oBlDXAepW8t0Aqg\nmwhs/thgXs8lS0dUSZK
|
||
|
"text/plain": [
|
||
|
"<matplotlib.figure.Figure at 0x7f7362fc36d0>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"from scipy.optimize import curve_fit\n",
|
||
|
"\n",
|
||
|
"# Define model function to be used to fit to the data above:\n",
|
||
|
"def tophat_time(x, *p):\n",
|
||
|
" mean, width = p\n",
|
||
|
" if x>(mean+width): y=0\n",
|
||
|
" if x<(mean-width): y=0\n",
|
||
|
" if x==(mean+width) | x==(mean-width): y=5\n",
|
||
|
" return y\n",
|
||
|
"\n",
|
||
|
"def tophat_freq(f, *pars):\n",
|
||
|
" A,T,t0 = pars\n",
|
||
|
" #return A*T*sinc(pi*f*T)*exp(-i*2*pi*f*t0)\n",
|
||
|
" return A*T*sinc(pi*f*T)*cos(2*pi*f*t0)\n",
|
||
|
"\n",
|
||
|
"x=np.logspace(fqd[0],fqd[-1],200)\n",
|
||
|
"\n",
|
||
|
"# p0 is the initial guess for the fitting coefficients\n",
|
||
|
"p0 = [3, 3, 3]\n",
|
||
|
"coeff, var_matrix = curve_fit(tophat_freq, fqd, lag, p0)\n",
|
||
|
"fit = tophat_freq(fqd, *coeff)\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"mpl.rcParams['xtick.labelsize']=12\n",
|
||
|
"mpl.rcParams['ytick.labelsize']=12\n",
|
||
|
"xscale('log'); xlim(.009,.6)\n",
|
||
|
"xlabel(\"Fourier Frequency (days$^{-1}$)\",fontsize=20)\n",
|
||
|
"ylabel(\"Time Lag (days)\",fontsize=20)\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"errorbar(fqd, lag, yerr=lage, fmt='o', ms=5,color=\"black\")\n",
|
||
|
"plot(fqd,fit)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"metadata": {
|
||
|
"collapsed": true
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
}
|
||
|
],
|
||
|
"metadata": {
|
||
|
"kernelspec": {
|
||
|
"display_name": "Python 2",
|
||
|
"language": "python",
|
||
|
"name": "python2"
|
||
|
},
|
||
|
"language_info": {
|
||
|
"codemirror_mode": {
|
||
|
"name": "ipython",
|
||
|
"version": 2
|
||
|
},
|
||
|
"file_extension": ".py",
|
||
|
"mimetype": "text/x-python",
|
||
|
"name": "python",
|
||
|
"nbconvert_exporter": "python",
|
||
|
"pygments_lexer": "ipython2",
|
||
|
"version": "2.7.6"
|
||
|
}
|
||
|
},
|
||
|
"nbformat": 4,
|
||
|
"nbformat_minor": 2
|
||
|
}
|