|
25 | 25 | "cell_type": "markdown",
|
26 | 26 | "metadata": {},
|
27 | 27 | "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" |
29 | 29 | ]
|
30 | 30 | },
|
31 | 31 | {
|
|
64 | 64 | "import numpy as np"
|
65 | 65 | ]
|
66 | 66 | },
|
| 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 | + }, |
67 | 76 | {
|
68 | 77 | "cell_type": "markdown",
|
69 | 78 | "metadata": {},
|
|
84 | 93 | "metadata": {},
|
85 | 94 | "outputs": [],
|
86 | 95 | "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')" |
89 | 98 | ]
|
90 | 99 | },
|
91 | 100 | {
|
|
588 | 597 | "metadata": {},
|
589 | 598 | "outputs": [],
|
590 | 599 | "source": [
|
591 |
| - "dpc.change_dtype('float')\n", |
| 600 | + "dpc.data = dpc.data.astype('float64')\n", |
592 | 601 | "dpc.decomposition(True, algorithm='svd')"
|
593 | 602 | ]
|
594 | 603 | },
|
|
656 | 665 | "dpc.plot_decomposition_results()"
|
657 | 666 | ]
|
658 | 667 | },
|
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 |
| - }, |
703 | 668 | {
|
704 | 669 | "cell_type": "markdown",
|
705 | 670 | "metadata": {},
|
|
993 | 958 | "name": "python",
|
994 | 959 | "nbconvert_exporter": "python",
|
995 | 960 | "pygments_lexer": "ipython3",
|
996 |
| - "version": "3.6.6" |
| 961 | + "version": "3.7.3" |
997 | 962 | },
|
998 | 963 | "widgets": {
|
999 | 964 | "state": {
|
|
0 commit comments