Skip to content

Commit 9c5d7e9

Browse files
committed
Gemini AI run to attempt sync of comp->tex doc snippets, McStas
1 parent 5be8fda commit 9c5d7e9

31 files changed

+489
-898
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
\chapter{Test instruments for optics components}
2+
3+
This chapter describes the test instruments for the optics components.
4+
5+
\input{Tests_optics/Test_Collimator_Radial}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
\section{Test_Collimator_Radial: A test instrument for radial collimators}
2+
\label{s:test_collimator_radial}
3+
\index{Instruments!Tests!Test_Collimator_Radial}
4+
5+
This instrument is a test for the \textbf{Collimator_radial} component. It compares the results of the \textbf{Collimator_radial} component with two other radial collimator components, \textbf{Collimator_ROC} and \textbf{Exact_radial_coll}. The instrument uses a powder sample and a banana-shaped detector to measure the scattered neutrons.
6+
7+
\subsection{Running the instrument}
8+
To run the instrument, you can use the following command:
9+
10+
\begin{verbatim}
11+
./Test_Collimator_Radial --dir=Test_Collimator_Radial Collimator=1
12+
\end{verbatim}
13+
14+
This will run the instrument with the \textbf{Collimator_radial} component. You can change the value of the `Collimator` parameter to 2 or 3 to test the other components.
15+
16+
\subsection{Expected results}
17+
The instrument produces a 1D plot of the scattered intensity as a function of the scattering angle. The results of the three components should be very similar, with the \textbf{Exact_radial_coll} component showing a slightly lower intensity due to the absorption of the blades.

doc/manuals/mcstas/comp_abstract.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ \section{A short overview of the \MCS component library}
124124
\end{center}
125125
\end{table}
126126

