<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://viper.lbl.gov:8080/cctbx.xfel/index.php?action=history&amp;feed=atom&amp;title=Cctbx.xfel_GUI%2FUnit_Cell_tab</id>
	<title>Cctbx.xfel GUI/Unit Cell tab - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://viper.lbl.gov:8080/cctbx.xfel/index.php?action=history&amp;feed=atom&amp;title=Cctbx.xfel_GUI%2FUnit_Cell_tab"/>
	<link rel="alternate" type="text/html" href="http://viper.lbl.gov:8080/cctbx.xfel/index.php?title=Cctbx.xfel_GUI/Unit_Cell_tab&amp;action=history"/>
	<updated>2026-10-10T21:40:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.15</generator>
	<entry>
		<id>http://viper.lbl.gov:8080/cctbx.xfel/index.php?title=Cctbx.xfel_GUI/Unit_Cell_tab&amp;diff=1798&amp;oldid=prev</id>
		<title>Aaron: Created page with &quot;{{DISPLAYTITLE:cctbx.xfel GUI/Unit Cell tab}} The &#039;&#039;&#039;Unit Cell tab&#039;&#039;&#039; plots histograms of the unit cell parameters of every indexed lattice in a trial, so that you can check that indexing is finding the expected cell, compare samples or conditions, spot polymorphs, and define unit cell clusters for the scaling stage of a dataset to filter on. The plot is redrawn every 15 seconds by the &#039;&#039;Unit Cell Sentinel&#039;&#039; while &#039;&#039;Auto update&#039;&#039; is ticked.  Back to cctbx.xfel GUI....&quot;</title>
		<link rel="alternate" type="text/html" href="http://viper.lbl.gov:8080/cctbx.xfel/index.php?title=Cctbx.xfel_GUI/Unit_Cell_tab&amp;diff=1798&amp;oldid=prev"/>
		<updated>2026-10-09T22:19:35Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{DISPLAYTITLE:cctbx.xfel GUI/Unit Cell tab}} The &amp;#039;&amp;#039;&amp;#039;Unit Cell tab&amp;#039;&amp;#039;&amp;#039; plots histograms of the unit cell parameters of every indexed lattice in a trial, so that you can check that indexing is finding the expected cell, compare samples or conditions, spot polymorphs, and define unit cell clusters for the scaling stage of a dataset to filter on. The plot is redrawn every 15 seconds by the &amp;#039;&amp;#039;Unit Cell Sentinel&amp;#039;&amp;#039; while &amp;#039;&amp;#039;Auto update&amp;#039;&amp;#039; is ticked.  Back to &lt;a href=&quot;/cctbx.xfel/index.php/Cctbx.xfel_GUI&quot; title=&quot;Cctbx.xfel GUI&quot;&gt;cctbx.xfel GUI&lt;/a&gt;....&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{DISPLAYTITLE:cctbx.xfel GUI/Unit Cell tab}}&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Unit Cell tab&amp;#039;&amp;#039;&amp;#039; plots histograms of the unit cell parameters of every indexed lattice in a trial, so that you can check that indexing is finding the expected cell, compare samples or conditions, spot polymorphs, and define unit cell clusters for the scaling stage of a dataset to filter on. The plot is redrawn every 15 seconds by the &amp;#039;&amp;#039;Unit Cell Sentinel&amp;#039;&amp;#039; while &amp;#039;&amp;#039;Auto update&amp;#039;&amp;#039; is ticked.&lt;br /&gt;
