Skip to content

Commit 8d2ba5a

Browse files
committed
update user docs
1 parent 0296c9f commit 8d2ba5a

8 files changed

+56
-77
lines changed
13.6 KB
Loading
29.4 KB
Loading
21.7 KB
Loading

docs/images/q_steps_global0.png

-41.6 KB
Binary file not shown.

docs/images/q_steps_global1.png

-19 KB
Binary file not shown.

docs/images/q_steps_per_run0.png

-32.7 KB
Binary file not shown.

docs/images/q_steps_per_run1.png

-26.1 KB
Binary file not shown.

docs/user/binning.rst

Lines changed: 56 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@ Binning a Reduced Workspace in QuickNXS
66
Overview
77
--------
88

9-
Binning is an essential process in reflectivity reduction within QuickNXS, organizing raw data into manageable intervals for accurate analysis.
10-
There are two steps during which binning occurs:
11-
1. An initial time-of-flight binning step to process the raw event data, which is later converted into Q bins (mandatory).
12-
2. A final Q rebinning is optionally available for user who want their reflectivity output in specific Q binning.
9+
Binning is an essential process in reflectivity reduction within QuickNXS,
10+
organizing raw data into manageable intervals for accurate analysis.
11+
There are two types of binning: time-of-flight binning and Q binning.
12+
13+
An initial **time-of-flight binning** step processes the raw event data from the
14+
sample run and direct beam run to allow for normalization. This step is
15+
mandatory.
16+
17+
There is an optional **Q binning** step, which happens when the reflectivity
18+
data is converted to Q-space.
1319

1420
This guide explains the available binning options in QuickNXS and how to configure them.
1521

@@ -40,97 +46,66 @@ The following options allow users to fine-tune binning behavior:
4046
**Entering the Bin Width**
4147

4248

43-
**Final Rebin** (Checkbox, Per-Run)
44-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
49+
**Binning Type** (Multi-select, Per-Run)
50+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4551

46-
- **What It Does:** Controls whether the final reduced workspace (converted to Q-space) undergoes additional rebinning.
52+
- **What It Does:** Controls the binning of the final reduced workspace (converted to Q-space).
4753
- **How It Works:**
54+
- There are three options for `Q binning`, which happens when the reflectivity
55+
data is converted to Q-space:
4856

49-
- When enabled, rebinning is performed using `Q Steps`, in units of 1/Å:
50-
51-
- If **positive**, bins are evenly spaced.
52-
- If **negative**, bins are spaced logarithmically using a geometric progression.
57+
1. `None`: the counts from the pixels in the region-of-interest are summed
58+
in pixel-time space and then converted to Q. No additional binning.
59+
2. `Normal binning`: the counts from the pixels in the region-of-interest
60+
are summed in pixel-time space and then converted to Q. Finally, the
61+
resulting counts vs Q data is binned according to the configured Q
62+
binning.
63+
3. `Constant-Q binning`: the data is first converted to Q and then summed
64+
according to the configured Q binning to produce counts vs Q.
5365

54-
- This option is **only available** if `Constant-Q Binning` is **disabled**.
55-
- If `Constant-Q Binning` is enabled, it **takes priority** over `Final Rebin`.
56-
- If `Final Rebin` is enabled for a run, the `Q Steps` values can be viewed and updated in the reduction data table under the `Q-Steps` column.
57-
- The button `Apply final rebin to runs` applies final rebin with the same `Q Steps` value for all runs in the active reduction data table.
66+
- For `Normal binning` and `Constant-Q binning`, rebinning is performed
67+
using `Q Steps`, in units of 1/Å:
5868

59-
- **How to Use It:** Check this box if you want to apply final rebinning for the active run, or use the button to apply final rebin for all runs.
69+
- If **positive**, bins are evenly spaced.
70+
- If **negative**, bins are spaced logarithmically using a geometric progression.
6071

61-
.. figure::
62-
../images/final_rebin_button.png
63-
:alt: Apply Final Rebin to All Runs
64-
65-
**Apply Final Rebin to All Runs in the Active Reduction Data Table**
72+
- **How to Use It:** Select the binning type either in the reduction table
73+
or (for the active run) in the left-hand side panel `Reflectivity
74+
Extraction (Per Run)`.
6675

