Skip to content

Detailed specifications for SANS options at DREAM #36

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 4 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
58 changes: 58 additions & 0 deletions docs/user-guide/DREAM-Diffraction-methodology.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "788a4fce-63dc-4c23-8d2a-e9a05db0fdf7",
"metadata": {},
"source": [
"# DREAM-diffraction methodology\n",
"\n",
"The general data reduction scheme presented in \"SANS Polarization Analysis Methodology\" will be adapted for the diffraction option at the DREAM instrument at the ESS. Following considerations have to be changed with respect to the general methodology:\n",
"\n",
"### Polarizer:<br>\n",
"The DREAM-polarizer is a movable in-situ SEOP <sup>3</sup>He-polarizer of which the neutron polarization $P^{^3\\textup{He, p}}$ has to be pre-characterized in commissioning measurements and inserted into this workflow. Its wavelength-independent opacity $O^{\\textup{0, p}}$, empty-glass transmission $T^{\\textup{g, p}}$, pre-factor of nuclear polarization $C^{\\textup{p}}$, and its time-decay constant $T^{\\textup{1, p}}$ can be measured once in every commissioning time via Workflow 2 of \"SANS Polarization Analysis Methodology\". The resulting $P^{^3\\textup{He, p}}$ can be inserted into the workflow as constant parameter. To account for sudden fluctuations of $P^{^3\\textup{He, p}}$, which can occur due to changes in pressure or the like, the beam intensity after the polarizer has to be continuously recorded as function of time. Sudden fluctuations in intensity above a pre-defined difference in time must pop out an error message \"Critical intensity fluctuations detected in polarizer-monitor. Re-measure $P^{^3\\textup{He, p}}$!\".<br>\n",
"Note: Workflow 1 of \"SANS Polarization Analysis Methodology\" cannot be used for this polarizer.\n",
"\n",
"### Analyzer:<br>\n",
"The DREAM-Diffraction-Analyzer is a wide-angle, sealed, and ex-situ MEOP <sup>3</sup>He-cell surrounding the sample. It supports mainly thermal neutrons in the diffraction range, but will also be equipped with a SANS-window of slightly smaller thickness to support cold neutrons. It will be continuously pumped and hence obtain a very long time-decay constant $T^{1, a}$. In contrast to typical ex-situ SEOP <sup>3</sup>He-cells, which have to be exchanged after certain time-intervals, it will stay in place and be pumped ex-situ by a gas transfer line to the cell. Hence, its wavelength-independent opacity $O^{\\textup{0, p}}$, empty-glass transmission $T^{\\textup{g, p}}$, and the pre-factor of nuclear polarization $C^{\\textup{p}}$ will remain constant and only need to be re-calculated once in every commissioning time via Workflow 2 of \"SANS Polarization Analysis Methodology\" (similar to the polarizer described above). Still, its polarization $P^{^3\\textup{He}, a}(t)$ has to be characterized continuously throughout the beamtimes as a function of time (to be treated as described in \"SANS Polarization Analysis Methodology\"). \n",
"\n",
"______\n",
"\n",
"### Unpolarized data reduction\n",
"The unpolarized data reduction that has to be performed before any application of a polarized data reduction workflow will be different for Diffraction and for SANS. To adapt it here for polarlization data reduction for diffraction in the same way as the unpolarized data reduction had to be adapted for polarized SANS, we will use a new unpolarized data reduction scheme for DREAM being in development right now.\n",
"\n",
"\n",
"### Monitors:<br>\n",
"For an optimal SANS data-reduction, three monitors would be ideal: (i) an incident beam monitor $M_{\\textup{in}}$ before the polarizer, (ii) a monitor after the polarizer $M_{\\textup{p}}$, and (iii) a monitor after the analyzer $M_{\\textup{a}}$ (alternatively on the main detector if the direct beam can be recorded). At DREAM, only two monitors will be inserted: $M_{\\textup{p}}$ and $M_{\\textup{a}}$. In general, the total beam intensity is corrected by $M_{\\textup{in}}$. Due to the time-independence of $P^{^3\\textup{He, p}}$, the beam intensity of $M_{\\textup{p}}$ can be used instead.\n",
"\n",
"### Sample-movements:<br>\n",
"At DREAM, the samples cannot be moved in and out of beam with a motor and hence changes in sample position have to be done by hand. This is feasible sometimes during the workflow, but not in a regular manner (especially overnight). We will open two options for the users:\n",
"\n",
"(a) to use the workflow as-is with the sample in beam, and recording the direct-beam for polarization data reduction as described above, but in transmission through the sample. This will be an option for non-time-dependent, and non-(or weak-)spin-dependent scatterers, but not a good option for strong-spin-dependent scatterers like hydrogen. In this case, the correction for transmission through the sample has to be taken out of the \"unpolarized\" data reduction workflow (which is being performed before the polarizion data reduction).\n",
"\n",
"(b) for strong-spin-dependent scatterers, the sample will have too much impact on the data correction procedure and has to be moved out of beam for the direct beam measurements for polarization correction. The user has to do this by hand frequently throughout the beamtime. No changes to above polarization correction are needed.\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
135 changes: 135 additions & 0 deletions docs/user-guide/DREAM-SANS-methodology.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "788a4fce-63dc-4c23-8d2a-e9a05db0fdf7",
"metadata": {},
"source": [
"# DREAM-SANS methodology \n",
"\n",
"The general data reduction scheme presented in \"SANS Polarization Analysis Methodology\" will be adapted for the SANS option at the DREAM instrument at the ESS.\n",
"Following considerations have to be changed with respect to the general methodology:\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"id": "df66ab2d",
"metadata": {},
"source": [
"### Notation\n",
"- supersripts of p,a stand for the cell, i.e., either the \"polarizer\" (p) or the \"analyzer\" (a)\n",
"- all other definitions are defined in \"SANS Polarization Analysis Methodology\""
]
},
{
"cell_type": "markdown",
"id": "71dda6e3",
"metadata": {},
"source": [
"### Polarizer:<br>\n",
"The DREAM-polarizer is a movable in-situ SEOP<sup>[1]</sup> <sup>3</sup>He-cell [Ref. 1] of which the neutron polarization $P^{^3\\textup{He, p}}$ has to be pre-characterized in commissioning measurements and inserted into this workflow.\n",
"Its wavelength-independent opacity $O^{\\textup{0, p}}$, empty-glass transmission $T^{\\textup{g, p}}$, pre-factor of nuclear polarization $C^{\\textup{p}}$, and its time-decay constant $T^{\\textup{1, p}}$ can be measured once in every commissioning time via Workflow 2 of \"SANS Polarization Analysis Methodology\". \n",
"The resulting $P^{^3\\textup{He, p}}$ can be inserted into the workflow as constant parameter. \n",
"To account for sudden fluctuations of $P^{^3\\textup{He, p}}$, which can occur due to changes in pressure or the like, the beam intensity after the polarizer has to be continuously recorded as function of time. \n",
"Sudden fluctuations in intensity above a pre-defined difference in time must raise an error message \"Critical intensity fluctuations detected in polarizer-monitor. \n",
"Re-measure $P^{^3\\textup{He, p}}$!\".<br>\n",
"Note: Workflow 1 of \"SANS Polarization Analysis Methodology\" can be adapted to include the usage of the DREAM polarizer. Changes that have to be made are that the wavelength-independent pre-factor of opacity ($O^{0, p}$), empty-glass transmission 9$T^{\\textup{g}, p}(\\lambda)$), the pre-factor of nuclear polarization exponential decay of <sup>3</sup>He-polarizer ($C^{p}$), and the decay constant of nuclear polarization exponential decay of <sup>3</sup>He-polarizer ($T^{1, cell}$ ), are constant and do not have to be determined by neither Workflow 1, nor Workflow 2 (they can be simply taken out). Instead, the above mentioned sudden fluctuations can occur spontaneously, for which an error message has to be inserted into Workflow 1. "
]
},
{
"cell_type": "markdown",
"id": "558a1e4f",
"metadata": {},
"source": [
"### Analyzer:<br>\n",
"In the current scope, DREAM will be equipped with 3 different SANS analyzers: (i) an ex-situ SEOP <sup>3</sup>He-cell, (ii) an in-situ SEOP <sup>3</sup>He-cell, and (iii) a SANS-window being part of a wide angle MEOP<sup>[2]</sup> based <sup>3</sup>He-cell. \n",
"\n",
"(i) The ex-situ SEOP <sup>3</sup>He-cell is a movable, time-dependent cell and has to be treated as described in \"SANS Polarization Analysis Methodology\".<br>\n",
"(ii) The in-situ SEOP <sup>3</sup>He-cell is a movable, non-time-dependent cell and has to be treated as described above for the DREAM polarizer.<br>\n",
"(iii) The ex-situ MEOP wide angle <sup>3</sup>He-cell with a small SANS window is a rotatable, time-dependent cell and has to be treated as the analyzer described in \"DREAM-diffraction methodology\"."
]
},
{
"cell_type": "markdown",
"id": "751e7195",
"metadata": {},
"source": [
"### Monitors:<br>\n",
"For an optimal SANS data-reduction, three monitors would be ideal: (i) an incident beam monitor $M^{\\textup{in}}$ before the polarizer, (ii) a monitor after the polarizer $M^{\\textup{p}}$, and (iii) a monitor after the analyzer $M^{\\textup{a}}$ (alternatively on the main detector if the direct beam can be recorded). \n",
"At DREAM, only two monitors will be inserted: $M^{\\textup{p}}$ and $M_{\\textup{a}}$. In general, the total beam intensity is corrected by $M^{\\textup{in}}$.\n",
"Due to the time-independence of $P^{^3\\textup{He, p}}$, the beam intensity of $M^{\\textup{p}}$ can be used instead.\n"
]
},
{
"cell_type": "markdown",
"id": "9e54c528",
"metadata": {},
"source": [
"### Sample-movements:<br>\n",
"At DREAM, the samples cannot be moved in and out of beam with a motor and hence changes in sample position have to be done by hand. This is feasible sometimes during the workflow, but not in a regular manner (especially overnight). \n",
"We will open two options for the users: \n",
"\n",
"(a) to use the workflow as-is with the sample in beam, and recording the direct-beam for polarization data reduction as described above, but in transmission through the sample. \n",
"This will be an option for non-time-dependent, and non-(or weak-)spin-dependent scatterers, but not a good option for strong-spin-dependent scatterers like hydrogen. In this case, the correction for transmission through the sample has to be taken out of the \"unpolarized\" data reduction workflow (which is being performed before the polarizion data reduction). \n",
"\n",
"(b) for strong-spin-dependent scatterers, the sample will have too much impact on the data correction procedure and has to be moved out of beam for the direct beam measurements for polarization correction. The user has to do this by hand frequently throughout the beamtime. \n",
"No changes to above polarization correction are needed.\n"
]
},
{
"cell_type": "markdown",
"id": "5231d269",
"metadata": {},
"source": [
"<sup>[1]</sup>Spin-Exchange Optical Pumping (SEOP) [Ref. 1]: \n",
"the <sup>3</sup>He nuclei are spin polarized indirectly via collisions with polarized alkali metals, i.e., via the Fermi-contact hyperfine interaction between them. \n",
"Alkali metals, such as rubidium or rubidium-potassium, are electronically polarized by optical pumping through circular polarized laser light.\n"
]
},
{
"cell_type": "markdown",
"id": "18053013",
"metadata": {},
"source": [
"<sup>[2]</sup>Metastability-Exchange Optical Pumping (MEOP) [Ref. 1]: the <sup>3</sup>He nuclei are spin polarized by a combination of optical pumping and hyperfine interaction. \n",
"After an excitation to the 2<sup>3</sup> S_1 metastable state, excited <sup>3</sup>He nuclei transfer their electronic excitation to <sup>3</sup>He nuclei in the groundstate via metastability exchange collisions."
]
},
{
"cell_type": "markdown",
"id": "5ff56771",
"metadata": {},
"source": [
"### Literature\n",
"1) T. Gentile et al., Optically polarized <sup>3</sup>He"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
81 changes: 79 additions & 2 deletions docs/user-guide/inverse_of_polarization_matrices.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"outputs": [],
"source": [
"Tp = sp.symbols('T^p_+, T^p_-', positive=True)\n",
"Ta = sp.symbols('T^a_+, T^a_-', positive=True)"
"Ta = sp.symbols('T^a_+, T^a_-', positive=True)\n",
"Tf1 = sp.symbols('T^f1, 1-T^f1', positive=True)"
]
},
{
Expand Down Expand Up @@ -83,6 +84,82 @@
"TA.inv()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "fbd5c02a-bb0d-459f-b95c-e8bf4465f620",
"metadata": {},
"outputs": [],
"source": [
"TF1 = sp.ImmutableDenseMatrix([\n",
" [1, 0, 0, 0],\n",
" [0, 1, 0, 0],\n",
" [Tf1[1], 0, Tf1[0], 0],\n",
" [0, Tf1[1], 0, Tf1[0]],\n",
"])\n",
"TF1"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "dcb70573-1a63-41ad-aa16-c28fdc34b4ff",
"metadata": {},
"outputs": [],
"source": [
"TF1.inv()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "14876849-4ad5-4af9-9c89-5fcd48edde85",
"metadata": {},
"outputs": [],
"source": [
"Total = TA @ (TF1 @ TP)\n",
"Total"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "31a7e576-37af-4183-bb17-26237ae77cae",
"metadata": {},
"outputs": [],
"source": [
"#Test_Alex_D33 = \n",
"m11 = Tp[0]*Ta[0]\n",
"m12 = Tp[1]*Ta[1]\n",
"m13 = Tp[0]*Ta[1]\n",
"m14 = Tp[1]*Ta[0]\n",
"\n",
"m21 = (Tp[0] * (1-Tf1[0]) + Tp[1] * Tf1[0] )*Ta[1] \n",
"m22 = (Tp[0] * Tf1[0] + Tp[1] * (1-Tf1[0])) *Ta[0]\n",
"m23 = (Tp[0] * (1-Tf1[0]) + Tp[1] * Tf1[0]) *Ta[0] \n",
"m24 = (Tp[0] * Tf1[0] + Tp[1] * (1-Tf1[0])) *Ta[1]\n",
"\n",
"m31 = Tp[0]*Ta[1]\n",
"m32 = Tp[1]*Ta[0]\n",
"m33 = Tp[0]*Ta[0]\n",
"m34 = Tp[1]*Ta[1]\n",
"\n",
"m41 = (Tp[0] * (1-Tf1[0]) + Tp[1] * Tf1[0] )*Ta[0] \n",
"m42 = (Tp[0] * Tf1[0] + Tp[1] * (1-Tf1[0])) *Ta[1]\n",
"m43 = (Tp[0] * (1-Tf1[0]) + Tp[1] * Tf1[0]) *Ta[1] \n",
"m44 = (Tp[0] * Tf1[0] + Tp[1] * (1-Tf1[0])) *Ta[0]\n",
"\n",
"M_Alex = sp.ImmutableDenseMatrix([[m11,m12,m13,m14],\n",
" [m21,m22,m23,m24],\n",
" [m31,m32,m33,m34],\n",
" [m41,m42,m43,m44]])\n",
"M_Alex\n",
"#Info: \n",
"#channels Alex: UU, DD, UD, DU\n",
"#channels scipp: UU, UD, DU, DD\n",
"#tested and SHOULD be same, but try on dataset!!!"
]
},
{
"cell_type": "markdown",
"id": "f4fabb5f-da34-4809-98be-3e7ba3477357",
Expand Down Expand Up @@ -244,7 +321,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.13"
"version": "3.11.6"
}
},
"nbformat": 4,
Expand Down
Loading