Skip to content

Commit

Permalink
Flatten function calls in the example.
Browse files Browse the repository at this point in the history
  • Loading branch information
YooSunYoung committed Jan 28, 2025
1 parent 66636d7 commit 48e77e8
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions docs/examples/workflow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -153,25 +153,21 @@
"metadata": {},
"outputs": [],
"source": [
"from ess.nmx.nexus import export_as_nxlauetof\n",
"from ess.nmx.nexus import (\n",
" export_panel_dependent_data_as_nxlauetof,\n",
" export_panel_independent_data_as_nxlauetof,\n",
")\n",
"\n",
"file_name = \"test.nxs\"\n",
"export_panel_independent_data_as_nxlauetof(binned_dg, output_file=file_name)\n",
"export_panel_dependent_data_as_nxlauetof(binned_dg, output_file=file_name)\n",
"del binned_dg\n",
"\n",
"dgs = []\n",
"for i in range(3):\n",
"for i in range(1, 3):\n",
" with temp_parameter(wf, DetectorIndex, i) as temp_wf:\n",
" reduced_data = temp_wf.compute(NMXReducedData)\n",
" dgs.append(reduced_data)\n",
" del reduced_data\n",
"\n",
"export_as_nxlauetof(*dgs, output_file=\"test.nxs\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"dgs[0]"
" export_panel_dependent_data_as_nxlauetof(reduced_data, output_file=file_name)\n",
" del reduced_data\n"
]
},
{
Expand Down

0 comments on commit 48e77e8

Please sign in to comment.