127+
\include{Tests_optics}
128+
127129
\begin{table}
128130
\begin{center}
129131
{\let\my=\\
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
\section{Beam\_spy: A beam analyzer}
2+
\component{Beam\_spy}{System}{}{}{should overlap previous component}
3+
\index{Monitors!Beam analyzer}
4+
5+
This component is at the same time an Arm and a simple Monitor. It analyzes all neutrons reaching it, and computes statistics for the beam, as well as the intensity.
6+
7+
This component does not affect the neutron beam, and does not contain any propagation call. Thus it gets neutrons from the previous component in the instrument description, and should better be placed at the same position, with \verb+AT (0,0,0) RELATIVE PREVIOUS+.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
\section{Progress\_bar: Simulation progress and automatic saving}
2+
\component{Progress\_bar}{System}{percent, flag\_save, profile}{}{}
3+
\label{s:progress-bar}
4+
\index{Simulation progress bar}
5+
6+
This component displays the simulation progress and status
7+
but does not affect the neutron parameters.
8+
The display is updated in regular intervals of the full simulation;
9+
the default step size is 10 \%, but it may be changed using
10+
the \verb+percent+ parameter (from 0 to 100).
11+
The estimated computation time is displayed at the begining
12+
and actual simulation time is shown at the end.
13+
14+
Additionally, setting the \verb+flag_save+ to 1 results in
15+
a regular save of the data files during the simulation.
16+
This means that is is possible to view the data before the end
17+
of the computation, and have also a trace of it in case of
18+
computer crash. The achieved percentage of the simulation is stored in these temporary
19+
data files. Technically, this save is equivalent to sending regularly
20+
a USR2 signal to the running simulation.
21+
22+
The optional 'profile' parameter, when set to a file name, will produce the number of statistical events reaching each component in the simulation. This may be used to identify positions where events are lost.

doc/manuals/mcstas/misc/misc.tex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ \chapter{Special-purpose components}
3535

3636
\input{misc/Res_monitor}
3737

38+
\input{misc/Progress_bar}
39+
40+
\input{misc/Beam_spy}
41+
3842
\newpage
3943
\section{Progress\_bar: Simulation progress and automatic saving}
4044
\component{Progress\_bar}{System}{percent, flag\_save, profile}{}{}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
\section{DivLambda_monitor: A divergence-wavelength sensitive monitor}
2+
\label{s:divlambda-monitor}
3+
\index{Monitors!Divergence-wavelength monitor}
4+
5+
\mcdoccomp{monitors/DivLambda_monitor.parms}
6+
7+
The component \textbf{DivLambda_monitor} is a two-dimensional monitor that measures the intensity as a function of both horizontal divergence and wavelength.
8+
9+
The detector window is set by the $x$ and $y$ input coordinates. The monitor is sensitive to the neutron divergence and wavelength. The neutron counts are being histogrammed into $nh \times nL$ pixels.
10+
11+
The output from \textbf{DivLambda_monitor} is three two-dimensional arrays of counts: $Div_N(\lambda, div_h), Div_p(\lambda, div_h), Div_p2(\lambda, div_h)$. The arrays are written to a file, \verb+filename+, and can be read e.g. by the tool \textbf{MC_plot}, see the system manual.
12+
Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,11 @@
1-
\section{DivPos\_monitor: A divergence and position sensitive monitor}
1+
\section{DivPos_monitor: A divergence-position sensitive monitor}
22
\label{s:divpos-monitor}
3-
\index{Monitors!Divergence/position monitor}
4-
%\component{DivPos\_monitor}{System}{$x_\textrm{min}$, $x_\textrm{max}$, $y_\textrm{min}$, $y_\textrm{max}$, $n_x$, $n_\textrm{h}$, $\eta_\textrm{h,max}$, filename}{}{}
5-
\mcdoccomp{monitors/DivPos_monitor.parms}
3+
\index{Monitors!Divergence-position monitor}
64

7-
\textbf{DivPos\_monitor} is a two-dimensional monitor component,
8-
which is sensitive to both horizontal position ($x$) and horizontal divergence
9-
defined by $\eta_\textrm{h} = \tan^{-1}(v_x/v_z)$.
10-
The detector window is set
11-
by the $x$ and $y$ input coordinates.
5+
\mcdoccomp{monitors/DivPos_monitor.parms}
126

13-
The neutron counts are being histogrammed
14-
into $n_x \times n_\textrm{h}$ pixels. The horizontal divergence range accepted is
15-
$[-\eta_\textrm{h,max}; \eta_\textrm{h,max}]$, and the horizontal position
16-
range is the size of the detector.
7+
The component \textbf{DivPos_monitor} is a two-dimensional monitor that measures the intensity as a function of both position and divergence, either horizontally or vertically.
178

18-
The output from \textbf{PSD\_monitor} is the integrated counts, $n, I, M_2$,
19-
as well as
20-
three two-dimensional arrays of counts: $n(x,\eta_\textrm{h}),
21-
I(x,\eta_\textrm{h}), M_2(x,\eta_\textrm{h})$.
22-
The arrays are written to a file and can be read e.g. by the tool
23-
\textbf{mcplot}, see the system manual.
9+
The detector window is set by the $x$ and $y$ input coordinates. The monitor is sensitive to the neutron divergence and position. The neutron counts are being histogrammed into $ndiv \times nb$ pixels.
2410

25-
This component can be used for measuring acceptance diagrams \cite{Cussen03}.
26-
\textbf{PSD\_monitor} can easily be changed into being sensitive
27-
to $y$ and vertical divergence by a 90 degree rotation around the $z$-axis.
11+
The output from \textbf{DivPos_monitor} is three two-dimensional arrays of counts: $Div_N(pos, div), Div_p(pos, div), Div_p2(pos, div)$. The arrays are written to a file, \verb+filename+, and can be read e.g. by the tool \textbf{MC_plot}, see the system manual.

doc/manuals/mcstas/monitors/E_monitor.tex

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
\section{E\_monitor: The energy-sensitive monitor} \label{s:E_monitor}
22
\index{Monitors!Energy monitor}
3-
%\component{E\_monitor}{System}{$x_\textrm{min}$, $x_\textrm{max}$, $y_\textrm{
4-
%min}$, $y_\textrm{max}$, $n_\textrm{chan}$, $E_\textrm{min}$, $E_\textrm{max}$,
5-
%filename}{}{}
3+
64
\mcdoccomp{monitors/E_monitor.parms}
75

86
The component \textbf{E\_monitor} resembles \textbf{TOF\_monitor}
97
to a very large extent. Only this monitor is sensitive to
10-
the neutron energy, which in binned in \textit{nE} bins between
11-
$E_\textrm{min}$ and $E_\textrm{max}$ (in meV).
8+
the neutron energy, which in binned in $nE$ bins between
9+
$Emin$ and $Emax$ (in meV).
1210

1311
The output parameters from \textbf{E\_monitor} are the total counts,
1412
and a file with 1-dimensional data vs. $E$, similar to \textbf{TOF\_monitor}.

doc/manuals/mcstas/monitors/L_monitor.tex

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1-
% Emacs settings: -*-mode: latex; TeX-master: "manual.tex"; -*-
2-
3-
4-
\section{L\_monitor: The wavelength sensitive monitor}
1+
\section{L_monitor: The wavelength sensitive monitor}
52
\label{s:L_monitor}
63
\index{Monitors!Wavelength monitor}
74

8-
%\component{L\_monitor}{System}{$x_\textrm{min}$, $x_\textrm{max}$, $y_\textrm{min}$, $y_\textrm{max}$, $n_\textrm{chan}$, $\lambda_\textrm{min}$, $\lambda_\textrm{max}$, filename}{}{}
95
\mcdoccomp{monitors/L_monitor.parms}
106

11-
The component \textbf{L\_monitor} is very similar to
12-
\textbf{TOF\_monitor} and \textbf{E\_monitor}.
7+
The component \textbf{L_monitor} is very similar to
8+
\textbf{TOF_monitor} and \textbf{E_monitor}.
139
This component is just sensitive to the neutron wavelength.
1410
The wavelength spectrum is output in a one-dimensional histogram.
15-
between $\lambda_\textrm{min}$ and $\lambda_\textrm{max}$ (measured in \AA ).
11+
between $Lmin$ and $Lmax$ (measured in \AA ).
1612

1713
As for the two other 1-dimensional monitors, this component outputs
1814
the total counts and a file with the histogram.

0 commit comments

Comments
 (0)