-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5f6da2f
Showing
314 changed files
with
87,267 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
154 changes: 154 additions & 0 deletions
154
_downloads/01d26ddfe66a9569b4cf79881141dece/cross_product_error.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
{ | ||
"metadata": { | ||
"name": "cross_product_error" | ||
}, | ||
"nbformat": 3, | ||
"nbformat_minor": 0, | ||
"worksheets": [ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"The error in a cross product calculation with (3,) tuples" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"collapsed": false, | ||
"input": [ | ||
"from sympy import Symbol, symarray, Matrix, matrices\n", | ||
"u = Matrix(symarray('u', (3, 1)))\n", | ||
"v = Matrix(symarray('v', (3, 1)))" | ||
], | ||
"language": "python", | ||
"metadata": {}, | ||
"outputs": [], | ||
"prompt_number": 1 | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"collapsed": false, | ||
"input": [ | ||
"c = u.cross(v)\n", | ||
"c" | ||
], | ||
"language": "python", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"output_type": "pyout", | ||
"prompt_number": 2, | ||
"text": [ | ||
"[u_1_0*v_2_0 - u_2_0*v_1_0, -u_0_0*v_2_0 + u_2_0*v_0_0, u_0_0*v_1_0 - u_1_0*v_0_0]" | ||
] | ||
} | ||
], | ||
"prompt_number": 2 | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Assuming same error $\\delta$ for both vectors:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"collapsed": false, | ||
"input": [ | ||
"d = Symbol('d')\n", | ||
"e = matrices.ones((3,1)) * d" | ||
], | ||
"language": "python", | ||
"metadata": {}, | ||
"outputs": [], | ||
"prompt_number": 3 | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Same calculation as above, with error" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"collapsed": false, | ||
"input": [ | ||
"ue = u + e\n", | ||
"ve = v + e\n", | ||
"ce = ue.cross(ve)" | ||
], | ||
"language": "python", | ||
"metadata": {}, | ||
"outputs": [], | ||
"prompt_number": 4 | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Calculate absolute error by subtracting true result from result with error" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"collapsed": false, | ||
"input": [ | ||
"cce = ce - c\n", | ||
"cce.simplify()\n", | ||
"cce" | ||
], | ||
"language": "python", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"output_type": "pyout", | ||
"prompt_number": 5, | ||
"text": [ | ||
"[d*(u_1_0 - u_2_0 - v_1_0 + v_2_0), d*(-u_0_0 + u_2_0 + v_0_0 - v_2_0), d*(u_0_0 - u_1_0 - v_0_0 + v_1_0)]" | ||
] | ||
} | ||
], | ||
"prompt_number": 5 | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Floating point calculation error given by operations on elements:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"collapsed": false, | ||
"input": [ | ||
"c" | ||
], | ||
"language": "python", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"output_type": "pyout", | ||
"prompt_number": 6, | ||
"text": [ | ||
"[u_1_0*v_2_0 - u_2_0*v_1_0, -u_0_0*v_2_0 + u_2_0*v_0_0, u_0_0*v_1_0 - u_1_0*v_0_0]" | ||
] | ||
} | ||
], | ||
"prompt_number": 6 | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Each element has two products and one subtraction; The input values are $\\le 1$. Calculation error per element then $3 \\epsilon / 2$" | ||
] | ||
} | ||
], | ||
"metadata": {} | ||
} | ||
] | ||
} |
Binary file added
BIN
+68.6 KB
_downloads/15ee5f982d34b67854edc69ebd5e3772/neuro_radio_conventions-2_01.hires.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+68.6 KB
_downloads/2174665309d4572bf9425c62abdb3e82/coordinate_systems-3_01.hires.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+44.5 KB
_downloads/5b2b00af981a01f3cc5e81b34ccc8fdb/neuro_radio_conventions-2_00.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+56.7 KB
_downloads/6be0680a63be0340a581f954a2ec30b9/neuro_radio_conventions-2_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+26.7 KB
_downloads/79cc4a050731c618885fe142bc9dfcaf/neuro_radio_conventions-2_00.pdf
Binary file not shown.
Oops, something went wrong.