Skip to content

Commit

Permalink
update notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
JunCEEE committed Oct 29, 2020
1 parent 5fb555b commit babf67f
Show file tree
Hide file tree
Showing 3 changed files with 419 additions and 42 deletions.
346 changes: 346 additions & 0 deletions simex/SFX/crystFEL-docker.ipynb

Large diffs are not rendered by default.

45 changes: 28 additions & 17 deletions simex/SFX/crystFEL.ipynb

Large diffs are not rendered by default.

70 changes: 45 additions & 25 deletions simex/SPI/diffrChaperonins.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@
"cells": [
{
"cell_type": "code",
"execution_count": 35,
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"initializing ocelot...\n"
]
}
],
"source": [
"import os,shutil\n",
"import h5py\n",
Expand Down Expand Up @@ -106,7 +114,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -150,20 +158,23 @@
"name": "stdout",
"output_type": "stream",
"text": [
"PDB file /gpfs/exfel/data/user/juncheng/M5.2DEMO/simex/SPI/3IYF.pdb could not be found. Attempting to query from protein database server.\n",
"Downloading PDB structure '3IYF'...\n",
"110.63360626716167 s\n"
"150.22291002096608 s\n",
"Successful!\n"
]
}
],
"source": [
"from timeit import default_timer as timer\n",
"start = timer()\n",
"\n",
"diffractor.backengine()\n",
"status = diffractor.backengine()\n",
"\n",
"end = timer()\n",
"print(end - start,'s') # Time in seconds"
"print(end - start,'s') # Time in seconds\n",
"if (status == 0):\n",
" print (\"Successful!\")\n",
"else:\n",
" print (\"Error code:\",status)"
]
},
{
Expand All @@ -185,7 +196,7 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 10,
"metadata": {},
"outputs": [
{
Expand All @@ -203,7 +214,7 @@
" <AxesSubplot:xlabel='$x$ (pixel)', ylabel='$y$ (pixel)'>)"
]
},
"execution_count": 33,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
},
Expand Down Expand Up @@ -239,7 +250,7 @@
},
{
"cell_type": "code",
"execution_count": 34,
"execution_count": 11,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -281,15 +292,15 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"WARNING:pyFAI.DEPRECATION:function, AzimuthalIntegrator is deprecated since silx version 0.16! Use 'pyFAI.azimuthalIntegrator.AzimuthalIntegrator' instead.\n",
" File \"/gpfs/exfel/data/user/juncheng/miniconda3/envs/simex0.5/lib/python3.7/site-packages/SimEx/Analysis/DiffractionAnalysis.py\", line 528, in azimuthalIntegration\n",
" File \"/opt/SimEx-master/Sources/python/SimEx/Analysis/DiffractionAnalysis.py\", line 528, in azimuthalIntegration\n",
" wavelength=lmd*1e-9)\n",
"WARNING:silx.opencl.common:Unable to import pyOpenCl. Please install it from: http://pypi.python.org/pypi/pyopencl\n"
]
Expand Down Expand Up @@ -320,19 +331,21 @@
},
{
"cell_type": "code",
"execution_count": 37,
"execution_count": 13,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"*************************\n",
"Photon number statistics per pattern\n",
"avg = 1.05245e+06\n",
"std = 5.53632e+04\n",
"avg_mean = 1.05245e+02\n",
"avg_max = 3.03735e+04\n",
"avg_min = 2.49232e-04\n",
"Photon number statistics per pixel\n",
"avg_mean_pixel = 1.05245e+02\n",
"avg_max_pixel = 3.03735e+04\n",
"avg_min_pixel = 2.49232e-04\n",
"*************************\n"
]
},
Expand Down Expand Up @@ -362,7 +375,7 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -371,7 +384,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 15,
"metadata": {},
"outputs": [
{
Expand All @@ -388,16 +401,16 @@
},
{
"cell_type": "code",
"execution_count": 41,
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.image.AxesImage at 0x2b2427cb9dd0>"
"<matplotlib.image.AxesImage at 0x7ff82033b850>"
]
},
"execution_count": 41,
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
},
Expand All @@ -417,13 +430,20 @@
"source": [
"plt.imshow(diffr_data[0])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This project has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreement No. 823852."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "simex0.5",
"display_name": "Python 3",
"language": "python",
"name": "simex0.5"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -435,7 +455,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.8"
"version": "3.7.7"
}
},
"nbformat": 4,
Expand Down

0 comments on commit babf67f

Please sign in to comment.