Skip to content

Commit b120231

Browse files
authored
Merge pull request #23 from dnjohnstone/rotation_calibration
Demo updates for pyxem-0.9.0
2 parents 0360f87 + 6970e75 commit b120231

File tree

4 files changed

+269
-101
lines changed

4 files changed

+269
-101
lines changed

Basic SED Analysis - GaAs Nanowire.ipynb

Lines changed: 14 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"cell_type": "markdown",
2626
"metadata": {},
2727
"source": [
28-
"All functionality has been checked to run using pyxem-0.8.0"
28+
"This functionaility has been checked to run in pyxem-0.9.0 (July 2019). Bugs are always possible, do not trust the code blindly, and if you experience any issues please report them here: https://github.com/pyxem/pyxem-demos/issues"
2929
]
3030
},
3131
{
@@ -64,6 +64,15 @@
6464
"import numpy as np"
6565
]
6666
},
67+
{
68+
"cell_type": "markdown",
69+
"metadata": {},
70+
"source": [
71+
"Download and the data for this demo from here and put in directory with notebooks:\n",
72+
"\n",
73+
"https://drive.google.com/drive/folders/1nkqDIu8g_kOQOuRqx5yDigtjopgv_Isj?usp=sharing"
74+
]
75+
},
6776
{
6877
"cell_type": "markdown",
6978
"metadata": {},
@@ -84,8 +93,8 @@
8493
"metadata": {},
8594
"outputs": [],
8695
"source": [
87-
"dp = pxm.load('./nanowire_sed_example.hdf5')\n",
88-
"dp = pxm.ElectronDiffraction(dp)"
96+
"dp = pxm.load_hspy('./nanowire_sed_example.hdf5',\n",
97+
" assign_to='electron_diffraction2d')"
8998
]
9099
},
91100
{
@@ -588,7 +597,7 @@
588597
"metadata": {},
589598
"outputs": [],
590599
"source": [
591-
"dpc.change_dtype('float')\n",
600+
"dpc.data = dpc.data.astype('float64')\n",
592601
"dpc.decomposition(True, algorithm='svd')"
593602
]
594603
},
@@ -656,50 +665,6 @@
656665
"dpc.plot_decomposition_results()"
657666
]
658667
},
659-
{
660-
"cell_type": "markdown",
661-
"metadata": {},
662-
"source": [
663-
"Check the signal type of dpc -- decomposition has reassigned it to Signal2D"
664-
]
665-
},
666-
{
667-
"cell_type": "code",
668-
"execution_count": null,
669-
"metadata": {},
670-
"outputs": [],
671-
"source": [
672-
"dpc"
673-
]
674-
},
675-
{
676-
"cell_type": "markdown",
677-
"metadata": {},
678-
"source": [
679-
"Reassign the signal type to ElectronDiffraction"
680-
]
681-
},
682-
{
683-
"cell_type": "code",
684-
"execution_count": null,
685-
"metadata": {},
686-
"outputs": [],
687-
"source": [
688-
"dpc = pxm.ElectronDiffraction(dpc)\n",
689-
"dpc.set_diffraction_calibration(recip_cal)\n",
690-
"dpc.set_scan_calibration(10)\n",
691-
"dpc"
692-
]
693-
},
694-
{
695-
"cell_type": "code",
696-
"execution_count": null,
697-
"metadata": {},
698-
"outputs": [],
699-
"source": [
700-
"dpc.plot(cmap='inferno', vmax=50)"
701-
]
702-
},
703668
{
704669
"cell_type": "markdown",
705670
"metadata": {},
@@ -993,7 +958,7 @@
993958
"name": "python",
994959
"nbconvert_exporter": "python",
995960
"pygments_lexer": "ipython3",
996-
"version": "3.6.6"
961+
"version": "3.7.3"
997962
},
998963
"widgets": {
999964
"state": {

0 commit comments

Comments
 (0)