You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user-guide/reduction-workflow-guidelines.md
+63Lines changed: 63 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -146,6 +146,69 @@ workflow.visualize(Result)
146
146
workflow.compute(Result)
147
147
```
148
148
149
+
### C.6: Domain types for data products
150
+
151
+
Data types that flow through the reduction workflow should follow a systematic naming convention that reflects their processing stage and coordinate space. This ensures consistency across instruments and techniques, making workflows more transferable and easier to understand.
152
+
153
+
**Type structure**
154
+
155
+
Domain types use a **prefix-suffix** pattern:
156
+
-**Prefix**: Describes the processing stage (e.g., `Raw`, `Tof`, `Corrected`, `Normalized`)
157
+
-**Suffix**: Describes the coordinate space or component (e.g., `Monitor`, `Detector`, `Q`, `Dspacing`, `Energy`)
158
+
159
+
**Monitor types**
160
+
161
+
Monitors follow a linear progression through processing stages:
162
+
163
+
```
164
+
EmptyMonitor # Geometry only, calibrated
165
+
RawMonitor # With counts
166
+
TofMonitor # Time-of-flight domain
167
+
WavelengthMonitor # Wavelength domain (end of monitor chain)
168
+
```
169
+
170
+
**Detector types**
171
+
172
+
Detectors progress through both processing stages and move from "detector space" (pixel space) to, e.g., Q-space:
1.**Maintain the standard progression**: Keep processing stages separate unless there's a scientific reason to combine them (e.g., computational efficiency for a specific technique).
203
+
204
+
2.**Prefix carries forward**: When transforming coordinate spaces without additional processing, the prefix carries forward (e.g., `CorrectedDetector` → `CorrectedQ`).
205
+
206
+
3.**Skip only when appropriate**: Stages can be skipped if they don't exist for a particular technique, but avoid skipping for convenience alone.
207
+
208
+
4.**Be explicit about the space**: Always include the coordinate space or component in the suffix to make the data's nature clear.
209
+
210
+
5.**Consistency across instruments**: Use the same type names for equivalent processing stages across different instruments and techniques to facilitate knowledge transfer.
211
+
149
212
## D: Documentation
150
213
151
214
### D.1: Document math and references in docstrings
0 commit comments