Skip to content

Commit

Permalink
Merge branch 'main' into export-mcstas-result
Browse files Browse the repository at this point in the history
  • Loading branch information
YooSunYoung authored Feb 6, 2024
2 parents efaf78f + 275f65c commit 6862bf5
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions docs/examples/workflow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,21 @@
"All pixel positions are relative to the sample position,\n",
"therefore the sample is at (0, 0, 0).\n",
"\n",
"You can plot the instrument view like below.\n",
"\n",
"```python\n",
"The instrument view is shown using"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import scippneutron as scn\n",
"\n",
"da = dg['weights']\n",
"da.coords['position'] = dg['position']\n",
"view = scn.instrument_view(da.flatten(['panel', 'id'], 'id').hist())\n",
"# Plot one out of 100 pixels to reduce size of docs output\n",
"view = scn.instrument_view(da.flatten(['panel', 'id'], 'id')['id', ::100].hist(), pixel_size=0.0075)\n",
"view.children[0].toolbar.cameraz()\n",
"view\n",
"```\n",
Expand All @@ -168,8 +175,7 @@
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
"pygments_lexer": "ipython3"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 6862bf5

Please sign in to comment.