-
Notifications
You must be signed in to change notification settings - Fork 0
/
xia2-ssx-geometry-refinement.html
319 lines (280 loc) · 33.3 KB
/
xia2-ssx-geometry-refinement.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
<!DOCTYPE html>
<html lang="en" data-content_root="./">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Overcoming problems with the detector geometry for SSX data — xia2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=12dfc556" />
<link rel="stylesheet" href="_static/xia2.css" type="text/css" />
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Merging SSX data in groups with xia2" href="xia2-ssx-dose-series.html" />
<link rel="prev" title="Processing serial synchrotron crystallography (SSX) datasets with xia2" href="serial_crystallography.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
</head><body>
<!-- <div class="logoheader container"> -->
<!-- <a href="index.html"> -->
<!-- <img class="logoheader" alt="DIALS" src="_static/dials_header.png" /> -->
<!-- </a> -->
<!-- </div> -->
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="overcoming-problems-with-the-detector-geometry-for-ssx-data">
<h1>Overcoming problems with the detector geometry for SSX data<a class="headerlink" href="#overcoming-problems-with-the-detector-geometry-for-ssx-data" title="Link to this heading">¶</a></h1>
<p>There are three different ways to run <code class="samp docutils literal notranslate"><span class="pre">xia2.ssx</span></code> with regards to detector geometry refinement.</p>
<ul class="simple">
<li><p>If a reference geometry (a DIALS <code class="samp docutils literal notranslate"><span class="pre">.expt</span></code> file) is provided as input to <code class="samp docutils literal notranslate"><span class="pre">xia2.ssx</span></code> with the option <code class="samp docutils literal notranslate"><span class="pre">reference_geometry=</span></code>, then no geometry refinement is performed and this reference geometry is used instead of the geometry from the image files.</p></li>
<li><p>If a starting geometry (a DIALS <code class="samp docutils literal notranslate"><span class="pre">.expt</span></code> file) is provided as input to <code class="samp docutils literal notranslate"><span class="pre">xia2.ssx</span></code> with the option <code class="samp docutils literal notranslate"><span class="pre">starting_geometry=</span></code>, then this geometry is used instead of the geometry from the image files and a round of geometry refinement is run.</p></li>
<li><p>If neither a reference geometry or starting geometry are given, the geometry is read from the image files and a round of geometry refinement is run.</p></li>
</ul>
<p>The automated geometry refinement in <code class="samp docutils literal notranslate"><span class="pre">xia2.ssx</span></code> is designed to improve an existing
detector geometry that is reasonably accurate. Spotfinding and indexing are performed in
batches until at least 250 crystals are successfully indexed (this can be changed with the option
<code class="samp docutils literal notranslate"><span class="pre">geometry_refinement.n_crystals=</span></code>). Alternatively, an image range can be specified using e.g.
<code class="samp docutils literal notranslate"><span class="pre">geometry_refinement.images_to_use=1001:2000</span></code>. As a reminder, to just run the geometry refinement part
of the <code class="samp docutils literal notranslate"><span class="pre">xia2.ssx</span></code> pipeline, use the option <code class="samp docutils literal notranslate"><span class="pre">steps=None</span></code>, i.e. no processing steps.</p>
<p>In cases where the initial geometry is not reasonably well known, or the hit/indexing rate is low,
refining an accurate initial geometry is not straightforward, and can require experimenting
with program input and performing several cycles of geometry refinement i.e. using the <code class="samp docutils literal notranslate"><span class="pre">starting_geometry</span></code> option with
<code class="samp docutils literal notranslate"><span class="pre">steps=None</span></code>, and using the resultant refined geometry as the <code class="samp docutils literal notranslate"><span class="pre">starting_geometry</span></code> for another run of <code class="samp docutils literal notranslate"><span class="pre">xia2.ssx</span></code>
and repeating until convergence.</p>
<p>Symptoms of a bad initial geometry include</p>
<ul class="simple">
<li><p>very low indexing success (i.e. low % of hits indexed)</p></li>
<li><p>indexing success followed by low integration success rate</p></li>
<li><p>failure at the geometry refinement step due to ‘Error: No reflections available for refinement’</p></li>
</ul>
<p>The sections below provide some guidance on how to discover the correct experimental geometry using <code class="samp docutils literal notranslate"><span class="pre">xia2.ssx</span></code>/DIALS.
Publications describing diffraction geometry refinement in DIALS are linked below:</p>
<ul class="simple">
<li><p><a class="reference external" href="https://onlinelibrary.wiley.com/iucr/doi/10.1107/S2059798316002187">Diffraction-geometry refinement in the DIALS framework</a></p></li>
<li><p><a class="reference external" href="https://scripts.iucr.org/cgi-bin/paper?lp5037">Improving signal strength in serial crystallography with DIALS geometry refinement</a></p></li>
</ul>
<section id="setting-the-detector-distance-beam-centre">
<h2>Setting the detector distance/beam centre<a class="headerlink" href="#setting-the-detector-distance-beam-centre" title="Link to this heading">¶</a></h2>
<p>A common issue is that the detector distance or beam centre is incorrectly set or incorrectly interpreted from the
header of data files, or not known with sufficient accuracy.
To set the detector distance, a custom phil file can be specified for the import step in <code class="samp docutils literal notranslate"><span class="pre">xia2.ssx</span></code>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">xia2</span><span class="o">.</span><span class="n">ssx</span> <span class="n">dials_import</span><span class="o">.</span><span class="n">phil</span><span class="o">=</span><span class="n">example1</span><span class="o">.</span><span class="n">phil</span> <span class="n">image</span><span class="o">=</span><span class="n">example</span><span class="o">.</span><span class="n">h5</span> <span class="n">space_group</span><span class="o">=</span><span class="n">P1</span> <span class="n">unit_cell</span><span class="o">=</span><span class="mf">79.1</span><span class="p">,</span><span class="mf">79.1</span><span class="p">,</span><span class="mf">38.2</span><span class="p">,</span><span class="mi">90</span><span class="p">,</span><span class="mi">90</span><span class="p">,</span><span class="mi">90</span>
</pre></div>
</div>
<p>Where <code class="samp docutils literal notranslate"><span class="pre">example1.phil</span></code> is a phil file containing phil options for <code class="samp docutils literal notranslate"><span class="pre">dials.import</span></code> e.g.:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">geometry</span><span class="o">.</span><span class="n">detector</span><span class="o">.</span><span class="n">distance</span><span class="o">=</span><span class="mi">115</span>
<span class="n">geometry</span><span class="o">.</span><span class="n">detector</span><span class="o">.</span><span class="n">fast_slow_beam_centre</span><span class="o">=</span><span class="mi">1200</span><span class="p">,</span><span class="mi">1245</span>
</pre></div>
</div>
<p>or:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">geometry</span><span class="o">.</span><span class="n">detector</span><span class="o">.</span><span class="n">panel</span><span class="o">.</span><span class="n">origin</span><span class="o">=-</span><span class="mi">80</span><span class="p">,</span><span class="mi">90</span><span class="p">,</span><span class="o">-</span><span class="mi">115</span>
</pre></div>
</div>
<p>(phil files are plain text files with the extension .phil, so can be created with a text editor or command line tools).
The <code class="samp docutils literal notranslate"><span class="pre">fast_slow_beam_centre</span></code> is the coordinate of the beam centre on the image (in pixels), and is what
is displayed as the beam centre in the <code class="samp docutils literal notranslate"><span class="pre">dials.image_viewer</span></code>. The distance is the translation along the z-axis
(the beam axis) from sample to detector <em>in millimeters</em> (typically to the centre of the detector).</p>
<p>Alternatively, the detector origin can be specified. The detector origin is the xyz coordinate (in millimeters) that
describes the location of the corner of the detector in the lab frame (the lab frame has its origin at the sample position).
Note that the z-coorindate is a negative value, which may also be the case for the x or y coordinate.
It is important to note that the z-coorindate of the origin is only the same as the detector distance if the detector face is
fully perpendicular to the z-axis, which will typically not be the case after geometry refinement, which refines the direction of the
<code class="samp docutils literal notranslate"><span class="pre">fast_axis</span></code> and <code class="samp docutils literal notranslate"><span class="pre">slow_axis</span></code> of the detector.</p>
<p>The detector origin, distance, fast and slow axis can be displayed by running <code class="samp docutils literal notranslate"><span class="pre">dials.show</span> <span class="pre">import/imported.expt</span></code>.
Note that to specify multiple panel options such as origin and fast and slow axes, one must use the following form of phil
specification to enable them to be all assigned to the same panel:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">geometry</span><span class="o">.</span><span class="n">detector</span><span class="o">.</span><span class="n">panel</span><span class="p">{</span>
<span class="n">origin</span><span class="o">=-</span><span class="mi">80</span><span class="p">,</span><span class="mi">90</span><span class="p">,</span><span class="o">-</span><span class="mi">115</span>
<span class="n">fast_axis</span><span class="o">=</span><span class="mf">0.9999</span><span class="p">,</span><span class="mf">0.0001</span><span class="p">,</span><span class="mi">0</span>
<span class="n">slow_axis</span><span class="o">=-</span><span class="mf">0.0001</span><span class="p">,</span><span class="mf">0.9999</span><span class="p">,</span><span class="mi">0</span>
<span class="p">}</span>
</pre></div>
</div>
<p>This can become cumbersome and error-prone for many-panel detectors. In these cases, it may be preferable to set only
the distance and beam centre, and do multiple cycles of geometry refinement using the <code class="samp docutils literal notranslate"><span class="pre">starting_geometry</span></code> option
as described above. Remember, it is also possible to manually edit <code class="samp docutils literal notranslate"><span class="pre">.expt</span></code> files in a text editor, as they are simply
json format files.</p>
</section>
<section id="relaxing-restraints-in-refinement">
<h2>Relaxing restraints in refinement<a class="headerlink" href="#relaxing-restraints-in-refinement" title="Link to this heading">¶</a></h2>
<p>Sometimes the geometry can be close enough to allow some indexing success, however the spot predictions are too far from
the observed spots such that the default filtering in <code class="samp docutils literal notranslate"><span class="pre">dials.refine</span></code> does not leave sufficient reflections for
geometry refinement, resulting in the <code class="samp docutils literal notranslate"><span class="pre">xia2.ssx</span></code> error message <code class="samp docutils literal notranslate"><span class="pre">Error:</span> <span class="pre">No</span> <span class="pre">reflections</span> <span class="pre">available</span> <span class="pre">for</span> <span class="pre">refinement</span></code>.
The indexing RMSDs can be seen towards the end of the <code class="samp docutils literal notranslate"><span class="pre">geometry_refinement/dials.ssx_index.log</span></code>, while the
<code class="samp docutils literal notranslate"><span class="pre">geometry_refinement/dials.refine.log</span></code> shows the outlier rejection is removing most or all reflections:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Detecting</span> <span class="n">centroid</span> <span class="n">outliers</span> <span class="n">using</span> <span class="n">the</span> <span class="n">SauterPoon</span> <span class="n">algorithm</span>
<span class="mi">150</span> <span class="n">reflections</span> <span class="n">have</span> <span class="n">been</span> <span class="n">flagged</span> <span class="k">as</span> <span class="n">outliers</span>
<span class="mi">0</span> <span class="n">reflections</span> <span class="n">remain</span> <span class="ow">in</span> <span class="n">the</span> <span class="n">manager</span>
</pre></div>
</div>
<p>Therefore it may be necessary to temporarily relax the outlier condition, to help with discovering the correct geometry, as shown
below. Once the underlying issue has been addressed and a good geometry has been obtained, it should be possible to
repeat a cycle of geometry refinement with the default outlier condition.</p>
<p>To see the program parameters used, we can inpsect the top of the <code class="samp docutils literal notranslate"><span class="pre">dials.refine.log</span></code>,
which shows which parameters are modified from the defaults in <code class="samp docutils literal notranslate"><span class="pre">dials.refine</span></code></p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ head -25 dials.refine.log
The following parameters have been modified:
input.experiments = indexed.expt
input.reflections = indexed.refl
refinement {
parameterisation {
auto_reduction {
action = fail *fix remove
}
beam {
fix = *all in_spindle_plane out_spindle_plane wavelength
}
detector {
fix_list = "Tau1"
}
}
refinery {
engine = SimpleLBFGS LBFGScurvs GaussNewton LevMar *SparseLevMar
}
reflections {
outlier {
algorithm = null auto mcd tukey *sauter_poon
}
}
}
</pre></div>
</div>
<p>To change the outlier rejection, we can repeat the refinement with <code class="samp docutils literal notranslate"><span class="pre">dials.refine</span></code> and manually
change the outlier algorithm to null, keeping the other options the same:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ dials.refine indexed.expt indexed.refl \
refinement.parameterisation.auto_reduction.action=fix \
refinement.parameterisation.beam.fix=all \
refinement.parameterisation.detector.fix_list=Tau1 \
refinement.refinery.engine=SparseLevMar \
refinement.reflections.outlier.algorithm=null
</pre></div>
</div>
<p>The alternative way would be to rerun the whole <code class="samp docutils literal notranslate"><span class="pre">xia2.ssx</span></code> pipeline, giving a geometry refinement phil file:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">xia2</span><span class="o">.</span><span class="n">ssx</span> <span class="n">geometry_refinement</span><span class="o">.</span><span class="n">phil</span><span class="o">=</span><span class="n">example2</span><span class="o">.</span><span class="n">phil</span> <span class="p">[</span><span class="o">..</span><span class="n">same</span> <span class="n">options</span> <span class="k">as</span> <span class="n">previously</span><span class="o">..</span><span class="p">]</span>
</pre></div>
</div>
<p>where <code class="samp docutils literal notranslate"><span class="pre">example2.phil</span></code> contains:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">refinement</span><span class="o">.</span><span class="n">reflections</span><span class="o">.</span><span class="n">outlier</span><span class="o">.</span><span class="n">algorithm</span><span class="o">=</span><span class="n">null</span>
</pre></div>
</div>
<p>(note that <code class="samp docutils literal notranslate"><span class="pre">xia2.ssx</span></code> will add the rest of the non-default phil options for <code class="samp docutils literal notranslate"><span class="pre">dials.refine</span></code>).</p>
<p>In the dataset that motivated this example, the underlying issue was the fact that the detector had suffered
a slight rotation about the beam axis, compared to the metadata in the header of the image file.
By default, detector rotation about its plane normal is fixed in stills refinement with the option
<code class="samp docutils literal notranslate"><span class="pre">refinement.parameterisation.detector.fix_list=Tau1</span></code> (Tau1 is the parameter describing the rotation
of the detector about its plane normal). To allow this parameter to refine,
the solution was run <code class="samp docutils literal notranslate"><span class="pre">xia2.ssx</span></code> with a geometry refinement phil containing:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">refinement</span><span class="o">.</span><span class="n">parameterisation</span><span class="o">.</span><span class="n">detector</span><span class="o">.</span><span class="n">fix_list</span><span class="o">=</span><span class="kc">None</span>
<span class="n">refinement</span><span class="o">.</span><span class="n">reflections</span><span class="o">.</span><span class="n">outlier</span><span class="o">.</span><span class="n">algorithm</span><span class="o">=</span><span class="n">null</span>
</pre></div>
</div>
<p>This allowed enough reflections to be used by <code class="samp docutils literal notranslate"><span class="pre">dials.refine</span></code> to start to refine the geometry, allowing
rotations of the detector. After the first cycle of refinement, the refined origin, fast axis and slow axis
were used as input parameters for <code class="samp docutils literal notranslate"><span class="pre">dials.import</span></code> in a second run of <code class="samp docutils literal notranslate"><span class="pre">xia2.ssx</span></code>, as described in
the preceeding section. In this run, the RMSDs in indexing we significantly lower and more crystals were
successfully indexed, allowing further refinement and improvement of the detector geometry.</p>
</section>
<section id="refining-multi-panel-detectors">
<h2>Refining multi-panel detectors<a class="headerlink" href="#refining-multi-panel-detectors" title="Link to this heading">¶</a></h2>
<p>When refining the detector position in DIALS, the orientation and position of all physical panels that
constitute the detector are refined as a single entity, by default. This approach is suitable for well
calibrated modern detectors (e.g. Dectris photon-counting detectors), and within DIALS the detector
is modelled as a single panel with dead regions between the physical panels. However, other detectors,
such as multi-panel CCD detectors, or the CSPAD detector, are parameterised as a heirarchy of groupings
of physical panels. This then allows the possibility of refining relative shifts and rotations of the
physical panel groups with respect to each other. For multi-panel detectors, the RMSDs per panel are reported
to the <code class="samp docutils literal notranslate"><span class="pre">xia2.ssx.log</span></code>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">---------------------</span> <span class="n">Joint</span> <span class="n">refinement</span> <span class="o">---------------------</span>
<span class="n">Refinement</span> <span class="n">steps</span><span class="p">:</span>
<span class="o">+--------+--------+----------+----------+-----------------+</span>
<span class="o">|</span> <span class="n">Step</span> <span class="o">|</span> <span class="n">Nref</span> <span class="o">|</span> <span class="n">RMSD_X</span> <span class="o">|</span> <span class="n">RMSD_Y</span> <span class="o">|</span> <span class="n">RMSD_DeltaPsi</span> <span class="o">|</span>
<span class="o">|</span> <span class="o">|</span> <span class="o">|</span> <span class="p">(</span><span class="n">mm</span><span class="p">)</span> <span class="o">|</span> <span class="p">(</span><span class="n">mm</span><span class="p">)</span> <span class="o">|</span> <span class="p">(</span><span class="n">deg</span><span class="p">)</span> <span class="o">|</span>
<span class="o">|--------+--------+----------+----------+-----------------|</span>
<span class="o">|</span> <span class="mi">0</span> <span class="o">|</span> <span class="mi">24372</span> <span class="o">|</span> <span class="mf">0.10005</span> <span class="o">|</span> <span class="mf">0.12819</span> <span class="o">|</span> <span class="mf">0.21934</span> <span class="o">|</span>
<span class="o">|</span> <span class="mi">1</span> <span class="o">|</span> <span class="mi">24372</span> <span class="o">|</span> <span class="mf">0.070669</span> <span class="o">|</span> <span class="mf">0.080024</span> <span class="o">|</span> <span class="mf">0.21677</span> <span class="o">|</span>
<span class="o">|</span> <span class="mi">2</span> <span class="o">|</span> <span class="mi">24372</span> <span class="o">|</span> <span class="mf">0.063907</span> <span class="o">|</span> <span class="mf">0.070151</span> <span class="o">|</span> <span class="mf">0.21954</span> <span class="o">|</span>
<span class="o">|</span> <span class="mi">3</span> <span class="o">|</span> <span class="mi">24372</span> <span class="o">|</span> <span class="mf">0.056994</span> <span class="o">|</span> <span class="mf">0.062588</span> <span class="o">|</span> <span class="mf">0.21902</span> <span class="o">|</span>
<span class="o">|</span> <span class="mi">4</span> <span class="o">|</span> <span class="mi">24372</span> <span class="o">|</span> <span class="mf">0.051901</span> <span class="o">|</span> <span class="mf">0.057296</span> <span class="o">|</span> <span class="mf">0.20879</span> <span class="o">|</span>
<span class="o">|</span> <span class="mi">5</span> <span class="o">|</span> <span class="mi">24372</span> <span class="o">|</span> <span class="mf">0.04756</span> <span class="o">|</span> <span class="mf">0.05244</span> <span class="o">|</span> <span class="mf">0.18595</span> <span class="o">|</span>
<span class="o">|</span> <span class="mi">6</span> <span class="o">|</span> <span class="mi">24372</span> <span class="o">|</span> <span class="mf">0.043361</span> <span class="o">|</span> <span class="mf">0.048249</span> <span class="o">|</span> <span class="mf">0.15792</span> <span class="o">|</span>
<span class="o">|</span> <span class="mi">7</span> <span class="o">|</span> <span class="mi">24372</span> <span class="o">|</span> <span class="mf">0.039968</span> <span class="o">|</span> <span class="mf">0.045247</span> <span class="o">|</span> <span class="mf">0.13055</span> <span class="o">|</span>
<span class="o">|</span> <span class="mi">8</span> <span class="o">|</span> <span class="mi">24372</span> <span class="o">|</span> <span class="mf">0.03769</span> <span class="o">|</span> <span class="mf">0.043169</span> <span class="o">|</span> <span class="mf">0.11034</span> <span class="o">|</span>
<span class="o">|</span> <span class="mi">9</span> <span class="o">|</span> <span class="mi">24372</span> <span class="o">|</span> <span class="mf">0.036764</span> <span class="o">|</span> <span class="mf">0.042274</span> <span class="o">|</span> <span class="mf">0.10335</span> <span class="o">|</span>
<span class="o">|</span> <span class="mi">10</span> <span class="o">|</span> <span class="mi">24372</span> <span class="o">|</span> <span class="mf">0.036579</span> <span class="o">|</span> <span class="mf">0.042079</span> <span class="o">|</span> <span class="mf">0.1025</span> <span class="o">|</span>
<span class="o">|</span> <span class="mi">11</span> <span class="o">|</span> <span class="mi">24372</span> <span class="o">|</span> <span class="mf">0.036547</span> <span class="o">|</span> <span class="mf">0.042045</span> <span class="o">|</span> <span class="mf">0.10247</span> <span class="o">|</span>
<span class="o">|</span> <span class="mi">12</span> <span class="o">|</span> <span class="mi">24372</span> <span class="o">|</span> <span class="mf">0.03654</span> <span class="o">|</span> <span class="mf">0.04204</span> <span class="o">|</span> <span class="mf">0.10247</span> <span class="o">|</span>
<span class="o">|</span> <span class="mi">13</span> <span class="o">|</span> <span class="mi">24372</span> <span class="o">|</span> <span class="mf">0.036539</span> <span class="o">|</span> <span class="mf">0.04204</span> <span class="o">|</span> <span class="mf">0.10247</span> <span class="o">|</span>
<span class="o">+--------+--------+----------+----------+-----------------+</span>
<span class="n">RMSD</span> <span class="n">no</span> <span class="n">longer</span> <span class="n">decreasing</span>
<span class="n">Detector</span> <span class="mi">1</span> <span class="n">RMSDs</span> <span class="n">by</span> <span class="n">panel</span><span class="p">:</span>
<span class="o">+---------+--------+----------+----------+-----------------+</span>
<span class="o">|</span> <span class="n">Panel</span> <span class="o">|</span> <span class="n">Nref</span> <span class="o">|</span> <span class="n">RMSD_X</span> <span class="o">|</span> <span class="n">RMSD_Y</span> <span class="o">|</span> <span class="n">RMSD_DeltaPsi</span> <span class="o">|</span>
<span class="o">|</span> <span class="nb">id</span> <span class="o">|</span> <span class="o">|</span> <span class="p">(</span><span class="n">px</span><span class="p">)</span> <span class="o">|</span> <span class="p">(</span><span class="n">px</span><span class="p">)</span> <span class="o">|</span> <span class="p">(</span><span class="n">deg</span><span class="p">)</span> <span class="o">|</span>
<span class="o">|---------+--------+----------+----------+-----------------|</span>
<span class="o">|</span> <span class="mi">0</span> <span class="o">|</span> <span class="mi">345</span> <span class="o">|</span> <span class="mf">0.95269</span> <span class="o">|</span> <span class="mf">1.0951</span> <span class="o">|</span> <span class="mf">0.063433</span> <span class="o">|</span>
<span class="o">|</span> <span class="mi">1</span> <span class="o">|</span> <span class="mi">5969</span> <span class="o">|</span> <span class="mf">0.6194</span> <span class="o">|</span> <span class="mf">0.79187</span> <span class="o">|</span> <span class="mf">0.088303</span> <span class="o">|</span>
<span class="o">|</span> <span class="mi">2</span> <span class="o">|</span> <span class="mi">5595</span> <span class="o">|</span> <span class="mf">0.82114</span> <span class="o">|</span> <span class="mf">0.78986</span> <span class="o">|</span> <span class="mf">0.10815</span> <span class="o">|</span>
<span class="o">|</span> <span class="mi">3</span> <span class="o">|</span> <span class="mi">70</span> <span class="o">|</span> <span class="mf">2.0579</span> <span class="o">|</span> <span class="mf">1.0123</span> <span class="o">|</span> <span class="mf">0.15923</span> <span class="o">|</span>
<span class="o">|</span> <span class="mi">4</span> <span class="o">|</span> <span class="mi">317</span> <span class="o">|</span> <span class="mf">1.3802</span> <span class="o">|</span> <span class="mf">1.5027</span> <span class="o">|</span> <span class="mf">0.091092</span> <span class="o">|</span>
<span class="o">|</span> <span class="mi">5</span> <span class="o">|</span> <span class="mi">5680</span> <span class="o">|</span> <span class="mf">0.74765</span> <span class="o">|</span> <span class="mf">0.95258</span> <span class="o">|</span> <span class="mf">0.11538</span> <span class="o">|</span>
<span class="o">|</span> <span class="mi">6</span> <span class="o">|</span> <span class="mi">6331</span> <span class="o">|</span> <span class="mf">0.57757</span> <span class="o">|</span> <span class="mf">0.68147</span> <span class="o">|</span> <span class="mf">0.095794</span> <span class="o">|</span>
<span class="o">|</span> <span class="mi">7</span> <span class="o">|</span> <span class="mi">65</span> <span class="o">|</span> <span class="mf">2.6382</span> <span class="o">|</span> <span class="mf">3.2829</span> <span class="o">|</span> <span class="mf">0.26076</span> <span class="o">|</span>
<span class="o">+---------+--------+----------+----------+-----------------+</span>
</pre></div>
</div>
<p>Therefore for multi-panel data, if the spot residuals differ significantly from panel to panel, as viewed
in the <code class="samp docutils literal notranslate"><span class="pre">dials.image_viewer</span></code> or as reported in the <code class="samp docutils literal notranslate"><span class="pre">dials.refine.log</span> <span class="pre">/</span> <span class="pre">xia2.ssx.log</span></code>, it may be
necessary to allow multi-panel refinement to arrive at a more accurate model of the detector.
To enable relative refinement of the panels, the following <code class="samp docutils literal notranslate"><span class="pre">dials.refine</span></code> phil option must be changed:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">refinement</span><span class="o">.</span><span class="n">parameterisation</span><span class="o">.</span><span class="n">detector</span><span class="o">.</span><span class="n">hierarchy_level</span><span class="o">=</span><span class="mi">1</span>
</pre></div>
</div>
<p>The default <code class="samp docutils literal notranslate"><span class="pre">hierarchy_level</span></code> is 0, i.e. all panels are refined together, while a values of 1 allows
relative refinement at the first level of hierarchy. Values higher than one may be needed depending on the
detector parameterisation, e.g. CSPAD detectors have a hierarchy_level of 3.</p>
</section>
</section>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="Main">
<div class="sphinxsidebarwrapper">
<p class="logo">
<a href="index.html">
<img class="logo" src="_static/xia2-new-logo.gif" alt="Logo" />
</a>
</p>
<h3>Navigation</h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="quick_start.html">Getting started</a></li>
<li class="toctree-l1"><a class="reference internal" href="using_xia2.html">Using xia2</a></li>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="introductory_example.html">Introductory example</a></li>
<li class="toctree-l1"><a class="reference internal" href="insulin_tutorial.html">Insulin tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="multi_crystal.html">Multi-crystal data</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="serial_crystallography.html">Serial-crystallography</a></li>
<li class="toctree-l1"><a class="reference internal" href="program_output.html">Program output</a></li>
<li class="toctree-l1"><a class="reference internal" href="parameters.html">Parameters</a></li>
<li class="toctree-l1"><a class="reference internal" href="comments.html">Comments</a></li>
<li class="toctree-l1"><a class="reference internal" href="background.html">History</a></li>
<li class="toctree-l1"><a class="reference internal" href="acknowledgements.html">Acknowledgements</a></li>
<li class="toctree-l1"><a class="reference internal" href="release_notes.html">Release notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer container">
<a href="http://www.diamond.ac.uk/"><img class="logofooter" alt="Diamond" src="_static/diamond_logo.png" /></a>
<a href="http://dials.diamond.ac.uk/"><img class="logofooter" alt="DIALS" src="_static/dials_logo_fx_transparent_bg.png" /></a>
<a href="http://www.ccp4.ac.uk/"><img class="logofooter" alt="CCP4" src="_static/CCP4-logo-plain.png" /></a>
</div>
<div class="footer">
©2020, Diamond Light Source.
</div>
</body>
</html>