67-
.. figure::
68-
../images/final_rebin_per_run.png
69-
:alt: Final Rebin Per-Run Checkbox
70-
71-
**Enabling Final Rebin Per-Run**
72-
73-
74-
**Constant-Q Binning** (Checkbox, Applied Globally)
75-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
76-
77-
- **What It Does:** uses the position of each pixel and the specified TOF binning to sum counts directly in Q bins. This differs from the traditional reflectivity calculation, which assumes that all counts in a TOF bin has the same Q value regardless of where they landed on the detector.
78-
- **How It Works:**
79-
80-
- When enabled, `Final Rebin` is not performed.
81-
- Enabling Constant-Q binning changes the way R(q) is calculated.
82-
- `Q Steps` is used to determine binning:
83-
84-
- If **positive**, bins are evenly spaced.
85-
- If **negative**, bins are spaced logarithmically using a geometric progression.
86-
87-
- This setting is **global** and cannot be adjusted per-run.
88-
89-
- **How to Use It:** Check this box if you want to maintain constant-Q binning. Ensure `Q Steps` is set appropriately for either linear or logarithmic binning.
90-
91-
.. figure::
92-
../images/constant_q_binning.png
93-
:alt: Constant-Q Binning
94-
95-
**Enabling Constant-Q Binning**
96-
97-
**Q Steps** (Numeric Input, Per-Run or Global)
98-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
76+
**Q Steps** (Numeric Input, Per-Run)
77+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9978

10079
- **Constraints:** Must be a floating point value between -0.1 and 0.1 units of 1/Å.
101-
- **What It Does:** Defines the bin width for the final rebinning in Q-space.
80+
- **What It Does:** Defines the bin width for the rebinning in Q-space.
10281
- **How It Works:**
10382

104-
- `Q Steps` is used in both `Final Rebin` and `Constant-Q Binning`.
105-
- When `Final Rebin` is enabled, `Q Steps` sets the bin width for the final rebinning.
106-
- When `Constant-Q Binning` is enabled, `Q Steps` determines whether binning follows a **linear** or **logarithmic** scale.
83+
- `Q Steps` is used for both `Normal` and `Constant-Q` binning.
84+
- It controls the resolution of the final reduced workspace.
10785

108-
- It controls the resolution of the final reduced workspace.
10986
- If `Q Steps` is **positive**, linear binning is applied with evenly spaced bins.
11087
- If `Q Steps` is **negative**, logarithmic binning is applied, where bin edges follow a geometric progression.
11188

112-
- **How to Use It:** Enter a numeric value to specify the bin width for Q-space rebinning. Use negative values for logarithmic binning.
89+
- **How to Use It:** Enter a numeric value to specify the bin width for
90+
Q-space binning. Use negative values for logarithmic binning.
11391

11492
.. figure::
115-
../images/q_steps_global0.png
116-
:alt: Q Steps Global
93+
../images/binning_options_per_run.png
94+
:alt: Binning Options for the Active Run
11795

96+
**Changing Binning Options for the Active Run**
11897

11998
.. figure::
120-
../images/q_steps_global1.png
121-
:alt: Q Steps Global
99+
../images/binning_options_reduction_table.png
100+
:alt: Binning Options in the Reduction Table
122101

123-
**Setting Q Steps Globally disables the Q-Steps column in the reduction table**
124-
125-
.. figure::
126-
../images/q_steps_per_run0.png
127-
:alt: Q Steps Per-Run
102+
**Changing Binning Options in the Reduction Table**
128103

129104
.. figure::
130-
../images/q_steps_per_run1.png
131-
:alt: Q Steps Per-Run
105+
../images/binning_options_button_apply_to_all_runs.png
106+
:alt: Apply the Same Binning Options to All Runs
132107

133-
**Setting Q Steps Per-Run adds the value to the Q-Steps column in the reduction table**
108+
**Apply the Same Binning Options to All Runs in the Reduction Table**
134109

135110
Binning Workflow
136111
----------------
@@ -144,12 +119,16 @@ To apply binning settings effectively, follow these steps:
144119
- If TOF min is ≤ 0, `Bin Width` will also be used as the TOF minimum.
145120
- The direct beam workspace is automatically rebinned to match this setting.
146121

147-
1. **Apply Final Binning (Optional):**
122+
1. **Apply Q Binning (Optional):**
148123
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
149124

150-
- If `Constant-Q Binning` is **enabled**, it takes priority over `Final Rebin`.
151-
- If `Constant-Q Binning` is **disabled** and additional Q-space binning is required, check `Final Rebin` and specify a `Q Steps` value.
152-
- If `Final Rebin` is enabled **per-run**, the `Q Steps` values can be viewed and updated in the reduction data table under the `Q-Steps` column.
153-
- If using `Constant-Q Binning`, ensure `Q Steps` is appropriately set for linear or logarithmic binning.
125+
- Select the binning type and Q steps for each run, either in the reduction
126+
table or in the panel `Reflectivity Extraction (Per Run)`. Alternatively,
127+
to set the same binning type and Q steps for all runs in the reduction
128+
table, use the button `Apply to all runs` under `Reflectivity Extraction
129+
(Global)`.
130+
- The reflectivity plot is updated automatically when updating binning
131+
options.
154132

155-
By adjusting these options, users can customize their reflectivity reduction workflow to achieve the desired data resolution and accuracy.
133+
By adjusting these options, users can customize their reflectivity reduction
134+
workflow to achieve the desired data resolution and accuracy.

0 commit comments

Comments
 (0)