Debian Codegraph @

hugo/content/ref/instr/det/spherical.md

raw
1 +++
2 title = "SphericalDetector"
3 weight = 10
4 +++
5
6 ## SphericalDetector
7
8 For SAS and GISAS simulations,
9 the two-dimensional area detector is modelled by
10 the {{% ref-class "Device/Detector" "SphericalDetector" %}} class.
11
12 ### Geometry
13
14 A `SphericalDetector` is a 2D detector defined in angular coordinates.
15 All pixels have equal size.
16
17 {{< figscg src="/img/draw/detector1.svg" width="100%" >}}
18
19 In BornAgain, detector images are shown as seen from the back of the detector.
20 In this way we ensure that the $\varphi$ or $q_y$ axis has the same
21 orientation as the real-space $y$ axis.
22
23 For plotting and data import and export,
24 BornAgain pretends that the detector bins correspond to
25 bins of constant width in $\varphi$ or $q_y$ and $\alpha$ or $q_z$,
26 even though this is only true in first approximation.
27
28 For the actual scattering computation, BornAgain uses true scattering angles,
29 computed as nonlinear functions of the pixel coordinates.
30
31 Further distortions arise
32 if the detector is not perpendicular to the `x` axis.
33 This is not unlikely in GISAS
34 where it makes sense to position the detector perpendicular
35 to the reflected or transmitted beam.
36 Corrections for these and other distortions will be implemented
37 when requested by users.
38
39 ### Constructor
40
41 The constructor has the signature
42 ```
43 detector = ba.SphericalDetector(n_phi, phi_min, phi_max, n_alpha, alpha_min, alpha_max)
44 ```
45
46 The arguments `phi_min, phi_max, alpha_min, alpha_max` define the range of the detector in
47 direction $\varphi_\text{f},\alpha_\text{f}$.
48
49 The arguments `n_phi, n_alpha` are the number of bins per direction;
50 their product is the number of pixels of the detector.
51
52 ### Masks
53
54 When fitting theoretical models to measured diffraction images,
55 it can be helpful to mask part of the detector area.
56 See
57
58 * [Fit with masks](/ref/fit/ex/fit-with-masks)
59
60 ### Resolution
61
62 For modeling the detector resolution, see [Detector resolution](/ref/instr/det/resolution).
63
64 ### History
65
66 Until BornAgain 21, we had a `RectangularDetector` and a `SphericalDetector`.
67 In BornAgain 22, they were merged into `SphericalDetector` class.