Skip to content

Commit

Permalink
Fix equations
Browse files Browse the repository at this point in the history
  • Loading branch information
rayosborn committed Feb 8, 2024
1 parent 2ba562c commit d356af9
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 6 deletions.
52 changes: 49 additions & 3 deletions docs/source/experiment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -350,13 +350,18 @@ should be created for each configuration that requires a change in the
instrument calibration (wavelength, detector distance, detector
translation) or scan angles.

The detector is chosen from a pull-down menu that contains all the
detectors defined in the *PyFAI* package. This defines the number of
pixels, their size, and a mask array used to exclude all the pixels
within gaps between the detector chips.

Calibrate Powder
----------------
This dialog will import a TIFF or CBF file containing measurements of a
powder calibrant and refine the detector position and coordinates, using
the PyFAI API. Alternatively, if the calibration parameters are already
available in a PONI file, they can be directly imported. The resulting
powder data and calbration parameters are then saved to the
the *PyFAI* API. Alternatively, if the calibration parameters are
already available in a PONI file, they can be directly imported. The
resulting powder data and calbration parameters are then saved to the
configuration template previously created using the *New Configuration*
dialog.

Expand Down Expand Up @@ -441,3 +446,44 @@ powder calibration data and parameters to the configuration file. The
calibration parameters can also be saved to a PONI file, using the
"Export Calibration" button. This process should be repeated for each
entry, after which the dialog can be closed.

Create Mask
-----------
This dialog creates a pixel mask that is used to exclude bad pixels from
further analysis. As described above, when a new configuration file is
created, a pixel mask that excludes gaps between detector chips is
automatically added. Additional pixels can be excluded using this
dialog, either by adding editable shapes that are constructively added
to the existing mask or by importing the mask from an external file,
which can store the mask in any image format. The latter is useful if a
beamline regularly updates a particular detector's mask as bad pixels are identified.

.. warning:: If an external mask is input using "Import Mask", it will
overwrite the existing mask. It is important therefore that
the external pixel mask also excludes the detector gaps.

After launching the dialog, the current mask can be plotted by clicking
on "Plot Mask." This overlays the mask on the powder diffraction data to
enable the center of the beam and other features of the data to be
identified.

.. figure:: /images/create-mask.png
:align: center
:width: 80%

*Create Mask dialog. The translucent red circle shows the circle
created by clicking "Add Shape".*

By clicking on "Add Shape" with either a rectangle or circle selected, a
translucent shape is added to the plot. By default, it is centered on
the beam center, but may be moved by dragging the center of the shape
and/or resized by dragging one of the shape edges. When the shape has
the correct position and size, click on "Add Shape" again for the shape
to be added to the current list. A pull-down menu allows existing shapes
to be selected for removal if necessary.

If a more complicated mask is required, it can be generated by an
external image editor and imported using "Import Mask".

When the mask is complete, click "Save" to save it to the configuration file.

Binary file added docs/source/images/create-mask.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions docs/source/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,12 @@ where

.. math::
\mathbf{d}(x_{p}, y_{p})=\mathcal{D}\mathcal{O}^{-1}_{det}
\begin{pmatrix}{x_{p}-x_{c}}\\{y_{p}-y_{c}}\\0\end{pmatrix}-\mathcal{G}
\begin{pmatrix}{x_{s}-l_{sd}}\\{y_{s}}\\{z_{s}}\end{pmatrix}
\mathbf{d}(x_{p},
y_{p})=\mathcal{D}\mathcal{O}^{-1}_{det}
\begin{pmatrix}{x_{p}-x_{c}}\\{y_{p}-y_{c}}\\0\end{pmatrix}-
\mathcal{G}
\begin{pmatrix}{x_{s}}\\{y_{s}}\\{z_{s}}\end{pmatrix}-
\begin{pmatrix}{l_{sd}}\\{0}\\{0}\end{pmatrix}
The :math:`\mathcal{B}` matrix is defined by the lattice parameters of
the sample, as described by Busing and Levy in Acta Cryst. **22**, 457
Expand Down

0 comments on commit d356af9

Please sign in to comment.