Skip to content

added adapted zoom.ipynb for secondrun data to test the workflow #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
49 changes: 43 additions & 6 deletions docs/user-guide/zoom.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,41 @@
"outputs": [],
"source": [
"from pathlib import Path\n",
"#38235/38238 (empty beam) polarized-in, without sample, without analyzer\n",
"#38336: (empty beam) unpolarized-in, without sample, without analyzer\n",
"#38337, 338: (empty cell) transmission through cell without He, i.e., empty cell transmission\n",
"#337: empty cell unpolarized-in\n",
"#338: empty cell polarized-in\n",
"\n",
"data_folder = Path('zoom_polarized_data')\n",
"#Cell to characterize:\n",
"#before 348: dont take this data, AFP command was not working\n",
"#38351 onwards: use this cell, even numbers polarized-in, odd numbers unpolarized-in (without supermirror)\n",
"#depolarized for this cell: \n",
"#38420 depolarized (unpolarized in)\n",
"#38421 depolarized (polarized in)\n",
"#38411-17 tests with Supermirror as sample\n",
"\n",
"#mon 3: incident beam monitor, mon4: transmission monitor\n",
"\n",
"#Firstrun\n",
"#data_folder = Path('zoom_polarized_data/Firstrun')\n",
"# Runs with analyzer at 4 different times\n",
"#cell_runs = [str(data_folder / f'ZOOM00022{run}.nxs') for run in [710, 712, 714, 716]]\n",
"#until 409\n",
"#empty_run = data_folder / 'ZOOM00034787.nxs'\n",
"#depolarized_run = data_folder / 'ZOOM00022718.nxs'\n",
"#cell_runs = cell_runs + [depolarized_run]\n",
"\n",
"#Results Diego gets:\n",
"#Pressure_gas \n",
"\n",
"#Secondrun:\n",
"data_folder = Path('zoom_polarized_data/Secondrun')\n",
"# Runs with analyzer at 4 different times\n",
"cell_runs = [str(data_folder / f'ZOOM00022{run}.nxs') for run in [710, 712, 714, 716]]\n",
"empty_run = data_folder / 'ZOOM00034787.nxs'\n",
"depolarized_run = data_folder / 'ZOOM00022718.nxs'\n",
"cell_runs = [str(data_folder / f'ZOOM00038{run}.nxs') for run in [351, 353, 355, 357, 359, 361, 363, 365, 367, 369, 371, 373, 375, 377]]\n",
"#until 409\n",
"empty_run = data_folder / 'ZOOM00038336.nxs'\n",
"depolarized_run = data_folder / 'ZOOM00038420.nxs'\n",
"cell_runs = cell_runs + [depolarized_run]"
]
},
Expand All @@ -76,6 +105,9 @@
"sans_workflow[WavelengthBins] = sc.geomspace(\n",
" 'wavelength', start=1.75, stop=16.5, num=141, unit='Å'\n",
")\n",
"#Diego: 0 - 18, steps of 0.25\n",
"#But cell probably only is letting neutrons until 8A through\n",
"#Polarization: after 3A\n",
"sans_workflow[isis.mantidio.Period] = 0\n",
"sans_workflow[isis.mantidio.CalibrationWorkspace] = None"
]
Expand All @@ -100,7 +132,12 @@
")\n",
"# Load only first run\n",
"first_run = sans_workflow.compute(loaded[0])\n",
"sc.DataGroup(sc.collapse(first_run['data'], keep='tof')).plot()"
"sc.DataGroup(sc.collapse(first_run['data'], keep='tof')).plot()\n",
"# Spectra: corresponding to different monitors\n",
"# spectrum 2: Mon3\n",
"# spectrum 3: Mon4 - use for transmission data of direct beam\n",
"# Mon 5 (what Judith uses) we have not used in these test experiments\n",
"# Sample-data on 2D detector: starts in spectrum 9, ends in 98312 (2D position sensitive detector with 512 pixesl and 182 tubes"
]
},
{
Expand Down Expand Up @@ -477,7 +514,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
"version": "3.11.6"
},
"nbsphinx": {
"execute": "never"
Expand Down