&lt;br /&gt;
Back to [[cctbx.xfel GUI]].&lt;br /&gt;
&lt;br /&gt;
== Selecting lattices by tag ==&lt;br /&gt;
The tab compares &amp;#039;&amp;#039;&amp;#039;tag sets&amp;#039;&amp;#039;&amp;#039;. Each tag set is a selection of runs from one trial, and each gets its own colour in the histograms.&lt;br /&gt;
&lt;br /&gt;
# Choose the &amp;#039;&amp;#039;&amp;#039;Trial&amp;#039;&amp;#039;&amp;#039;. The &amp;#039;&amp;#039;Available tags&amp;#039;&amp;#039; list fills with the tags carried by that trial&amp;#039;s runs.&lt;br /&gt;
# Tick one or more tags and choose &amp;#039;&amp;#039;&amp;#039;union&amp;#039;&amp;#039;&amp;#039; (runs carrying any of the tags) or &amp;#039;&amp;#039;&amp;#039;intersection&amp;#039;&amp;#039;&amp;#039; (runs carrying all of them). Ticking no tags selects every run in the trial (the set then shows as a blank entry in the list).&lt;br /&gt;
# Press &amp;#039;&amp;#039;&amp;#039;Add selection&amp;#039;&amp;#039;&amp;#039;. The set appears in &amp;#039;&amp;#039;Tag sets to display&amp;#039;&amp;#039;, named after its tags with &amp;#039;&amp;#039;(u)&amp;#039;&amp;#039; or &amp;#039;&amp;#039;(i)&amp;#039;&amp;#039; for the mode when there is more than one tag.&lt;br /&gt;
# Repeat for further sets, for example one per sample. To drop a set, tick it and press &amp;#039;&amp;#039;&amp;#039;Remove selection&amp;#039;&amp;#039;&amp;#039;; &amp;#039;&amp;#039;&amp;#039;Reset selections&amp;#039;&amp;#039;&amp;#039; clears them all.&lt;br /&gt;
&lt;br /&gt;
== Histogram mode ==&lt;br /&gt;
With &amp;#039;&amp;#039;Plot clusters&amp;#039;&amp;#039; unticked, the plot shows a histogram for each of a, b, c, α, β and γ for each tag set, with the legend giving the number of lattices and the mean and standard deviation of each parameter.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Reject outliers&amp;#039;&amp;#039;&amp;#039;: drop lattices whose parameters fall outside 1.5 times the inter-quartile range before plotting, so that a few mis-indexed images do not stretch the axes.&lt;br /&gt;
* The matplotlib toolbar zooms and saves the figure, and &amp;#039;&amp;#039;Large text&amp;#039;&amp;#039; on the toolbar enlarges the labels.&lt;br /&gt;
&lt;br /&gt;
== Cluster mode ==&lt;br /&gt;
With &amp;#039;&amp;#039;Plot clusters&amp;#039;&amp;#039; ticked (available only when the &amp;lt;code&amp;gt;uc_metrics&amp;lt;/code&amp;gt; package is installed), the lattices of the &amp;#039;&amp;#039;&amp;#039;first&amp;#039;&amp;#039;&amp;#039; tag set are clustered with DBSCAN in the space of the independent cell parameters for the trial&amp;#039;s space group (a, b, c for orthorhombic and lower; a, c for tetragonal, hexagonal and rhombohedral on hexagonal axes; a, α on rhombohedral axes; cubic cells cannot be clustered). The trial&amp;#039;s space group comes from its indexing parameters, so set one in the trial for the clustering to use the right parameters.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cluster epsilon&amp;#039;&amp;#039;&amp;#039; (default 0.8): the DBSCAN neighbourhood distance. Smaller values give tighter, more numerous clusters; press Enter to apply.&lt;br /&gt;
* &amp;#039;&amp;#039;Reject outliers&amp;#039;&amp;#039; controls whether the unclustered points are drawn.&lt;br /&gt;
&lt;br /&gt;
Each clustering writes a covariance file, &amp;lt;code&amp;gt;cluster/cluster_&amp;lt;tag set name&amp;gt;.pickle&amp;lt;/code&amp;gt; in the output folder, describing the Gaussian mixture components found (component 0 is the largest). The &amp;#039;&amp;#039;&amp;#039;scaling stage&amp;#039;&amp;#039;&amp;#039; of a dataset can filter lattices with this file (&amp;#039;&amp;#039;Filter by unit-cell cluster&amp;#039;&amp;#039; in the [[cctbx.xfel GUI/Datasets tab#Scaling|Datasets tab]]), accepting only lattices within a chosen Mahalanobis distance of a chosen component. This is the way to merge only one polymorph when a sample indexes as a mixture.&lt;br /&gt;
&lt;br /&gt;
== Tips ==&lt;br /&gt;
* A multi-modal histogram for a single sample usually means a mixture of crystal forms, or an indexing ambiguity producing permuted axes. Try cluster mode, or tighten the unit cell in the trial.&lt;br /&gt;
* Compare samples by adding one tag set per sample tag: differences in mean cell between conditions show up directly.&lt;br /&gt;
* Because the sentinel re-queries the database on every cycle, large trials can take a while to redraw; untick &amp;#039;&amp;#039;Auto update&amp;#039;&amp;#039; once the plot is as you want it.&lt;/div&gt;</summary>
		<author><name>Aaron</name></author>
	</entry>
</feed>