2020-01-26 13:27:14 +01:00
|
|
|
{
|
|
|
|
"cells": [
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 7,
|
|
|
|
"metadata": {
|
|
|
|
"autoscroll": false,
|
|
|
|
"collapsed": false,
|
|
|
|
"ein.hycell": false,
|
|
|
|
"ein.tags": "worksheet-0",
|
|
|
|
"slideshow": {
|
|
|
|
"slide_type": "-"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"from utility import *\n",
|
|
|
|
"import numpy as np\n",
|
|
|
|
"import matplotlib.pyplot as plt"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 9,
|
|
|
|
"metadata": {
|
|
|
|
"autoscroll": false,
|
|
|
|
"collapsed": false,
|
|
|
|
"ein.hycell": false,
|
|
|
|
"ein.tags": "worksheet-0",
|
|
|
|
"slideshow": {
|
|
|
|
"slide_type": "-"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"profile = load_profiles('../messungen/gold_diffr/peaks.txt')"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 21,
|
|
|
|
"metadata": {
|
|
|
|
"autoscroll": false,
|
|
|
|
"collapsed": false,
|
|
|
|
"ein.hycell": false,
|
|
|
|
"ein.tags": "worksheet-0",
|
|
|
|
"slideshow": {
|
|
|
|
"slide_type": "-"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": [
|
|
|
|
"(<Figure size 640x480 with 1 Axes>,\n <matplotlib.axes._subplots.AxesSubplot at 0x7fac39e3f490>)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"execution_count": 21,
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "execute_result"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"%matplotlib qt5\n",
|
|
|
|
"plot_diffr_profile(profile)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 50,
|
|
|
|
"metadata": {
|
|
|
|
"autoscroll": false,
|
|
|
|
"collapsed": false,
|
|
|
|
"ein.hycell": false,
|
|
|
|
"ein.tags": "worksheet-0",
|
|
|
|
"slideshow": {
|
|
|
|
"slide_type": "-"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"image/png": [
|
|
|
|
"iVBORw0KGgoAAAANSUhEUgAAAYoAAAEICAYAAABBBrPDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nOydeXiU1d3+P99MFhIJS1hEQAJhD7ugFFAUg4hoFbdf6kL1Ul+sVZCKYIGqWHfA4lqR4lu3UvV1QS0UWasFMUJYAkSQEAgQjBAjMIEwSSbn98cszEwmmUkyz8w84dzXxWXu5zlnzj2LOTmfOYsopdDS0tLS0qpJMZEOoKWlpaUV3dIdhZaWlpZWrdIdhZaWlpZWrdIdhZaWlpZWrdIdhZaWlpZWrdIdhZaWlpZWrTKkoxCRdiKySEQ21nC/iYi8KiIzROR/RaSHx739IvIf579/BNnexFBlN0o6Y8MV7flAZwyFoj0fnIUZlVIh/wfcBPwa2FTD/T8C050/9wP+63Fvdj3aq9YO8Oso85vC2Z4ZMhqdzwwZI/S+N6r3OULve1S/hvXJWNs/Q0YUSqmPAGstRa4GNjjLbgcGiEgz572RIjJdRJ4UkeENiPHrKPO+Ckd70Z7R6HzhyBRtr2GwZcKZKdyvoRGZzP4a1rcOAOLsWUIuEbkMmKeUGuLn3m4gU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3bhw6dIirr76aK6+8kqysLF555RUGDBjA9u3beeqpp6pt9/3ggw9y6NA
|
|
|
|
],
|
|
|
|
"text/plain": [
|
|
|
|
"<Figure size 432x288 with 1 Axes>"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"%matplotlib inline\n",
|
|
|
|
"candidates, d_candidates, sigma_candidates = analyze_diffr_profile(profile, limits=[100, -1], distance=15, prominence=.001)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2020-01-26 14:13:54 +01:00
|
|
|
"execution_count": 142,
|
2020-01-26 13:27:14 +01:00
|
|
|
"metadata": {
|
|
|
|
"autoscroll": false,
|
|
|
|
"collapsed": false,
|
|
|
|
"ein.hycell": false,
|
|
|
|
"ein.tags": "worksheet-0",
|
|
|
|
"slideshow": {
|
|
|
|
"slide_type": "-"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"outputs": [
|
|
|
|
{
|
2020-01-26 14:13:54 +01:00
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
|
|
|
"(array([ 4, 4, 9, 11, 13, 24, 27, 30, 40]), array([[0.4365859 , 0.00314502, 0.03385928],\n",
|
|
|
|
" [0.38654813, 0.00246542, 0.01311343],\n",
|
|
|
|
" [0.39925472, 0.00175345, 0.0193526 ],\n",
|
|
|
|
" [0.39935277, 0.00158683, 0.00165195],\n",
|
|
|
|
" [0.4097683 , 0.00153681, 0.02061948],\n",
|
|
|
|
" [0.41640285, 0.00116798, 0.02043268],\n",
|
|
|
|
" [0.40118533, 0.00102217, 0.01063151],\n",
|
|
|
|
" [0.4014384 , 0.00097094, 0.007732 ],\n",
|
|
|
|
" [0.40573231, 0.00085894, 0.01187421]]), array([0.0287859 , 0.02125187, 0.00854528, 0.00844723, 0.0019683 ,\n",
|
|
|
|
" 0.00860285, 0.00661467, 0.0063616 , 0.00206769]))\n"
|
2020-01-26 13:27:14 +01:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"hypothesis = evaluate_hypothesis(np.array([candidates, d_candidates, sigma_candidates]).T, maximum=80)\n",
|
|
|
|
"print(hypothesis)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2020-01-26 16:34:53 +01:00
|
|
|
"execution_count": 147,
|
2020-01-26 13:27:14 +01:00
|
|
|
"metadata": {
|
|
|
|
"autoscroll": false,
|
|
|
|
"collapsed": false,
|
|
|
|
"ein.hycell": false,
|
|
|
|
"ein.tags": "worksheet-0",
|
|
|
|
"slideshow": {
|
|
|
|
"slide_type": "-"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
2020-01-26 16:34:53 +01:00
|
|
|
"1 & \\(\\sqrt{4}\\) & 0.4366 & 0.0031 & 0.0339 & 0.029 \\\\\n",
|
|
|
|
"2 & \\(\\sqrt{4}\\) & 0.3865 & 0.0025 & 0.0131 & 0.021 \\\\\n",
|
|
|
|
"3 & \\(\\sqrt{9}\\) & 0.3993 & 0.0018 & 0.0194 & 0.009 \\\\\n",
|
|
|
|
"4 & \\(\\sqrt{11}\\) & 0.3994 & 0.0016 & 0.0017 & 0.008 \\\\\n",
|
|
|
|
"5 & \\(\\sqrt{13}\\) & 0.4098 & 0.0015 & 0.0206 & 0.002 \\\\\n",
|
|
|
|
"6 & \\(\\sqrt{24}\\) & 0.4164 & 0.0012 & 0.0204 & 0.009 \\\\\n",
|
|
|
|
"7 & \\(\\sqrt{27}\\) & 0.4012 & 0.001 & 0.0106 & 0.007 \\\\\n",
|
|
|
|
"8 & \\(\\sqrt{30}\\) & 0.4014 & 0.001 & 0.0077 & 0.006 \\\\\n",
|
|
|
|
"9 & \\(\\sqrt{40}\\) & 0.4057 & 0.0009 & 0.0119 & 0.002 \\\\\n",
|
2020-01-26 13:27:14 +01:00
|
|
|
"\n"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"print(generate_hypethsesis_table(*hypothesis))"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2020-01-26 14:13:54 +01:00
|
|
|
"execution_count": 144,
|
2020-01-26 13:27:14 +01:00
|
|
|
"metadata": {
|
|
|
|
"autoscroll": false,
|
|
|
|
"collapsed": false,
|
|
|
|
"ein.hycell": false,
|
|
|
|
"ein.tags": "worksheet-0",
|
|
|
|
"slideshow": {
|
|
|
|
"slide_type": "-"
|
|
|
|
}
|
|
|
|
},
|
2020-01-26 14:13:54 +01:00
|
|
|
"outputs": [],
|
2020-01-26 13:27:14 +01:00
|
|
|
"source": [
|
|
|
|
"a, d_a, sigma_a = determine_lattice_constant(hypothesis)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2020-01-26 14:13:54 +01:00
|
|
|
"execution_count": 145,
|
2020-01-26 13:27:14 +01:00
|
|
|
"metadata": {
|
|
|
|
"autoscroll": false,
|
|
|
|
"collapsed": false,
|
|
|
|
"ein.hycell": false,
|
|
|
|
"ein.tags": "worksheet-0",
|
|
|
|
"slideshow": {
|
|
|
|
"slide_type": "-"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": [
|
2020-01-26 14:13:54 +01:00
|
|
|
"(0.4002, 0.0027, 0.0046)"
|
2020-01-26 13:27:14 +01:00
|
|
|
]
|
|
|
|
},
|
2020-01-26 14:13:54 +01:00
|
|
|
"execution_count": 145,
|
2020-01-26 13:27:14 +01:00
|
|
|
"metadata": {},
|
|
|
|
"output_type": "execute_result"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"scientific_round(a, d_a, sigma_a)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2020-01-26 16:34:53 +01:00
|
|
|
"execution_count": 148,
|
2020-01-26 13:27:14 +01:00
|
|
|
"metadata": {
|
|
|
|
"autoscroll": false,
|
|
|
|
"collapsed": false,
|
|
|
|
"ein.hycell": false,
|
|
|
|
"ein.tags": "worksheet-0",
|
|
|
|
"slideshow": {
|
|
|
|
"slide_type": "-"
|
|
|
|
}
|
|
|
|
},
|
2020-01-26 14:06:33 +01:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
2020-01-26 16:34:53 +01:00
|
|
|
"4 & \\mqty{2 & 0 & 0} \\\\\n",
|
|
|
|
"9 & \\mqty{2 & 2 & 1}, \\mqty{3 & 0 & 0} \\\\\n",
|
|
|
|
"11 & \\mqty{3 & 1 & 1} \\\\\n",
|
|
|
|
"13 & \\mqty{3 & 2 & 0} \\\\\n",
|
|
|
|
"24 & \\mqty{4 & 2 & 2} \\\\\n",
|
|
|
|
"27 & \\mqty{3 & 3 & 3}, \\mqty{5 & 1 & 1} \\\\\n",
|
|
|
|
"30 & \\mqty{5 & 2 & 1} \\\\\n",
|
|
|
|
"40 & \\mqty{6 & 2 & 0} \\\\\n",
|
2020-01-26 14:06:33 +01:00
|
|
|
"\n"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"print(generate_miller_table(hypothesis[0]))"
|
|
|
|
]
|
2020-01-26 14:13:54 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {
|
|
|
|
"autoscroll": false,
|
|
|
|
"collapsed": false,
|
|
|
|
"ein.hycell": false,
|
|
|
|
"ein.tags": "worksheet-0",
|
|
|
|
"slideshow": {
|
|
|
|
"slide_type": "-"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"outputs": [],
|
|
|
|
"source": []
|
2020-01-26 13:27:14 +01:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"kernelspec": {
|
|
|
|
"argv": [
|
|
|
|
"/usr/bin/python3",
|
|
|
|
"-m",
|
|
|
|
"ipykernel_launcher",
|
|
|
|
"-f",
|
|
|
|
"{connection_file}"
|
|
|
|
],
|
|
|
|
"display_name": "Python 3",
|
|
|
|
"env": null,
|
|
|
|
"interrupt_mode": "signal",
|
|
|
|
"language": "python",
|
|
|
|
"metadata": null,
|
|
|
|
"name": "python3"
|
|
|
|
},
|
|
|
|
"name": "gold_diffr.ipynb"
|
|
|
|
},
|
|
|
|
"nbformat": 4,
|
|
|
|
"nbformat_minor": 2
|
|
|
|
}
|