bobleesj commited on
Commit
3418d4b
·
verified ·
1 Parent(s): b30a28c

chore: remove legacy notebooks from the data repository

Browse files
notebooks/show4dstem_colab.ipynb DELETED
@@ -1,126 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "markdown",
5
- "metadata": {
6
- "id": "view-in-github",
7
- "colab_type": "text"
8
- },
9
- "source": [
10
- "<a href=\"https://colab.research.google.com/gist/bobleesj/54864ce5b2a6f0a4fd5ae1e5d5719b45/show4dstem_colab.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
11
- ]
12
- },
13
- {
14
- "cell_type": "code",
15
- "source": [
16
- "\n"
17
- ],
18
- "metadata": {
19
- "id": "9v3stk4rtjWV"
20
- },
21
- "id": "9v3stk4rtjWV",
22
- "execution_count": null,
23
- "outputs": []
24
- },
25
- {
26
- "cell_type": "markdown",
27
- "metadata": {
28
- "id": "UFA9PcrTth-d"
29
- },
30
- "source": [
31
- "# Show4DSTEM in Google Colab\n",
32
- "\n",
33
- "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/?url=https%3A%2F%2Fhuggingface.co%2Fdatasets%2Fbobleesj%2Fquantem-data%2Fresolve%2Fmain%2Fnotebooks%2Fshow4dstem_colab.ipynb)\n",
34
- "\n",
35
- "Open a 4D-STEM dataset in your browser - **no install, no GPU setup**. Runs on Colab's\n",
36
- "free runtime. Backend auto-detects; this sample uses the CPU/numpy path so it works on\n",
37
- "any runtime (CPU or GPU).\n"
38
- ],
39
- "id": "UFA9PcrTth-d"
40
- },
41
- {
42
- "cell_type": "markdown",
43
- "metadata": {
44
- "id": "kf5G4BjLth-e"
45
- },
46
- "source": [
47
- "## 1. Install (one cell)\n"
48
- ],
49
- "id": "kf5G4BjLth-e"
50
- },
51
- {
52
- "cell_type": "code",
53
- "execution_count": null,
54
- "metadata": {
55
- "id": "IdKh-J1Vth-f"
56
- },
57
- "outputs": [],
58
- "source": [
59
- "!pip install -U -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple \"quantem.widget>=0.0.1rc0\" huggingface_hub\n"
60
- ],
61
- "id": "IdKh-J1Vth-f"
62
- },
63
- {
64
- "cell_type": "markdown",
65
- "metadata": {
66
- "id": "FWyzquw4th-f"
67
- },
68
- "source": [
69
- "## 2. Download a sample + open it\n"
70
- ],
71
- "id": "FWyzquw4th-f"
72
- },
73
- {
74
- "cell_type": "code",
75
- "execution_count": null,
76
- "metadata": {
77
- "id": "nbE-phyvth-f"
78
- },
79
- "outputs": [],
80
- "source": [
81
- "import numpy as np\n",
82
- "from quantem.widget import Show4DSTEM\n",
83
- "from huggingface_hub import snapshot_download\n",
84
- "\n",
85
- "root = snapshot_download(\"bobleesj/quantem-data\", repo_type=\"dataset\",\n",
86
- " allow_patterns=[\"widget-tutorials/show4dstem/gold-512-bin4/full/*\"])\n",
87
- "path = f\"{root}/widget-tutorials/show4dstem/gold-512-bin4/full\"\n",
88
- "data = np.load(f\"{path}/data.npy\") # (512, 512, 48, 48) uint16, ~1.2 GB\n",
89
- "Show4DSTEM(data)\n"
90
- ],
91
- "id": "nbE-phyvth-f"
92
- },
93
- {
94
- "cell_type": "markdown",
95
- "metadata": {
96
- "id": "dBHvEtxJth-f"
97
- },
98
- "source": [
99
- "**Interact:** drag the detector ROI (left) -> the virtual image (right) updates live.\n",
100
- "Drag the scan cursor on the virtual image -> the diffraction pattern follows your finger.\n",
101
- "\n",
102
- "To use your own data, upload an Arina `*_master.h5` and run\n",
103
- "`Show4DSTEM(load('your_master.h5', det_bin=2))` (`from quantem.widget import load`).\n"
104
- ],
105
- "id": "dBHvEtxJth-f"
106
- }
107
- ],
108
- "metadata": {
109
- "kernelspec": {
110
- "display_name": "Python 3",
111
- "language": "python",
112
- "name": "python3"
113
- },
114
- "language_info": {
115
- "name": "python"
116
- },
117
- "accelerator": "GPU",
118
- "colab": {
119
- "provenance": [],
120
- "gpuType": "T4",
121
- "include_colab_link": true
122
- }
123
- },
124
- "nbformat": 4,
125
- "nbformat_minor": 5
126
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
notebooks/widget_4dstem_demo.ipynb DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:2adc9b05447b74492c68b2fddf1d908771479c1bc6b625d9eb7267a60c4f1cf2
3
- size 14104794