Skip to content

Commit

Permalink
Prep for upload
Browse files Browse the repository at this point in the history
  • Loading branch information
xoltar committed Feb 28, 2019
1 parent 4cff1f5 commit bd745d4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
48 changes: 24 additions & 24 deletions example/RIVET Python API Tour.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 27,
"metadata": {
"collapsed": true
},
Expand All @@ -28,7 +28,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 28,
"metadata": {},
"outputs": [
{
Expand All @@ -50,7 +50,7 @@
" 'points5.txt']"
]
},
"execution_count": 2,
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -65,7 +65,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 29,
"metadata": {},
"outputs": [
{
Expand All @@ -74,7 +74,7 @@
"'../../rivet/data/Test_Point_Clouds/circle_data_60pts_codensity.txt.H1_x20_y20.rivet'"
]
},
"execution_count": 3,
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -97,7 +97,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 30,
"metadata": {},
"outputs": [
{
Expand All @@ -107,15 +107,15 @@
" ((45.0, 1.0), Barcode([Bar(5.65685, 5.68564, 1)]))]"
]
},
"execution_count": 4,
"execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"with open(computed_file_path, 'rb') as f:\n",
" computed_data = f.read()\n",
"\n",
" \n",
"codes = rivet.barcodes(computed_data, [\n",
" (45, 0), # 45 degrees, offset 0\n",
" (45, 1), # 45 degrees, offset 1\n",
Expand All @@ -132,7 +132,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 31,
"metadata": {},
"outputs": [
{
Expand All @@ -141,7 +141,7 @@
"Barcode([Bar(6.98695, 7.68564, 1), Bar(5.65685, 6.28825, 1)])"
]
},
"execution_count": 5,
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -160,7 +160,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 32,
"metadata": {},
"outputs": [
{
Expand All @@ -170,7 +170,7 @@
" [5.65685, 6.28825, 1. ]])"
]
},
"execution_count": 6,
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -188,7 +188,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 33,
"metadata": {},
"outputs": [
{
Expand All @@ -204,7 +204,7 @@
" [1.]], xi_0=[(0, 0, 5)], xi_1=[(0, 1, 1), (0, 2, 1), (0, 3, 1), (0, 5, 1)], xi_2=[])"
]
},
"execution_count": 7,
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -238,7 +238,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 34,
"metadata": {},
"outputs": [
{
Expand All @@ -254,7 +254,7 @@
" [1. 2. 2. 2. 2. 2.]], xi_0=[(0, 0, 1), (1, 0, 2), (2, 0, 1), (3, 0, 1), (4, 0, 1), (5, 0, 1)], xi_1=[(1, 1, 1), (2, 6, 1), (3, 2, 1), (3, 5, 1), (4, 3, 1), (5, 4, 1)], xi_2=[(3, 6, 1)])"
]
},
"execution_count": 8,
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -292,7 +292,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 35,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -328,7 +328,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 36,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -360,16 +360,16 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 37,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.image.AxesImage at 0x1110b09b0>"
"<matplotlib.image.AxesImage at 0x1143fa2e8>"
]
},
"execution_count": 11,
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
},
Expand Down Expand Up @@ -404,16 +404,16 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 38,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.image.AxesImage at 0x111826e80>"
"<matplotlib.image.AxesImage at 0x114cc9908>"
]
},
"execution_count": 12,
"execution_count": 38,
"metadata": {},
"output_type": "execute_result"
},
Expand Down
4 changes: 2 additions & 2 deletions pyrivet/rivet.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ def compute_file(input_name, output_name=None, homology=0, x=0, y=0, threads=1):
cmd = "%s %s %s -H %d -x %d -y %d --redis %s --threads %d" % \
(rivet_client, input_name, output_name, homology, x, y, server_url, threads)
else:
cmd = "%s %s %s -H %d -x %d -y %d -f msgpack --num_threads %s" % \
(rivet_executable, input_name, output_name, homology, x, y, threads)
cmd = "%s %s %s -H %d -x %d -y %d -f msgpack" % \
(rivet_executable, input_name, output_name, homology, x, y)
subprocess.check_output(shlex.split(cmd))
return output_name

Expand Down

0 comments on commit bd745d4

Please sign in to comment.