<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.uni-konstanz.de/xds/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Grunet</id>
	<title>XDSwiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.uni-konstanz.de/xds/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Grunet"/>
	<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/xds/index.php/Special:Contributions/Grunet"/>
	<updated>2026-04-18T06:00:06Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki.uni-konstanz.de/xds/index.php?title=Electron_diffraction&amp;diff=4745</id>
		<title>Electron diffraction</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/xds/index.php?title=Electron_diffraction&amp;diff=4745"/>
		<updated>2026-02-18T21:25:18Z</updated>

		<summary type="html">&lt;p&gt;Grunet: special aspects for XDS when processing ED data.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;XDS can process electron diffraction data as long as the general preliminaries for XDS are met. In brief, this means the crystal is illuminated with a (quasi-)parallel, non-moving beam while the crystal rotates with a constant velocity about a fixed rotation axis, and the detector is composed of planar segments. These are quite general conditions, making XDS very suitable for the processing of electron diffraction data. XDS can even correct for optical distortions of the electromagnetic lens system of the electron source, especially when they are in-plane with the detector and do not change during data collection &amp;lt;ref&amp;gt;http://doi.org/10.1107/S160057672200276X&amp;lt;/ref&amp;gt;. Compared with X-ray diffraction, the crystallographer should be far more flexible in the acceptance of quality indicators. &lt;br /&gt;
&lt;br /&gt;
=== Processing (REFINE= keywords) ===&lt;br /&gt;
The very short wavelength results in a very small maximum scattering angle 2θ&amp;lt;sub&amp;gt;max&amp;lt;/sub&amp;gt; of less than 5°. With such, sin(x)≈x, with the result of some strong correlations &amp;lt;ref&amp;gt;https://doi.org/10.1107/S2059798318007726&amp;lt;/ref&amp;gt;between parameters. It is usually not possible to refine BEAM and POSITION simultaneously. A recommended setting for XDS.INP:&lt;br /&gt;
 REFINE(IDXREF)=BEAM AXIS ORIENTATION CELL &lt;br /&gt;
&lt;br /&gt;
 REFINE(INTEGRATE)=BEAM AXIS ORIENTATION&lt;br /&gt;
&lt;br /&gt;
 REFINE(CORRECT)=BEAM AXIS ORIENTATION CELL  &lt;br /&gt;
When resolution is sufficiently high, at about d&amp;lt;sub&amp;gt;min&amp;lt;/sub&amp;gt; &amp;lt; 0.8Å, both CELL and POSITION can be refined (but not the BEAM):&lt;br /&gt;
 REFINE(CORRECT)=AXIS ORIENTATION CELL  POSITION&lt;br /&gt;
In other cases, the INCIDENT_BEAM_CORRECTION and UNIT_CELL_CONSTANTS can be copied from XDS_ASCII.HKL to XDS.INP, and only the POSITION is refined.&lt;br /&gt;
 REFINE(CORRECT)=AXIS ORIENTATION  POSITION&lt;br /&gt;
(AXIS and ORIENTATION are usually very robust to be refined).&lt;br /&gt;
&lt;br /&gt;
=== Scaling ===&lt;br /&gt;
Scaling works best with high multiplicity. With electron diffraction data, this is not always granted, because the rotation range is at best 150° and can be limited to much less. With low symmetry spacegroups, this can result in low multiplicity. On the other hand, electron diffraction data are typically collected from a multitude of crystals, and a subset of well-fitting ones are merged to increase data quality and multiplicity. In such cases, the parameter SNRC=50 &amp;lt;ref&amp;gt;https://doi.org/10.1107/S2059798320006348&amp;lt;/ref&amp;gt; should be added to XDS.INP to switch off scaling for individual data sets and only scale when merging data from multiple crystals. &lt;br /&gt;
&lt;br /&gt;
Other parameters for XSCALE are usually not needed. It turns out that the scaling model in XDS and XSCALE is well suited for ED data, too.&lt;/div&gt;</summary>
		<author><name>Grunet</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/xds/index.php?title=Bruker_data&amp;diff=4059</id>
		<title>Bruker data</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/xds/index.php?title=Bruker_data&amp;diff=4059"/>
		<updated>2020-01-29T08:53:34Z</updated>

		<summary type="html">&lt;p&gt;Grunet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== SFRM files ==&lt;br /&gt;
&lt;br /&gt;
Bruker instruments save frames in SFRM file format. &lt;br /&gt;
XDS correctly reads these files. Data from CCD detectors, however, need to be &amp;quot;unwarped&amp;quot;; unwarping can be done within the Bruker software called Proteum2. See also [[ccp4com:Bruker_software|Bruker software]]. Data from more recent detectors, in particular all Photon detectors, do not need to unwarped and can be processed directly with XDS.&lt;br /&gt;
&lt;br /&gt;
For such files, [https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=CCP4BB;ce43e97e.1907 Tim Grüne] provides the program &amp;lt;code&amp;gt;sfrmtools&amp;lt;/code&amp;gt; at [https://homepage.univie.ac.at/tim.gruene/research/programs/conv/sfrmtools/]. It extracts parameters relevant for data processing with XDS from the header. The output should be saved in a file - only three more keyword/parameter lines are required for a minimal XDS.INP, namely e.g.&lt;br /&gt;
 NAME_TEMPLATE_OF_DATA_FRAMES=/my/data/name_????.sfrm&lt;br /&gt;
 OVERLOAD=1000000 &lt;br /&gt;
 INCIDENT_BEAM_DIRECTION=0 0 1&lt;br /&gt;
Additional ones can of course be used to modify the operation of XDS, e.g.&lt;br /&gt;
 JOB= XYCORR INIT COLSPOT IDXREF DEFPIX INTEGRATE CORRECT&lt;br /&gt;
 INCLUDE_RESOLUTION_RANGE=50 1&lt;br /&gt;
 TRUSTED_REGION=0 1.4142&lt;br /&gt;
 ! UNTRUSTED_QUADRILATERAL= &amp;lt;8 numbers, easily specified using XDSGUI&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CBF files ==&lt;br /&gt;
&lt;br /&gt;
New detector types (optionally?) write CBF files, which XDS natively reads. [[generate_XDS.INP]] generates XDS.INP for CBF data written by the PHOTON II detector.&lt;/div&gt;</summary>
		<author><name>Grunet</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/xds/index.php?title=Timepix2cbf&amp;diff=3688</id>
		<title>Timepix2cbf</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/xds/index.php?title=Timepix2cbf&amp;diff=3688"/>
		<updated>2018-01-09T15:37:31Z</updated>

		<summary type="html">&lt;p&gt;Grunet: /* Availability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Program Description ==&lt;br /&gt;
The [http://www.amscins.com/ ASI] TIMEPIX detector is a direct electron detector used in electron crystallography. It has various output formats, e.g. TIFF, or a binary format.&lt;br /&gt;
In order to process the data with XDS, it is (currently) easiest to convert the files to [http://www.bernstein-plus-sons.com/software/CBF/doc/CBFlib.html CBF format].&lt;br /&gt;
The program timepix2cbf converts the ASI TIMEPIX binary format to cbf, while taking care of the special pixels at the rim of each 256x256 panel: These are 3 pixels long. &lt;br /&gt;
timepix2cbf splits these pixels into three. The intensities are distributed evenly, which is the simplest, but not the best, approach to maintaining the data. Instead of dividing the content of the rim-pixels by three, all other pixel values are multiplied by three. This maintains data precision of the integer values in the CBF files. The GAIN keyword in XDS or DIALS should thus be set to 3. In case XDS is allowed to determine the GAIN automatically, it should produce a similar value. Please read the INIT.LP log file, or take a look at GAIN.cbf.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 1024x1024 vs. 512x512 panel ==&lt;br /&gt;
timepix2cbf works both for the TIMEPIX 1024x1024 detector and the 512x512 detector. The larger version, 1024x1024 contains gaps between the four 512x512 panels (&amp;quot;quads&amp;quot;). These gaps are detector specific and need to be described with the SEGMENT= keyword in XDS.&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
timepix2cbf is available for download as source code ([[File:Timepix2cbf_src.zip]]), or as 64bit linux binary ([[File:Timepix2cbf_bin.zip]]). The source code contains a project description for [https://netbeans.org/ Netbeans], and the zip-archive can thus be imported into [https://netbeans.org/ Netbeans] directly. The linux binary is statically linked and should run on recent linux distributions.&lt;/div&gt;</summary>
		<author><name>Grunet</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/xds/index.php?title=Timepix2cbf&amp;diff=3687</id>
		<title>Timepix2cbf</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/xds/index.php?title=Timepix2cbf&amp;diff=3687"/>
		<updated>2018-01-09T14:42:11Z</updated>

		<summary type="html">&lt;p&gt;Grunet: /* Availability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Program Description ==&lt;br /&gt;
The [http://www.amscins.com/ ASI] TIMEPIX detector is a direct electron detector used in electron crystallography. It has various output formats, e.g. TIFF, or a binary format.&lt;br /&gt;
In order to process the data with XDS, it is (currently) easiest to convert the files to [http://www.bernstein-plus-sons.com/software/CBF/doc/CBFlib.html CBF format].&lt;br /&gt;
The program timepix2cbf converts the ASI TIMEPIX binary format to cbf, while taking care of the special pixels at the rim of each 256x256 panel: These are 3 pixels long. &lt;br /&gt;
timepix2cbf splits these pixels into three. The intensities are distributed evenly, which is the simplest, but not the best, approach to maintaining the data. Instead of dividing the content of the rim-pixels by three, all other pixel values are multiplied by three. This maintains data precision of the integer values in the CBF files. The GAIN keyword in XDS or DIALS should thus be set to 3. In case XDS is allowed to determine the GAIN automatically, it should produce a similar value. Please read the INIT.LP log file, or take a look at GAIN.cbf.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 1024x1024 vs. 512x512 panel ==&lt;br /&gt;
timepix2cbf works both for the TIMEPIX 1024x1024 detector and the 512x512 detector. The larger version, 1024x1024 contains gaps between the four 512x512 panels (&amp;quot;quads&amp;quot;). These gaps are detector specific and need to be described with the SEGMENT= keyword in XDS.&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
timepix2cbf is available for download as source code ([[File:Timepix2cbf_src.zip]]), or as 64bit linux binary ([[File:Timepix2cbf_bin.zip)]]). The source code contains a project description for [https://netbeans.org/ Netbeans], and the zip-archive can thus be imported into [https://netbeans.org/ Netbeans] directly. The linux binary is statically linked and should run on recent linux distributions.&lt;/div&gt;</summary>
		<author><name>Grunet</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/xds/index.php?title=Timepix2cbf&amp;diff=3686</id>
		<title>Timepix2cbf</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/xds/index.php?title=Timepix2cbf&amp;diff=3686"/>
		<updated>2018-01-09T14:41:03Z</updated>

		<summary type="html">&lt;p&gt;Grunet: /* Availability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Program Description ==&lt;br /&gt;
The [http://www.amscins.com/ ASI] TIMEPIX detector is a direct electron detector used in electron crystallography. It has various output formats, e.g. TIFF, or a binary format.&lt;br /&gt;
In order to process the data with XDS, it is (currently) easiest to convert the files to [http://www.bernstein-plus-sons.com/software/CBF/doc/CBFlib.html CBF format].&lt;br /&gt;
The program timepix2cbf converts the ASI TIMEPIX binary format to cbf, while taking care of the special pixels at the rim of each 256x256 panel: These are 3 pixels long. &lt;br /&gt;
timepix2cbf splits these pixels into three. The intensities are distributed evenly, which is the simplest, but not the best, approach to maintaining the data. Instead of dividing the content of the rim-pixels by three, all other pixel values are multiplied by three. This maintains data precision of the integer values in the CBF files. The GAIN keyword in XDS or DIALS should thus be set to 3. In case XDS is allowed to determine the GAIN automatically, it should produce a similar value. Please read the INIT.LP log file, or take a look at GAIN.cbf.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 1024x1024 vs. 512x512 panel ==&lt;br /&gt;
timepix2cbf works both for the TIMEPIX 1024x1024 detector and the 512x512 detector. The larger version, 1024x1024 contains gaps between the four 512x512 panels (&amp;quot;quads&amp;quot;). These gaps are detector specific and need to be described with the SEGMENT= keyword in XDS.&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
timepix2cbf is available for download as [[File:Timepix2cbf_src.zip|200px|thumb|left|source code]], or as [[File:Timepix2cbf_bin.zip | 64bit linux binary]]. The source code contains a project description for [https://netbeans.org/ Netbeans], and the zip-archive can thus be imported into [https://netbeans.org/ Netbeans] directly. The linux binary is statically linked and should run on recent linux distributions.&lt;/div&gt;</summary>
		<author><name>Grunet</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/xds/index.php?title=Timepix2cbf&amp;diff=3685</id>
		<title>Timepix2cbf</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/xds/index.php?title=Timepix2cbf&amp;diff=3685"/>
		<updated>2018-01-09T14:39:27Z</updated>

		<summary type="html">&lt;p&gt;Grunet: /* Availability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Program Description ==&lt;br /&gt;
The [http://www.amscins.com/ ASI] TIMEPIX detector is a direct electron detector used in electron crystallography. It has various output formats, e.g. TIFF, or a binary format.&lt;br /&gt;
In order to process the data with XDS, it is (currently) easiest to convert the files to [http://www.bernstein-plus-sons.com/software/CBF/doc/CBFlib.html CBF format].&lt;br /&gt;
The program timepix2cbf converts the ASI TIMEPIX binary format to cbf, while taking care of the special pixels at the rim of each 256x256 panel: These are 3 pixels long. &lt;br /&gt;
timepix2cbf splits these pixels into three. The intensities are distributed evenly, which is the simplest, but not the best, approach to maintaining the data. Instead of dividing the content of the rim-pixels by three, all other pixel values are multiplied by three. This maintains data precision of the integer values in the CBF files. The GAIN keyword in XDS or DIALS should thus be set to 3. In case XDS is allowed to determine the GAIN automatically, it should produce a similar value. Please read the INIT.LP log file, or take a look at GAIN.cbf.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 1024x1024 vs. 512x512 panel ==&lt;br /&gt;
timepix2cbf works both for the TIMEPIX 1024x1024 detector and the 512x512 detector. The larger version, 1024x1024 contains gaps between the four 512x512 panels (&amp;quot;quads&amp;quot;). These gaps are detector specific and need to be described with the SEGMENT= keyword in XDS.&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
timepix2cbf is available for download as [[File:Timepix2cbf_src.zip]] source code, or as 64bit [[File:Timepix2cbf_bin.zip]] linux binary. The source code contains a project description for [https://netbeans.org/ Netbeans], and the zip-archive can thus be imported into [https://netbeans.org/ Netbeans] directly. The linux binary is statically linked and should run on recent linux distributions.&lt;/div&gt;</summary>
		<author><name>Grunet</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/xds/index.php?title=File:Timepix2cbf_src.zip&amp;diff=3684</id>
		<title>File:Timepix2cbf src.zip</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/xds/index.php?title=File:Timepix2cbf_src.zip&amp;diff=3684"/>
		<updated>2018-01-09T14:36:34Z</updated>

		<summary type="html">&lt;p&gt;Grunet: Source code (Netbeans project) for timepix2cbf conversion program.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Source code (Netbeans project) for timepix2cbf conversion program.&lt;/div&gt;</summary>
		<author><name>Grunet</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/xds/index.php?title=File:Timepix2cbf_bin.zip&amp;diff=3683</id>
		<title>File:Timepix2cbf bin.zip</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/xds/index.php?title=File:Timepix2cbf_bin.zip&amp;diff=3683"/>
		<updated>2018-01-09T14:35:52Z</updated>

		<summary type="html">&lt;p&gt;Grunet: Linux binary for the program timepix2cbf. 64bit executable, statically linked.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Linux binary for the program timepix2cbf. 64bit executable, statically linked.&lt;/div&gt;</summary>
		<author><name>Grunet</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/xds/index.php?title=Timepix2cbf&amp;diff=3675</id>
		<title>Timepix2cbf</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/xds/index.php?title=Timepix2cbf&amp;diff=3675"/>
		<updated>2018-01-08T19:54:50Z</updated>

		<summary type="html">&lt;p&gt;Grunet: Timepix2cbf converts TIMEPIX binary format to CBF for processing electron diffraction data with XDS.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Program Description ==&lt;br /&gt;
The [http://www.amscins.com/ ASI] TIMEPIX detector is a direct electron detector used in electron crystallography. It has various output formats, e.g. TIFF, or a binary format.&lt;br /&gt;
In order to process the data with XDS, it is (currently) easiest to convert the files to [http://www.bernstein-plus-sons.com/software/CBF/doc/CBFlib.html CBF format].&lt;br /&gt;
The program timepix2cbf converts the ASI TIMEPIX binary format to cbf, while taking care of the special pixels at the rim of each 256x256 panel: These are 3 pixels long. &lt;br /&gt;
timepix2cbf splits these pixels into three. The intensities are distributed evenly, which is the simplest, but not the best, approach to maintaining the data. Instead of dividing the content of the rim-pixels by three, all other pixel values are multiplied by three. This maintains data precision of the integer values in the CBF files. The GAIN keyword in XDS or DIALS should thus be set to 3. In case XDS is allowed to determine the GAIN automatically, it should produce a similar value. Please read the INIT.LP log file, or take a look at GAIN.cbf.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 1024x1024 vs. 512x512 panel ==&lt;br /&gt;
timepix2cbf works both for the TIMEPIX 1024x1024 detector and the 512x512 detector. The larger version, 1024x1024 contains gaps between the four 512x512 panels (&amp;quot;quads&amp;quot;). These gaps are detector specific and need to be described with the SEGMENT= keyword in XDS.&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
timepix2cbf is available for download as source code, or as 64bit linux binary. The source code contains a project description for [https://netbeans.org/ Netbeans], and the zip-archive can thus be imported into [https://netbeans.org/ Netbeans] directly. The linux binary is statically linked and should run on recent linux distributions.&lt;/div&gt;</summary>
		<author><name>Grunet</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/xds/index.php?title=Tif2cbf&amp;diff=3659</id>
		<title>Tif2cbf</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/xds/index.php?title=Tif2cbf&amp;diff=3659"/>
		<updated>2017-12-15T13:28:49Z</updated>

		<summary type="html">&lt;p&gt;Grunet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The program tif2cbf converts TIFF images to CBF format. The program uses the [http://libtiff.org TIFF library] and the [http://www.bernstein-plus-sons.com/software/CBF/ CBF library]. It reads 8-bit, 16-bit, and 32-bit TIFF files and converts them to 32-bit CBF files that can be processed by XDS.&lt;br /&gt;
The program does not write a sensible CBF-header. It is on the TODO list to provide the program with an XDS.INP style input file to transfer the available parameters to the CBF files.&lt;br /&gt;
&lt;br /&gt;
The program is available as source code from(with a project file for [https://netbeans.org/ Netbeans]) and as 64-bit statically linked binary in ELF format (i.e. for Linux)  [http://www.psi.ch/lbr/gruene-tim my PSI homepage].&lt;br /&gt;
&lt;br /&gt;
I acknowledge support from Wolfgang Kabsch, [http://www.scripps.edu/tainer/arvai/adxv.html Andy Arvai], and the author of [https://github.com/biochem-fan/eiger2cbf/ eiger2cbf].&lt;/div&gt;</summary>
		<author><name>Grunet</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/xds/index.php?title=Tif2cbf&amp;diff=3658</id>
		<title>Tif2cbf</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/xds/index.php?title=Tif2cbf&amp;diff=3658"/>
		<updated>2017-12-15T13:03:41Z</updated>

		<summary type="html">&lt;p&gt;Grunet: The program tif2cbf converts TIFF files to CBF files that can be processed by XDS.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The program tif2cbf converts TIFF images to CBF format. The program uses the [http://libtiff.org TIFF library] and the [http://www.bernstein-plus-sons.com/software/CBF/ CBF library]. It reads 8-bit, 16-bit, and 32-bit TIFF files and converts them to 32-bit CBF files that can be processed by XDS.&lt;br /&gt;
The program does not write a sensible CBF-header. It is on the TODO list to provide the program with an XDS.INP style input file to transfer the available parameters to the CBF files.&lt;br /&gt;
&lt;br /&gt;
The program is available as source code (with a project file for [https://netbeans.org/ Netbeans]) and as 64-bit statically linked binary in ELF format (i.e. for Linux).&lt;br /&gt;
&lt;br /&gt;
I acknowledge support from Wolfgang Kabsch, [http://www.scripps.edu/tainer/arvai/adxv.html Andy Arvai], and the author of [https://github.com/biochem-fan/eiger2cbf/ eiger2cbf].&lt;/div&gt;</summary>
		<author><name>Grunet</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/xds/index.php?title=Xdsconv&amp;diff=2710</id>
		<title>Xdsconv</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/xds/index.php?title=Xdsconv&amp;diff=2710"/>
		<updated>2013-03-04T19:08:31Z</updated>

		<summary type="html">&lt;p&gt;Grunet: /* added &amp;#039;freerflag&amp;#039; to bash-script for setting all Rfree-flags valid (otherwise problems with e.g. buster) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://www.mpimf-heidelberg.mpg.de/~kabsch/xds/html_doc/xdsconv_parameters.html XDSCONV] is the conversion program of the [[XDS]] suite.&lt;br /&gt;
&lt;br /&gt;
Possible output formats are SHELX, CNS, CCP4 (for F SIGF DANO SIGDANO), CCP4_F (for F+ F- SIGF+ SIGF-) and CCP4_I (for I+ I- SIGI+ SIGI-). &lt;br /&gt;
----&lt;br /&gt;
XDSCONV does outlier rejection in some modes.&lt;br /&gt;
== Typical use ==&lt;br /&gt;
A typical input file XDSCONV.INP might look like&lt;br /&gt;
 INPUT_FILE=XDS_ASCII.HKL&lt;br /&gt;
 INCLUDE_RESOLUTION_RANGE=50 1  ! optional &lt;br /&gt;
 OUTPUT_FILE=temp.hkl  CCP4     ! Warning: do _not_ name this file &amp;quot;temp.mtz&amp;quot; !&lt;br /&gt;
 FRIEDEL&#039;S_LAW=FALSE            ! default is FRIEDEL&#039;S_LAW=TRUE&lt;br /&gt;
This produces the file temp.hkl which is then converted to a MTZ file XDS_ASCII.mtz with (these lines are also printed out by XDSCONV):&lt;br /&gt;
 f2mtz HKLOUT temp.mtz&amp;lt;F2MTZ.INP&lt;br /&gt;
 cad HKLIN1 temp.mtz HKLOUT XDS_ASCII.mtz&amp;lt;&amp;lt;EOF&lt;br /&gt;
 LABIN FILE 1 ALL&lt;br /&gt;
 END&lt;br /&gt;
 EOF&lt;br /&gt;
This latter step is not necessary for CNS and SHELX output formats, which are written directly by XDSCONV. For the CNS output format, one could use MERGE=FALSE to keep observations separate. For the SHELX output format, MERGE=FALSE is the default (I guess because George Sheldrick suggests that his programs, in particular [http://strucbio.biologie.uni-konstanz.de/ccp4wiki/index.php/XPREP XPREP], should be fed unmerged data. However I sometimes found that I obtain better SHELXD results with merging inside XDSCONV, using MERGE=TRUE).&lt;br /&gt;
&lt;br /&gt;
N.B. It is good practice to always use FRIEDEL&#039;S_LAW=FALSE - see [[Tips and Tricks]].&lt;br /&gt;
&lt;br /&gt;
=== how to change column labels ===&lt;br /&gt;
To have control over the column labels, one might want to modify the simple example above as:&lt;br /&gt;
&lt;br /&gt;
 f2mtz HKLOUT temp.mtz&amp;lt;F2MTZ.INP&lt;br /&gt;
 cad HKLIN1 temp.mtz HKLOUT junk_xdsconv.mtz&amp;lt;&amp;lt;EOF&lt;br /&gt;
 LABIN FILE 1 E1=FP E2=SIGFP E3=DANO E4=SIGDANO E5=ISYM&lt;br /&gt;
 LABOUT FILE 1 E1=FP E2=SIGFP E3=DANO_sulf E4=SIGDANO_sulf E5=ISYM_sulf&lt;br /&gt;
 END&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
ISYM column is important if you want to run SHARP afterwards. &lt;br /&gt;
&lt;br /&gt;
In the case of a MTZ file that should be used for molecular replacement and refinement, the CAD step could be used to transfer the R_free flag from a different dataset to this new dataset. Alternatively, change of labels and transfer of columns can be done in the ccp4i GUI.&lt;br /&gt;
&lt;br /&gt;
== how to obtain a MTZ file with DANO SIGDANO F(+) SIGF(+) F(-) SIGF(-) ==&lt;br /&gt;
You have to run XDSCONV twice, and combine the output with cad. At the latter step you can also change the column labels:&lt;br /&gt;
 #!/bin/csh -f&lt;br /&gt;
 # produce xds_allFinfo.mtz with FP SIGFP DANO SIGDANO F(+) SIGF(+) F(-) SIGF(-)&lt;br /&gt;
 # in the same way, the labels produced with CCP4_I could be included!&lt;br /&gt;
 #&lt;br /&gt;
 # first xdsconv run producing FP SIGFP DANO SIGDANO&lt;br /&gt;
 echo &amp;quot;INPUT_FILE= XDS_ASCII.HKL&amp;quot; &amp;gt; XDSCONV.INP&lt;br /&gt;
 echo &amp;quot;OUTPUT_FILE= temp.hkl CCP4&amp;quot; &amp;gt;&amp;gt; XDSCONV.INP&lt;br /&gt;
 echo &amp;quot;FRIEDEL&#039;S_LAW= FALSE&amp;quot; &amp;gt;&amp;gt; XDSCONV.INP&lt;br /&gt;
 xdsconv&lt;br /&gt;
 f2mtz HKLOUT temp1.mtz&amp;lt;F2MTZ.INP&lt;br /&gt;
 &lt;br /&gt;
 # second xdsconv run producing F(+) SIGF(+) F(-) SIGF(-)&lt;br /&gt;
 echo &amp;quot;INPUT_FILE= XDS_ASCII.HKL&amp;quot; &amp;gt; XDSCONV.INP&lt;br /&gt;
 echo &amp;quot;OUTPUT_FILE= temp.hkl CCP4_F&amp;quot; &amp;gt;&amp;gt; XDSCONV.INP&lt;br /&gt;
 echo &amp;quot;FRIEDEL&#039;S_LAW= FALSE&amp;quot; &amp;gt;&amp;gt; XDSCONV.INP&lt;br /&gt;
 xdsconv&lt;br /&gt;
 f2mtz HKLOUT temp2.mtz&amp;lt;F2MTZ.INP&lt;br /&gt;
 &lt;br /&gt;
 # for CAD, the 2 LABOUT cards are only required if the labels should be changed&lt;br /&gt;
 cad HKLIN1 temp1.mtz HKLIN2 temp2.mtz HKLOUT xds_allFinfo.mtz&amp;lt;&amp;lt;EOF&lt;br /&gt;
  LABIN  FILE 1 E1=FP       E2=SIGFP       E3=DANO     E4=SIGDANO&lt;br /&gt;
  LABIN  FILE 2 E1=F(+)     E2=SIGF(+)     E3=F(-)     E4=SIGF(-)&lt;br /&gt;
  LABOUT FILE 1 E1=FP_Hg    E2=SIGFP_Hg    E3=DANO_Hg  E4=SIGDANO_Hg&lt;br /&gt;
  LABOUT FILE 2 E1=F(+)_Hg  E2=SIGF(+)_Hg  E3=F(-)_Hg  E4=SIGF(-)_Hg&lt;br /&gt;
  END&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
The following script does the same for the input file (first parameter to the script), but also adds a SUFFIX (second parameter) to the columns to better identify the data, and optionally copies the Rfree-flag from a reference mtz-file (third parameter). If the Rfree-flag is NOT named &amp;quot;FreeR_flag&amp;quot; (the default from ccp4i), you can provide its name as fourth parameter. All steps are logged into log-files, temporary files are deleted. The input file should end with .HKL (rather than e.g. .hkl).&lt;br /&gt;
The script also sets the resolution to that of the observed data using sftools. Otherwise the resolution of the reference data set might be shown if that is higher. You can call this script &#039;xds2mtz.sh&#039;. If it is executed without arguments, you get a short usage instruction.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
function usage {&lt;br /&gt;
echo &amp;quot;Usage: xds2mtz file.HKL SUFFIX [Rfree.mtz [RfreeFlag]]&amp;quot;&lt;br /&gt;
echo &amp;quot;&amp;quot;&lt;br /&gt;
echo &amp;quot;       file.HKL:  Output from XDS or XSCALE&amp;quot;&lt;br /&gt;
echo &amp;quot;       SUFFIX:    Columns suffix, e.g. FP_SUFFIX&amp;quot;&lt;br /&gt;
echo &amp;quot;       Rfree.mtz: Reference mtz-file for Rfree transfer&amp;quot;&lt;br /&gt;
echo &amp;quot;       RfreeFlag: Label for Rfree set, defaults to \&amp;quot;FreeR_flag\&amp;quot;&amp;quot;&lt;br /&gt;
echo &amp;quot;&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if [ -z $1 ]; then&lt;br /&gt;
	echo &amp;quot;*** Error: Missing input XDS file name&amp;quot;&lt;br /&gt;
	usage&lt;br /&gt;
	exit -1;&lt;br /&gt;
fi&lt;br /&gt;
if [ ! -f $1 ]; then&lt;br /&gt;
	echo &amp;quot;*** Error: File $1 does not exist&amp;quot;&lt;br /&gt;
	usage&lt;br /&gt;
	exit -1;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BASE=$(basename $1)&lt;br /&gt;
SUFFIX=$2&lt;br /&gt;
RFREE=$3&lt;br /&gt;
FLAG=$4&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Base = $BASE, Suffix = $SUFFIX&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;INPUT_FILE= $1&amp;quot; &amp;gt; XDSCONV.INP&lt;br /&gt;
echo &amp;quot;OUTPUT_FILE= temp1.hkl CCP4&amp;quot; &amp;gt;&amp;gt; XDSCONV.INP&lt;br /&gt;
xdsconv &amp;amp;&amp;amp; f2mtz HKLOUT temp1.mtz &amp;lt;F2MTZ.INP | tee ${BASE%.HKL}_dano.log&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;INPUT_FILE= $1&amp;quot; &amp;gt; XDSCONV.INP&lt;br /&gt;
echo &amp;quot;OUTPUT_FILE= temp2.hkl CCP4_F&amp;quot; &amp;gt;&amp;gt; XDSCONV.INP&lt;br /&gt;
xdsconv &amp;amp;&amp;amp; f2mtz HKLOUT temp2.mtz &amp;lt;F2MTZ.INP |tee ${BASE%.HKL}_pm.log&lt;br /&gt;
&lt;br /&gt;
if [ -z $3 ]; then&lt;br /&gt;
	echo &amp;quot;Proceeding without Rfree reference file&amp;quot;&lt;br /&gt;
cad HKLIN1 temp1.mtz HKLIN2 temp2.mtz HKLOUT ${BASE%.HKL}.mtz &amp;lt;&amp;lt; eof | tee ${BASE%.HKL}_cad.log&lt;br /&gt;
LABIN  FILE 1 E1=FP       E2=SIGFP       E3=DANO     E4=SIGDANO&lt;br /&gt;
LABIN  FILE 2 E1=F(+)     E2=SIGF(+)     E3=F(-)     E4=SIGF(-)&lt;br /&gt;
LABOUT FILE 1 E1=FP_$SUFFIX    E2=SIGFP_$SUFFIX    E3=DANO_$SUFFIX  E4=SIGDANO_$SUFFIX&lt;br /&gt;
LABOUT FILE 2 E1=F(+)_$SUFFIX  E2=SIGF(+)_$SUFFIX  E3=F(-)_$SUFFIX  E4=SIGF(-)_$SUFFIX&lt;br /&gt;
eof&lt;br /&gt;
else &lt;br /&gt;
	echo &amp;quot;Copying Rfree from file $3&amp;quot;&lt;br /&gt;
	if [ -z $4 ]; then &lt;br /&gt;
		FREERFLAG=&amp;quot;FreeR_flag&amp;quot; # ccp4 standard name&lt;br /&gt;
	else&lt;br /&gt;
	FREERFLAG=$4&lt;br /&gt;
	fi&lt;br /&gt;
	echo &amp;quot;Extracting flagged indices from ${FREERFLAG}&amp;quot;&lt;br /&gt;
	cad 	HKLIN1 temp1.mtz \&lt;br /&gt;
		HKLIN2 temp2.mtz \&lt;br /&gt;
		HKLIN3 $3 \&lt;br /&gt;
		HKLOUT ${BASE%.HKL}.mtz &amp;lt;&amp;lt; eof | tee ${BASE%.HKL}_cad.log&lt;br /&gt;
LABIN  FILE 1 E1=FP       E2=SIGFP       E3=DANO     E4=SIGDANO&lt;br /&gt;
LABIN  FILE 2 E1=F(+)     E2=SIGF(+)     E3=F(-)     E4=SIGF(-)&lt;br /&gt;
LABIN  FILE 3 E1=${FREERFLAG}&lt;br /&gt;
LABOUT FILE 1 E1=FP_$SUFFIX    E2=SIGFP_$SUFFIX    E3=DANO_$SUFFIX  E4=SIGDANO_$SUFFIX&lt;br /&gt;
LABOUT FILE 2 E1=F(+)_$SUFFIX  E2=SIGF(+)_$SUFFIX  E3=F(-)_$SUFFIX  E4=SIGF(-)_$SUFFIX&lt;br /&gt;
LABOUT FILE 3 E1=${FREERFLAG}&lt;br /&gt;
eof&lt;br /&gt;
&lt;br /&gt;
rm temp1.mtz&lt;br /&gt;
&lt;br /&gt;
# correct for FreeRflag (if new file has more reflections than reference file)&lt;br /&gt;
freerflag hklin ${BASE%.HKL}.mtz hklout temp1.mtz &amp;lt;&amp;lt; eof | tee ${BASE%.HKL}_freerflag.log&lt;br /&gt;
COMPLETE FREE=${FREERFLAG}&lt;br /&gt;
end&lt;br /&gt;
eof&lt;br /&gt;
&lt;br /&gt;
# correct for real data in case Rfree data set contains too many hkls&lt;br /&gt;
# thanks to Andrey Lebedev&lt;br /&gt;
sftools &amp;lt;&amp;lt; eof | tee ${BASE%.HKL}_sftools.log&lt;br /&gt;
READ ${BASE%.HKL}.mtz&lt;br /&gt;
SELECT ONLY COLUMN FP_$SUFFIX PRESENT&lt;br /&gt;
WRITE temp1.mtz&lt;br /&gt;
END&lt;br /&gt;
eof&lt;br /&gt;
&lt;br /&gt;
mv temp1.mtz ${BASE%.HKL}.mtz&lt;br /&gt;
&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
rm -f XDSCONV.INP temp1.hkl temp1.mtz temp2.hkl temp2.mtz F2MTZ.INP XDSCONV.LP&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hint for long-time XDSCONV users ==&lt;br /&gt;
&lt;br /&gt;
The latest versions of the program do not require &lt;br /&gt;
 SPACE_GROUP_NUMBER=&lt;br /&gt;
 UNIT_CELL_PARAMETERS=&lt;br /&gt;
because these are picked up from the header of the input reflection file. However, if you want to &#039;&#039;change&#039;&#039; the parameters of either keyword then you have to specify &#039;&#039;&#039;both&#039;&#039;&#039;! I.e. if you want to change the spacegroup then you also have to specify the unit cell parameters.&lt;/div&gt;</summary>
		<author><name>Grunet</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/xds/index.php?title=Xdsconv&amp;diff=2709</id>
		<title>Xdsconv</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/xds/index.php?title=Xdsconv&amp;diff=2709"/>
		<updated>2013-03-01T17:57:57Z</updated>

		<summary type="html">&lt;p&gt;Grunet: /* second bash script for converting XDS format to (anomalous) mtz including Rfree */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://www.mpimf-heidelberg.mpg.de/~kabsch/xds/html_doc/xdsconv_parameters.html XDSCONV] is the conversion program of the [[XDS]] suite.&lt;br /&gt;
&lt;br /&gt;
Possible output formats are SHELX, CNS, CCP4 (for F SIGF DANO SIGDANO), CCP4_F (for F+ F- SIGF+ SIGF-) and CCP4_I (for I+ I- SIGI+ SIGI-). &lt;br /&gt;
----&lt;br /&gt;
XDSCONV does outlier rejection in some modes.&lt;br /&gt;
== Typical use ==&lt;br /&gt;
A typical input file XDSCONV.INP might look like&lt;br /&gt;
 INPUT_FILE=XDS_ASCII.HKL&lt;br /&gt;
 INCLUDE_RESOLUTION_RANGE=50 1  ! optional &lt;br /&gt;
 OUTPUT_FILE=temp.hkl  CCP4     ! Warning: do _not_ name this file &amp;quot;temp.mtz&amp;quot; !&lt;br /&gt;
 FRIEDEL&#039;S_LAW=FALSE            ! default is FRIEDEL&#039;S_LAW=TRUE&lt;br /&gt;
This produces the file temp.hkl which is then converted to a MTZ file XDS_ASCII.mtz with (these lines are also printed out by XDSCONV):&lt;br /&gt;
 f2mtz HKLOUT temp.mtz&amp;lt;F2MTZ.INP&lt;br /&gt;
 cad HKLIN1 temp.mtz HKLOUT XDS_ASCII.mtz&amp;lt;&amp;lt;EOF&lt;br /&gt;
 LABIN FILE 1 ALL&lt;br /&gt;
 END&lt;br /&gt;
 EOF&lt;br /&gt;
This latter step is not necessary for CNS and SHELX output formats, which are written directly by XDSCONV. For the CNS output format, one could use MERGE=FALSE to keep observations separate. For the SHELX output format, MERGE=FALSE is the default (I guess because George Sheldrick suggests that his programs, in particular [http://strucbio.biologie.uni-konstanz.de/ccp4wiki/index.php/XPREP XPREP], should be fed unmerged data. However I sometimes found that I obtain better SHELXD results with merging inside XDSCONV, using MERGE=TRUE).&lt;br /&gt;
&lt;br /&gt;
N.B. It is good practice to always use FRIEDEL&#039;S_LAW=FALSE - see [[Tips and Tricks]].&lt;br /&gt;
&lt;br /&gt;
=== how to change column labels ===&lt;br /&gt;
To have control over the column labels, one might want to modify the simple example above as:&lt;br /&gt;
&lt;br /&gt;
 f2mtz HKLOUT temp.mtz&amp;lt;F2MTZ.INP&lt;br /&gt;
 cad HKLIN1 temp.mtz HKLOUT junk_xdsconv.mtz&amp;lt;&amp;lt;EOF&lt;br /&gt;
 LABIN FILE 1 E1=FP E2=SIGFP E3=DANO E4=SIGDANO E5=ISYM&lt;br /&gt;
 LABOUT FILE 1 E1=FP E2=SIGFP E3=DANO_sulf E4=SIGDANO_sulf E5=ISYM_sulf&lt;br /&gt;
 END&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
ISYM column is important if you want to run SHARP afterwards. &lt;br /&gt;
&lt;br /&gt;
In the case of a MTZ file that should be used for molecular replacement and refinement, the CAD step could be used to transfer the R_free flag from a different dataset to this new dataset. Alternatively, change of labels and transfer of columns can be done in the ccp4i GUI.&lt;br /&gt;
&lt;br /&gt;
== how to obtain a MTZ file with DANO SIGDANO F(+) SIGF(+) F(-) SIGF(-) ==&lt;br /&gt;
You have to run XDSCONV twice, and combine the output with cad. At the latter step you can also change the column labels:&lt;br /&gt;
 #!/bin/csh -f&lt;br /&gt;
 # produce xds_allFinfo.mtz with FP SIGFP DANO SIGDANO F(+) SIGF(+) F(-) SIGF(-)&lt;br /&gt;
 # in the same way, the labels produced with CCP4_I could be included!&lt;br /&gt;
 #&lt;br /&gt;
 # first xdsconv run producing FP SIGFP DANO SIGDANO&lt;br /&gt;
 echo &amp;quot;INPUT_FILE= XDS_ASCII.HKL&amp;quot; &amp;gt; XDSCONV.INP&lt;br /&gt;
 echo &amp;quot;OUTPUT_FILE= temp.hkl CCP4&amp;quot; &amp;gt;&amp;gt; XDSCONV.INP&lt;br /&gt;
 echo &amp;quot;FRIEDEL&#039;S_LAW= FALSE&amp;quot; &amp;gt;&amp;gt; XDSCONV.INP&lt;br /&gt;
 xdsconv&lt;br /&gt;
 f2mtz HKLOUT temp1.mtz&amp;lt;F2MTZ.INP&lt;br /&gt;
 &lt;br /&gt;
 # second xdsconv run producing F(+) SIGF(+) F(-) SIGF(-)&lt;br /&gt;
 echo &amp;quot;INPUT_FILE= XDS_ASCII.HKL&amp;quot; &amp;gt; XDSCONV.INP&lt;br /&gt;
 echo &amp;quot;OUTPUT_FILE= temp.hkl CCP4_F&amp;quot; &amp;gt;&amp;gt; XDSCONV.INP&lt;br /&gt;
 echo &amp;quot;FRIEDEL&#039;S_LAW= FALSE&amp;quot; &amp;gt;&amp;gt; XDSCONV.INP&lt;br /&gt;
 xdsconv&lt;br /&gt;
 f2mtz HKLOUT temp2.mtz&amp;lt;F2MTZ.INP&lt;br /&gt;
 &lt;br /&gt;
 # for CAD, the 2 LABOUT cards are only required if the labels should be changed&lt;br /&gt;
 cad HKLIN1 temp1.mtz HKLIN2 temp2.mtz HKLOUT xds_allFinfo.mtz&amp;lt;&amp;lt;EOF&lt;br /&gt;
  LABIN  FILE 1 E1=FP       E2=SIGFP       E3=DANO     E4=SIGDANO&lt;br /&gt;
  LABIN  FILE 2 E1=F(+)     E2=SIGF(+)     E3=F(-)     E4=SIGF(-)&lt;br /&gt;
  LABOUT FILE 1 E1=FP_Hg    E2=SIGFP_Hg    E3=DANO_Hg  E4=SIGDANO_Hg&lt;br /&gt;
  LABOUT FILE 2 E1=F(+)_Hg  E2=SIGF(+)_Hg  E3=F(-)_Hg  E4=SIGF(-)_Hg&lt;br /&gt;
  END&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
The following script does the same for the input file (first parameter to the script), but also adds a SUFFIX (second parameter) to the columns to better identify the data, and optionally copies the Rfree-flag from a reference mtz-file (third parameter). If the Rfree-flag is NOT named &amp;quot;FreeR_flag&amp;quot; (the default from ccp4i), you can provide its name as fourth parameter. All steps are logged into log-files, temporary files are deleted. The input file should end with .HKL (rather than e.g. .hkl).&lt;br /&gt;
The script also sets the resolution to that of the observed data using sftools. Otherwise the resolution of the reference data set might be shown if that is higher. You can call this script &#039;xds2mtz.sh&#039;. If it is executed without arguments, you get a short usage instruction.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
function usage {&lt;br /&gt;
echo &amp;quot;Usage: xds2mtz file.HKL SUFFIX [Rfree.mtz [RfreeFlag]]&amp;quot;&lt;br /&gt;
echo &amp;quot;&amp;quot;&lt;br /&gt;
echo &amp;quot;       file.HKL:  Output from XDS or XSCALE&amp;quot;&lt;br /&gt;
echo &amp;quot;       SUFFIX:    Columns suffix, e.g. FP_SUFFIX&amp;quot;&lt;br /&gt;
echo &amp;quot;       Rfree.mtz: Reference mtz-file for Rfree transfer&amp;quot;&lt;br /&gt;
echo &amp;quot;       RfreeFlag: Label for Rfree set, defaults to \&amp;quot;FreeR_flag\&amp;quot;&amp;quot;&lt;br /&gt;
echo &amp;quot;&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if [ -z $1 ]; then&lt;br /&gt;
	echo &amp;quot;*** Error: Missing input XDS file name&amp;quot;&lt;br /&gt;
	usage&lt;br /&gt;
	exit -1;&lt;br /&gt;
fi&lt;br /&gt;
if [ ! -f $1 ]; then&lt;br /&gt;
	echo &amp;quot;*** Error: File $1 does not exist&amp;quot;&lt;br /&gt;
	usage&lt;br /&gt;
	exit -1;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BASE=$(basename $1)&lt;br /&gt;
SUFFIX=$2&lt;br /&gt;
RFREE=$3&lt;br /&gt;
FLAG=$4&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Base = $BASE, Suffix = $SUFFIX&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;INPUT_FILE= $1&amp;quot; &amp;gt; XDSCONV.INP&lt;br /&gt;
echo &amp;quot;OUTPUT_FILE= temp1.hkl CCP4&amp;quot; &amp;gt;&amp;gt; XDSCONV.INP&lt;br /&gt;
xdsconv &amp;amp;&amp;amp; f2mtz HKLOUT temp1.mtz &amp;lt;F2MTZ.INP | tee ${BASE%.HKL}_dano.log&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;INPUT_FILE= $1&amp;quot; &amp;gt; XDSCONV.INP&lt;br /&gt;
echo &amp;quot;OUTPUT_FILE= temp2.hkl CCP4_F&amp;quot; &amp;gt;&amp;gt; XDSCONV.INP&lt;br /&gt;
xdsconv &amp;amp;&amp;amp; f2mtz HKLOUT temp2.mtz &amp;lt;F2MTZ.INP |tee ${BASE%.HKL}_pm.log&lt;br /&gt;
&lt;br /&gt;
if [ -z $3 ]; then&lt;br /&gt;
	echo &amp;quot;Proceeding without Rfree reference file&amp;quot;&lt;br /&gt;
cad HKLIN1 temp1.mtz HKLIN2 temp2.mtz HKLOUT ${BASE%.HKL}.mtz &amp;lt;&amp;lt; eof | tee ${BASE%.HKL}_cad.log&lt;br /&gt;
LABIN  FILE 1 E1=FP       E2=SIGFP       E3=DANO     E4=SIGDANO&lt;br /&gt;
LABIN  FILE 2 E1=F(+)     E2=SIGF(+)     E3=F(-)     E4=SIGF(-)&lt;br /&gt;
LABOUT FILE 1 E1=FP_$SUFFIX    E2=SIGFP_$SUFFIX    E3=DANO_$SUFFIX  E4=SIGDANO_$SUFFIX&lt;br /&gt;
LABOUT FILE 2 E1=F(+)_$SUFFIX  E2=SIGF(+)_$SUFFIX  E3=F(-)_$SUFFIX  E4=SIGF(-)_$SUFFIX&lt;br /&gt;
eof&lt;br /&gt;
else &lt;br /&gt;
	echo &amp;quot;Copying Rfree from file $3&amp;quot;&lt;br /&gt;
	if [ -z $4 ]; then &lt;br /&gt;
		FREERFLAG=&amp;quot;FreeR_flag&amp;quot; # ccp4 standard name&lt;br /&gt;
	else&lt;br /&gt;
	FREERFLAG=$4&lt;br /&gt;
	fi&lt;br /&gt;
	echo &amp;quot;Extracting flagged indices from ${FREERFLAG}&amp;quot;&lt;br /&gt;
	cad 	HKLIN1 temp1.mtz \&lt;br /&gt;
		HKLIN2 temp2.mtz \&lt;br /&gt;
		HKLIN3 $3 \&lt;br /&gt;
		HKLOUT ${BASE%.HKL}.mtz &amp;lt;&amp;lt; eof | tee ${BASE%.HKL}_cad.log&lt;br /&gt;
LABIN  FILE 1 E1=FP       E2=SIGFP       E3=DANO     E4=SIGDANO&lt;br /&gt;
LABIN  FILE 2 E1=F(+)     E2=SIGF(+)     E3=F(-)     E4=SIGF(-)&lt;br /&gt;
LABIN  FILE 3 E1=${FREERFLAG}&lt;br /&gt;
LABOUT FILE 1 E1=FP_$SUFFIX    E2=SIGFP_$SUFFIX    E3=DANO_$SUFFIX  E4=SIGDANO_$SUFFIX&lt;br /&gt;
LABOUT FILE 2 E1=F(+)_$SUFFIX  E2=SIGF(+)_$SUFFIX  E3=F(-)_$SUFFIX  E4=SIGF(-)_$SUFFIX&lt;br /&gt;
LABOUT FILE 3 E1=${FREERFLAG}&lt;br /&gt;
eof&lt;br /&gt;
&lt;br /&gt;
rm temp1.mtz&lt;br /&gt;
&lt;br /&gt;
# correct for real data in case Rfree data set contains too many hkls&lt;br /&gt;
# thanks to Andrey Lebedev&lt;br /&gt;
sftools &amp;lt;&amp;lt; eof | tee ${BASE%.HKL}_sftools.log&lt;br /&gt;
READ ${BASE%.HKL}.mtz&lt;br /&gt;
SELECT ONLY COLUMN FP_$SUFFIX PRESENT&lt;br /&gt;
WRITE temp1.mtz&lt;br /&gt;
END&lt;br /&gt;
eof&lt;br /&gt;
&lt;br /&gt;
mv temp1.mtz ${BASE%.HKL}.mtz&lt;br /&gt;
&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
rm -f XDSCONV.INP temp1.hkl temp1.mtz temp2.hkl temp2.mtz F2MTZ.INP XDSCONV.LP&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hint for long-time XDSCONV users ==&lt;br /&gt;
&lt;br /&gt;
The latest versions of the program do not require &lt;br /&gt;
 SPACE_GROUP_NUMBER=&lt;br /&gt;
 UNIT_CELL_PARAMETERS=&lt;br /&gt;
because these are picked up from the header of the input reflection file. However, if you want to &#039;&#039;change&#039;&#039; the parameters of either keyword then you have to specify &#039;&#039;&#039;both&#039;&#039;&#039;! I.e. if you want to change the spacegroup then you also have to specify the unit cell parameters.&lt;/div&gt;</summary>
		<author><name>Grunet</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/xds/index.php?title=User:Grunet&amp;diff=2254</id>
		<title>User:Grunet</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/xds/index.php?title=User:Grunet&amp;diff=2254"/>
		<updated>2010-07-09T12:48:30Z</updated>

		<summary type="html">&lt;p&gt;Grunet: Created page with &amp;#039;Tim Gruene, homepage at [http://shelx.uni-ac.gwdg.de/~tg shelx]&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Tim Gruene, homepage at [http://shelx.uni-ac.gwdg.de/~tg shelx]&lt;/div&gt;</summary>
		<author><name>Grunet</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/xds/index.php?title=Generate_XDS.INP&amp;diff=2253</id>
		<title>Generate XDS.INP</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/xds/index.php?title=Generate_XDS.INP&amp;diff=2253"/>
		<updated>2010-07-09T12:41:58Z</updated>

		<summary type="html">&lt;p&gt;Grunet: replaced script with rev. 0.10: setting link to image directory if path is too long.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This script should be in your $PATH as &amp;quot;generate_XDS.INP&amp;quot; . As the name suggests, it generates XDS.INP based on a list of frame names supplied on the commandline.&lt;br /&gt;
Currently works for MarCCD, ADSC and Pilatus 6M detectors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# purpose: generate XDS.INP&lt;br /&gt;
# revision 0.03 . Kay Diederichs 2/2010 &lt;br /&gt;
# revision 0.04 . Kay Diederichs 4/2010 - include alternative ORGX, ORGY calculations for ADSC&lt;br /&gt;
# revision 0.05 . Kay Diederichs 5/2010 - grep for &amp;quot;Corrected&amp;quot; in addition to &amp;quot;marccd&amp;quot;; needed for BESSY &lt;br /&gt;
# revision 0.06 . KD 6/2010 - add UNTRUSTED_RECTANGLE and UNTRUSTED_ELLIPSE; use `whereis catmar` and so on &lt;br /&gt;
# revision 0.07 . KD 6/2010 - decide about ORGX/Y info in MAR header being pixels or mm; other fixes&lt;br /&gt;
# revision 0.08 . KD 6/2010 - fixes for Pilatus 6M&lt;br /&gt;
# revision 0.09 . KD 6/2010 - get rid of requirement for mccd_xdsparams.pl and/or catmar; rather use &amp;quot;od&amp;quot;&lt;br /&gt;
# tested with some datasets from ALS, SSRL, SLS and ESRF; only MARCCD, ADSC/SMV, PILATUS 6M detectors; &lt;br /&gt;
# for other detectors, values marked with XXX must be manually filled in.&lt;br /&gt;
# revision 0.10 . Tim Gruene 7/2010 - set link &#039;images&#039; to image directory if path exceeds 72 characters&lt;br /&gt;
#&lt;br /&gt;
# usage: e.g. generate_XDS.INP &amp;quot;frms/mydata_1_???.img&amp;quot;&lt;br /&gt;
# make sure to have the two quotation marks !&lt;br /&gt;
# the ? are wildcards for the frame numbers.&lt;br /&gt;
#&lt;br /&gt;
# two external programs that can read MAR headers:&lt;br /&gt;
# - for MARCCD detectors the &amp;quot;catmar&amp;quot; binary (which can be downloaded from http://www.marresearch.com/download.html) &lt;br /&gt;
# - the [[mccd_xdsparams.pl]] script (see http://strucbio.biologie.uni-konstanz.de/xdswiki/index.php/Mccd_xdsparams.pl ) &lt;br /&gt;
# &lt;br /&gt;
# limitations:&lt;br /&gt;
# - frame numbers are assumed to start with 1 and run consecutively&lt;br /&gt;
# &lt;br /&gt;
# known problems:&lt;br /&gt;
# - for ADSC detectors, there are at least three ways to obtain ORGX and ORGY values from the header (see below);&lt;br /&gt;
# - the same might be a problem for MAR headers, too (not sure about this)&lt;br /&gt;
#&lt;br /&gt;
# notes for debugging of the script:&lt;br /&gt;
# - add the -v option to the first line, to see where an error occurs&lt;br /&gt;
# - comment out the removal of tmp1 and tmp2 in the last line&lt;br /&gt;
#&lt;br /&gt;
# ====== Start of script ======&lt;br /&gt;
if [ &amp;quot;$1&amp;quot; == &amp;quot;help&amp;quot; ] || [ &amp;quot;$1&amp;quot; == &amp;quot;-help&amp;quot; ] || [ &amp;quot;$1&amp;quot; == &amp;quot;-h&amp;quot; ]; then&lt;br /&gt;
  echo usage: generate_XDS.INP \&amp;quot;frms/mydata_1_???.img\&amp;quot;   \(_with_ the quotation marks!\)&lt;br /&gt;
  exit&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# defaults:&lt;br /&gt;
#&lt;br /&gt;
DETECTOR=&amp;quot;XXX MINIMUM_VALID_PIXEL_VALUE=XXX OVERLOAD=XXX&amp;quot;&lt;br /&gt;
ORGX=XXX&lt;br /&gt;
ORGY=XXX&lt;br /&gt;
DETECTOR_DISTANCE=XXX&lt;br /&gt;
OSCILLATION_RANGE=XXX&lt;br /&gt;
X_RAY_WAVELENGTH=XXX&lt;br /&gt;
&lt;br /&gt;
# see how we are called:&lt;br /&gt;
NAME_TEMPLATE_OF_DATA_FRAMES=&amp;quot;$1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# check that the image template name does not exceed 72 characters&lt;br /&gt;
# and set a link if necessary&lt;br /&gt;
if [ ${#1} -gt 72 ]; then&lt;br /&gt;
    TMP_PATH=$(/bin/ls -C1 $1 | head -1)&lt;br /&gt;
    TMP_FILENAME=$(basename ${TMP_PATH})&lt;br /&gt;
    if [ ${#TMP_FILENAME} -gt 65 ]; then&lt;br /&gt;
	echo &amp;quot;---&amp;gt; Unable to proceed: image filename &amp;quot;&lt;br /&gt;
	echo &amp;quot;---&amp;gt;  \&amp;quot;${TMP_FILENAME}\&amp;quot;&amp;quot;&lt;br /&gt;
        echo &amp;quot;---&amp;gt; exceeds 72 characters.&amp;quot;&lt;br /&gt;
        echo &amp;quot;---&amp;gt; Please rename files or set links.&amp;quot;	&lt;br /&gt;
	exit&lt;br /&gt;
    else&lt;br /&gt;
	echo &amp;quot;---&amp;gt; Warning: Template name exceeds 72 characters. Setting link \&amp;quot;image\&amp;quot;&amp;quot;&lt;br /&gt;
        echo &amp;quot;              to image directory&amp;quot;&lt;br /&gt;
	TMP_DIRNAME=$(dirname ${TMP_PATH})&lt;br /&gt;
	if [ -e &amp;quot;images&amp;quot; ]; then&lt;br /&gt;
	    echo &amp;quot;***  Error:   The file or directory \&amp;quot;images\&amp;quot; already exists. Please remove&amp;quot;&lt;br /&gt;
	    echo &amp;quot;              and re-run.&amp;quot;&lt;br /&gt;
	    exit&lt;br /&gt;
	else&lt;br /&gt;
	    ln -s ${TMP_DIRNAME} images&lt;br /&gt;
	fi&lt;br /&gt;
	NAME_TEMPLATE_OF_DATA_FRAMES=&amp;quot;images/${1##/*/}&amp;quot;&lt;br /&gt;
	echo &amp;quot;              Using template filename \&amp;quot;${NAME_TEMPLATE_OF_DATA_FRAMES}\&amp;quot;&amp;quot;&lt;br /&gt;
    fi&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# list frames matching the wildcards in NAME_TEMPLATE_OF_DATA_FRAMES&lt;br /&gt;
# don&#039;t accept the &amp;quot;direct beam&amp;quot; shot at SLS/Pilatus&lt;br /&gt;
/bin/ls -C1 $1 | grep -v &amp;quot;_00000.cbf&amp;quot; &amp;gt; tmp1 || exit 1&lt;br /&gt;
&lt;br /&gt;
# we can continue - the frames are found&lt;br /&gt;
echo Full documentation, including complete detector templates and XDS binaries, can be found at&lt;br /&gt;
echo http://www.mpimf-heidelberg.mpg.de/~kabsch/xds . More documentation: see XDSwiki&lt;br /&gt;
&lt;br /&gt;
# set upper limit of DATA_RANGE to number of frames (see &amp;quot;limitations&amp;quot; above)&lt;br /&gt;
DATA_RANGE=`wc -l tmp1 | awk &#039;{print $1}&#039;`&lt;br /&gt;
&lt;br /&gt;
# set upper limit of SPOT_RANGE to half of DATA_RANGE, but not less than 1&lt;br /&gt;
SPOT_RANGE=`echo &amp;quot;scale=0; $DATA_RANGE/2&amp;quot; | bc -l`&lt;br /&gt;
SPOT_RANGE=`echo &amp;quot;if ($SPOT_RANGE&amp;lt;1) 1;if ($SPOT_RANGE&amp;gt;1) $SPOT_RANGE&amp;quot; | bc -l`&lt;br /&gt;
&lt;br /&gt;
echo DATA_RANGE=1 $DATA_RANGE&lt;br /&gt;
&lt;br /&gt;
# find out detector type&lt;br /&gt;
DET=XXX&lt;br /&gt;
strings `head -1 tmp1` | egrep -q &#039;marccd|Corrected&#039; &amp;amp;&amp;amp; DET=mccd&lt;br /&gt;
strings `head -1 tmp1` | grep -q PILATUS             &amp;amp;&amp;amp; DET=pilatus&lt;br /&gt;
strings `head -1 tmp1` | grep -q BEAM_CENTER_X       &amp;amp;&amp;amp; DET=adsc&lt;br /&gt;
# identify other detector types in the same way (MAR IP would be straightforward)&lt;br /&gt;
&lt;br /&gt;
# parse ASCII header of first frame&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$DET&amp;quot; == &amp;quot;XXX&amp;quot; ]; then&lt;br /&gt;
  echo &amp;quot;this is not a MAR, ADSC/SMV or PILATUS detector - fill in XXX values manually!&amp;quot;&lt;br /&gt;
  DETECTOR=&amp;quot;XXX MINIMUM_VALID_PIXEL_VALUE=XXX OVERLOAD=XXX&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# find parameters of first frame&lt;br /&gt;
elif [ &amp;quot;$DET&amp;quot; == &amp;quot;mccd&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
  DETECTOR=&amp;quot;CCDCHESS MINIMUM_VALID_PIXEL_VALUE= 1 OVERLOAD= 65500&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  # use first frame of dataset to obtain parameters&lt;br /&gt;
  MARFRAME=`head -1 tmp1`&lt;br /&gt;
&lt;br /&gt;
  # offsets are documented; values can be find in mccd_xdsparams.pl script&lt;br /&gt;
  let SKIP=1024+80&lt;br /&gt;
  NX=$(od -t dI --skip-bytes=$SKIP --read-bytes=4 $MARFRAME | head -1 | awk &#039;{print $2}&#039;)&lt;br /&gt;
  let SKIP=$SKIP+4&lt;br /&gt;
  NY=$(od -t dI --skip-bytes=$SKIP --read-bytes=4 $MARFRAME | head -1 | awk &#039;{print $2}&#039;)&lt;br /&gt;
&lt;br /&gt;
  let SKIP=1024+256+128+256&lt;br /&gt;
  DETECTOR_DISTANCE=$(od -t dI --skip-bytes=$SKIP --read-bytes=4 $MARFRAME | head -1 | awk &#039;{print $2}&#039;)&lt;br /&gt;
  DETECTOR_DISTANCE=`echo &amp;quot;scale=3; $DETECTOR_DISTANCE/1000&amp;quot; | bc -l`&lt;br /&gt;
    &lt;br /&gt;
  let SKIP=$SKIP+4&lt;br /&gt;
  ORGX=$(od -t dI --skip-bytes=$SKIP --read-bytes=4 $MARFRAME | head -1 | awk &#039;{print $2}&#039;)&lt;br /&gt;
  ORGX=`echo &amp;quot;scale=2; $ORGX/1000&amp;quot; | bc -l `&lt;br /&gt;
  let SKIP=$SKIP+4&lt;br /&gt;
  ORGY=$(od -t dI --skip-bytes=$SKIP --read-bytes=4 $MARFRAME | head -1 | awk &#039;{print $2}&#039;)&lt;br /&gt;
  ORGY=`echo &amp;quot;scale=2; $ORGY/1000&amp;quot; | bc -l `&lt;br /&gt;
&lt;br /&gt;
  let SKIP=1024+256+128+256+44&lt;br /&gt;
  PHISTART=$(od -t dI --skip-bytes=$SKIP --read-bytes=4 $MARFRAME | head -1 | awk &#039;{print $2}&#039;)&lt;br /&gt;
  let SKIP=1024+256+128+256+76&lt;br /&gt;
  PHIEND=$(od -t dI --skip-bytes=$SKIP --read-bytes=4 $MARFRAME | head -1 | awk &#039;{print $2}&#039;)&lt;br /&gt;
  OSCILLATION_RANGE=`echo &amp;quot;scale=3; ($PHIEND-$PHISTART)/1000&amp;quot; | bc -l`&lt;br /&gt;
  &lt;br /&gt;
  let SKIP=1024+256+128+256+128+4&lt;br /&gt;
  QX=$(od -t dI --skip-bytes=$SKIP --read-bytes=4 $MARFRAME | head -1 | awk &#039;{print $2}&#039;)&lt;br /&gt;
  QX=`echo &amp;quot;scale=10; $QX/1000000&amp;quot; |bc -l `&lt;br /&gt;
  let SKIP=$SKIP+4&lt;br /&gt;
  QY=$(od -t dI --skip-bytes=$SKIP --read-bytes=4 $MARFRAME | head -1 | awk &#039;{print $2}&#039;)&lt;br /&gt;
  QY=`echo &amp;quot;scale=10; $QY/1000000&amp;quot; |bc -l `&lt;br /&gt;
&lt;br /&gt;
  let SKIP=1024+256+128+256+128+128+12&lt;br /&gt;
  X_RAY_WAVELENGTH=$(od -t dI --skip-bytes=$SKIP --read-bytes=4 $MARFRAME | head -1 | awk &#039;{print $2}&#039;)&lt;br /&gt;
  X_RAY_WAVELENGTH=`echo &amp;quot;scale=5; $X_RAY_WAVELENGTH/100000&amp;quot; | bc -l`&lt;br /&gt;
&lt;br /&gt;
# at most BLs, ORGX and ORGY are in pixels, but sometimes in mm ... guess:&lt;br /&gt;
  NXBYFOUR=`echo &amp;quot;scale=0; $NX/4&amp;quot; | bc -l `&lt;br /&gt;
  ORGXINT=`echo &amp;quot;scale=0; $ORGX/1&amp;quot; | bc -l `&lt;br /&gt;
  if [ $ORGXINT -lt $NXBYFOUR ]; then&lt;br /&gt;
     ORGX=`echo &amp;quot;scale=1; $ORGX/$QX&amp;quot; | bc -l`&lt;br /&gt;
     ORGY=`echo &amp;quot;scale=1; $ORGY/$QY&amp;quot; | bc -l`&lt;br /&gt;
     echo MARCCD detector: header ORGX, ORGY seem to be in mm ... converting to pixels&lt;br /&gt;
  else&lt;br /&gt;
     echo MARCCD detector: header ORGX, ORGY seem to be in pixel units&lt;br /&gt;
  fi&lt;br /&gt;
&lt;br /&gt;
elif [ &amp;quot;$DET&amp;quot; == &amp;quot;adsc&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
  DETECTOR=&amp;quot;ADSC MINIMUM_VALID_PIXEL_VALUE= 1 OVERLOAD= 65000&amp;quot;&lt;br /&gt;
  echo this is an ADSC detector. Obtaining ORGX, ORGY from the header depends on beamline setup.&lt;br /&gt;
  strings `head -1 tmp1` | sed s/\;// &amp;gt; tmp2&lt;br /&gt;
&lt;br /&gt;
      # find X_RAY_WAVELENGTH:&lt;br /&gt;
      X_RAY_WAVELENGTH=`grep WAVELENGTH tmp2 | sed s/WAVELENGTH=//`&lt;br /&gt;
&lt;br /&gt;
      # find NX, QX, ORGX and ORGY:&lt;br /&gt;
      NX=`grep SIZE1 tmp2 | tail -1 | sed s/SIZE1=//`&lt;br /&gt;
      QX=`grep PIXEL_SIZE tmp2 | sed s/PIXEL_SIZE=//`&lt;br /&gt;
      BEAM_CENTER_X=`grep BEAM_CENTER_X tmp2 | sed s/BEAM_CENTER_X=//`&lt;br /&gt;
      BEAM_CENTER_Y=`grep BEAM_CENTER_Y tmp2 | sed s/BEAM_CENTER_Y=//`&lt;br /&gt;
# fix 2010-04-26 - tell user about possible ORGX, ORGY alternatives -  &lt;br /&gt;
# at ESRF and ... (pls fill in!) the following should be used:&lt;br /&gt;
      ORGX=`echo &amp;quot;scale=1; $BEAM_CENTER_Y/$QX&amp;quot; | bc -l `&lt;br /&gt;
      ORGY=`echo &amp;quot;scale=1; $BEAM_CENTER_X/$QX&amp;quot; | bc -l `&lt;br /&gt;
      echo ATTENTION: at ESRF BLs use: ORGX=$ORGX ORGY=$ORGY &lt;br /&gt;
# this 2nd alternative convention should be used at the following beamlines (pls complete the list): ALS 5.0.3, ...&lt;br /&gt;
      ORGX=`echo &amp;quot;scale=1; $NX-$BEAM_CENTER_X/$QX&amp;quot; | bc -l `&lt;br /&gt;
      ORGY=`echo &amp;quot;scale=1; $BEAM_CENTER_Y/$QX&amp;quot; | bc -l `&lt;br /&gt;
      echo ATTENTION: at e.g. ALS 5.0.3 use: ORGX=$ORGX ORGY=$ORGY &lt;br /&gt;
# this 3rd alternative convention should be used at the following beamlines (pls complete the list): ALS 8.2.2, ... &lt;br /&gt;
      ORGX=`echo &amp;quot;scale=1; $BEAM_CENTER_X/$QX&amp;quot; | bc -l `&lt;br /&gt;
      ORGY=`echo &amp;quot;scale=1; $NX-$BEAM_CENTER_Y/$QX&amp;quot; | bc -l `&lt;br /&gt;
      echo ATTENTION: at e.g. ALS 8.2.2 use: ORGX=$ORGX ORGY=$ORGY - this is now written to XDS.INP&lt;br /&gt;
# the latter alternative is written into the generated XDS.INP ! You have to correct this manually in XDS.INP, or adjust this script.&lt;br /&gt;
      # find DETECTOR_DISTANCE and OSCILLATION_RANGE:&lt;br /&gt;
      DETECTOR_DISTANCE=`grep DISTANCE tmp2 | sed s/DISTANCE=//`&lt;br /&gt;
      OSCILLATION_RANGE=`grep OSC_RANGE tmp2 | sed s/OSC_RANGE=//`&lt;br /&gt;
&lt;br /&gt;
elif [ &amp;quot;$DET&amp;quot; == &amp;quot;pilatus&amp;quot; ]; then&lt;br /&gt;
  DETECTOR=&amp;quot;PILATUS MINIMUM_VALID_PIXEL_VALUE=0 OVERLOAD= 1048576 QX=0.172 QY=0.172 !PILATUS 6M&amp;quot;&lt;br /&gt;
  echo this is a Pilatus detector&lt;br /&gt;
  head -50 `head -1 tmp1` | sed s/#//&amp;gt; tmp2&lt;br /&gt;
&lt;br /&gt;
      # find X_RAY_WAVELENGTH:&lt;br /&gt;
      X_RAY_WAVELENGTH=`grep Wavelength tmp2 | sed -e s/Wavelength// -e s/A// | awk &#039;{print $1}&#039;`&lt;br /&gt;
&lt;br /&gt;
      # find ORGX and ORGY:&lt;br /&gt;
      ORGX=`grep Beam_xy tmp2 | sed -e s/\(// -e s/\)// -e s/\,// | awk &#039;{print $2}&#039;`&lt;br /&gt;
      ORGY=`grep Beam_xy tmp2 | sed -e s/\(// -e s/\)// -e s/\,// | awk &#039;{print $3}&#039;`&lt;br /&gt;
&lt;br /&gt;
      # find DETECTOR_DISTANCE and OSCILLATION_RANGE:&lt;br /&gt;
      DETECTOR_DISTANCE=`awk &#039;/distance/{print $2}&#039; tmp2`&lt;br /&gt;
      DETECTOR_DISTANCE=`echo &amp;quot;$DETECTOR_DISTANCE*1000&amp;quot; | bc -l`&lt;br /&gt;
&lt;br /&gt;
      OSCILLATION_RANGE=`awk &#039;/Angle/{print $2}&#039; tmp2`&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
  echo should never come here&lt;br /&gt;
  exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo ORGX= $ORGX ORGY= $ORGY - check these values with adxv !&lt;br /&gt;
echo DETECTOR_DISTANCE= $DETECTOR_DISTANCE&lt;br /&gt;
echo OSCILLATION_RANGE= $OSCILLATION_RANGE&lt;br /&gt;
echo X-RAY_WAVELENGTH= $X_RAY_WAVELENGTH&lt;br /&gt;
&lt;br /&gt;
# now we know everything that is required to generate XDS.INP&lt;br /&gt;
&lt;br /&gt;
cat &amp;gt; XDS.INP &amp;lt;&amp;lt; eof&lt;br /&gt;
JOB= XYCORR INIT COLSPOT IDXREF DEFPIX INTEGRATE CORRECT&lt;br /&gt;
ORGX= $ORGX ORGY= $ORGY  ! check these values with adxv !&lt;br /&gt;
DETECTOR_DISTANCE= $DETECTOR_DISTANCE&lt;br /&gt;
OSCILLATION_RANGE= $OSCILLATION_RANGE&lt;br /&gt;
X-RAY_WAVELENGTH= $X_RAY_WAVELENGTH&lt;br /&gt;
NAME_TEMPLATE_OF_DATA_FRAMES=$NAME_TEMPLATE_OF_DATA_FRAMES&lt;br /&gt;
! REFERENCE_DATA_SET=xxx/XDS_ASCII.HKL ! e.g. to ensure consistent indexing  &lt;br /&gt;
DATA_RANGE=1 $DATA_RANGE&lt;br /&gt;
SPOT_RANGE=1 $SPOT_RANGE&lt;br /&gt;
! BACKGROUND_RANGE=1 10 ! rather use defaults (first 5 degree of rotation)&lt;br /&gt;
&lt;br /&gt;
SPACE_GROUP_NUMBER=0                   ! 0 if unknown&lt;br /&gt;
UNIT_CELL_CONSTANTS= 70 80 90 90 90 90 ! put correct values if known&lt;br /&gt;
INCLUDE_RESOLUTION_RANGE=50 0  ! after CORRECT, insert high resol limit; re-run CORRECT&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FRIEDEL&#039;S_LAW=FALSE     ! This acts only on the CORRECT step&lt;br /&gt;
! If the anom signal turns out to be, or is known to be, very low or absent,&lt;br /&gt;
! use FRIEDEL&#039;S_LAW=TRUE instead (or comment out the line); re-run CORRECT&lt;br /&gt;
&lt;br /&gt;
! remove the &amp;quot;!&amp;quot; in the following line:&lt;br /&gt;
! STRICT_ABSORPTION_CORRECTION=TRUE&lt;br /&gt;
! if the anomalous signal is strong: in that case, in CORRECT.LP the three&lt;br /&gt;
! &amp;quot;CHI^2-VALUE OF FIT OF CORRECTION FACTORS&amp;quot; values are significantly&amp;gt; 1, e.g. 1.5&lt;br /&gt;
!&lt;br /&gt;
! exclude (mask) untrusted areas of detector, e.g. beamstop shadow :&lt;br /&gt;
! UNTRUSTED_RECTANGLE= 1800 1950 2100 2150 ! x-min x-max y-min y-max ! repeat&lt;br /&gt;
! UNTRUSTED_ELLIPSE= 2034 2070 1850 2240 ! x-min x-max y-min y-max ! if needed&lt;br /&gt;
!&lt;br /&gt;
! parameters with changes wrt default values:&lt;br /&gt;
TRUSTED_REGION=0.00 1.2  ! partially use corners of detectors; 1.41421=full use&lt;br /&gt;
VALUE_RANGE_FOR_TRUSTED_DETECTOR_PIXELS=7000. 30000. ! often 8000 is ok&lt;br /&gt;
MINIMUM_ZETA=0.05        ! integrate close to the Lorentz zone; 0.15 is default&lt;br /&gt;
STRONG_PIXEL=6           ! COLSPOT: only use strong reflections (default is 3)&lt;br /&gt;
REFINE(INTEGRATE)=CELL BEAM ORIENTATION ! AXIS DISTANCE &lt;br /&gt;
&lt;br /&gt;
! parameters specifically for this detector and beamline:&lt;br /&gt;
DETECTOR= $DETECTOR&lt;br /&gt;
!NX= 3072 NY= 3072  QX= 0.10260  QY= 0.10260 ! XDS finds this out by itself (not for Pilatus)&lt;br /&gt;
DIRECTION_OF_DETECTOR_X-AXIS=1 0 0&lt;br /&gt;
DIRECTION_OF_DETECTOR_Y-AXIS=0 1 0&lt;br /&gt;
INCIDENT_BEAM_DIRECTION=0 0 1&lt;br /&gt;
ROTATION_AXIS=1 0 0    ! at e.g. SERCAT ID-22 this needs to be -1 0 0&lt;br /&gt;
FRACTION_OF_POLARIZATION=0.98   ! better value is provided by beamline staff!&lt;br /&gt;
POLARIZATION_PLANE_NORMAL=0 1 0&lt;br /&gt;
eof&lt;br /&gt;
echo XDS.INP is ready for use. The file has only the most important keywords.&lt;br /&gt;
echo After running xds, inspect at least BKGPIX.cbf and FRAME.cbf with XDS-Viewer!&lt;br /&gt;
rm -f tmp1 tmp2 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Grunet</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/xds/index.php?title=Tutorial(First_Steps)&amp;diff=2117</id>
		<title>Tutorial(First Steps)</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/xds/index.php?title=Tutorial(First_Steps)&amp;diff=2117"/>
		<updated>2009-07-02T23:22:06Z</updated>

		<summary type="html">&lt;p&gt;Grunet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= A beginner&#039;s walk-through to XDS =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This page is under development. If you think it might be useful to you and worth completing faster, why not simply bother the author by sending him and email?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tutorial is directed at people who are beginners to XDS and do not want to start reading about all the technical details but rather want their images processed. Other processing programs are often more attractive to new users because using a GUI make starting easier than a [[XDS.INP|script file]]. If you notice a mistake or gap in this tutorial, please contact the authors.&lt;br /&gt;
&lt;br /&gt;
== Setting up ==&lt;br /&gt;
=== Image Location ===&lt;br /&gt;
&lt;br /&gt;
It is not recommended to process the images from within the same directory as the images are. At least create a subdirectory. In many cases the data images are on an external disk or remotely mounted directory with an awfully long path name.&lt;br /&gt;
If you images are &amp;quot;/some/where/with/a/very/long/path&amp;quot;, [[XDS.INP]] may not find the images and one must create a link to the actual directory. &lt;br /&gt;
&amp;lt;pre&amp;gt; #&amp;gt; ln -s /some/where/with/a/very/long/path images &amp;lt;/pre&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Getting [[XDS.INP]] ===&lt;br /&gt;
You must know the type of detector your data were collected on. Then visit the [http://www.mpimf-heidelberg.mpg.de/~kabsch/xds/html_doc/xds_prepare.html|XDS Homepage], download the appropriate template and rename it to [[XDS.INP]].&lt;br /&gt;
&lt;br /&gt;
== Editing [[XDS.INP]] ==&lt;br /&gt;
This tutorial uses the template for XDS-MARCCD.INP.&lt;br /&gt;
&lt;br /&gt;
Open [[XDS.INP]] with your favourite text editor (e.g. gedit, kate, kwrite, vim, emacs...) and make the following adjustments (from top to bottom): &lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Pixel Size&#039;&#039;&#039;  Find out the number of pixels of your detector. A very good program to find aus is [http://www.scripps.edu/~arvai/adxv.html adxv]: It allows to view the image header where these numbers often can be found. [[Image:Adxv_menu.jpeg|100px|adxv image viewer, main menu]] [[Image:Adxv_pixelsize.jpeg|100px|adxv showing image header info. Pixel size is highlighted]]&lt;br /&gt;
# &#039;&#039;&#039;Adjusting JOB Card&#039;&#039;&#039; Make a copy of the &#039;&#039;&#039;JOB&#039;&#039;&#039; line in [[XDS.INP]] for reference. Comment out one line by putting a exclamation mark &amp;quot;!&amp;quot; at the beginning of the line and prepare the other one to run the steps from XYCORR to CORRECT.[[Image:XDS_INP_adjustingJOB.jpeg|200px|Adjusting the JOB card in XDS.INP]]&lt;br /&gt;
# &#039;&#039;&#039;ORGX and ORGY&#039;&#039;&#039; Unless you can guess the direct beam position on the images, &#039;&#039;e.g.&#039;&#039; from ice rings, set both these values to half the detector size. In the case of this example, where the MAR-CCD is 3072x3072 pixels, this means&lt;br /&gt;
  ORGX=1536.00 ORGY=1536.00  !Detector origin (pixels).&lt;br /&gt;
#&#039;&#039;&#039;Experiment specific settings&#039;&#039;&#039; The following numbers are also usually found in the image header:&lt;br /&gt;
 DETECTOR_DISTANCE= 150.0   !(mm)&lt;br /&gt;
 OSCILLATION_RANGE=1.0            !degrees (&amp;gt;0)&lt;br /&gt;
 X-RAY_WAVELENGTH=1.07176         !Angstroem&lt;br /&gt;
 NAME_TEMPLATE_OF_DATA_FRAMES=./images/tutorial_????.img  ! TIFF&lt;br /&gt;
 DATA_RANGE=1  180    !Numbers of first and last data image collected&lt;br /&gt;
#&#039;&#039;&#039;Background range&#039;&#039;&#039; The default template suggests to use the first 5 images for detecting the average background per image. It does not harm to increase this number to 20 images. Especially with frame width of less than 1 degree you should do this.&lt;br /&gt;
 BACKGROUND_RANGE=1 20  !Numbers of first and last data image for background&lt;br /&gt;
&lt;br /&gt;
This is it to start. type &amp;lt;pre&amp;gt;#&amp;gt; xds_par &amp;lt;/pre&amp;gt; to run xds and wait until it&#039;s finished.&lt;br /&gt;
&lt;br /&gt;
== Indexing Fails ==&lt;br /&gt;
If the detector origin is too far from the image centre, IDXREF is going to stop with the error message&lt;br /&gt;
 !!! ERROR !!! SOLUTION IS INACCURATE&lt;br /&gt;
Do the following:&lt;br /&gt;
# In IDXREF.LP, find the table &#039;&#039;&#039;INDEXING OF OBSERVED SPOTS IN SPACE GROUP&#039;&#039;&#039;&lt;br /&gt;
 ***** INDEXING OF OBSERVED SPOTS IN SPACE GROUP #   1 *****&lt;br /&gt;
   16196 OUT OF   76452 SPOTS INDEXED.&lt;br /&gt;
       0 REJECTED REFLECTIONS (REASON: OVERLAP)&lt;br /&gt;
   60256 REJECTED REFLECTIONS (REASON: TOO FAR FROM IDEAL POSITION)&lt;br /&gt;
 EXPECTED ERROR IN SPINDLE  POSITION     2.398 DEGREES&lt;br /&gt;
 EXPECTED ERROR IN DETECTOR POSITION      1.72 PIXELS&lt;br /&gt;
Unless really hardly any reflections could be indexed (second line in the table), scroll a few lines up and copy the refined values for the beam origin&lt;br /&gt;
 DETECTOR ORIGIN (PIXELS) AT                     1514.16   1537.27&lt;br /&gt;
as improved ORGX and ORGY to [[XDS.INP]] and try indexing again.&lt;br /&gt;
XDS is quite robust and in many cases this approach works&lt;br /&gt;
# Check the refined detector distance&lt;br /&gt;
 DETECTOR ORIGIN (PIXELS) AT                     1514.16   1537.27&lt;br /&gt;
 CRYSTAL TO DETECTOR DISTANCE (mm)       422.92    &lt;br /&gt;
If it deviates by more than 1-2mm from the input distance, check all you parameters again. Is the wavelength really correct, as well as the distance? If you are sure about them, try indexing with only a few images&lt;br /&gt;
 SPOT_RANGE = 1 20&lt;/div&gt;</summary>
		<author><name>Grunet</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/xds/index.php?title=Tutorial(First_Steps)&amp;diff=2116</id>
		<title>Tutorial(First Steps)</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/xds/index.php?title=Tutorial(First_Steps)&amp;diff=2116"/>
		<updated>2009-07-02T23:13:22Z</updated>

		<summary type="html">&lt;p&gt;Grunet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= A beginner&#039;s walk-through to XDS =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This page is under development. If you think it might be useful to you and worth completing faster, why not simply bother the author by sending him and email?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tutorial is directed at people who are beginners to XDS and do not want to start reading about all the technical details but rather want their images processed. Other processing programs are often more attractive to new users because using a GUI make starting easier than a [[XDS.INP|script file]]. If you notice a mistake or gap in this tutorial, please contact the authors.&lt;br /&gt;
&lt;br /&gt;
== Setting up ==&lt;br /&gt;
=== Image Location ===&lt;br /&gt;
&lt;br /&gt;
It is not recommended to process the images from within the same directory as the images are. At least create a subdirectory. In many cases the data images are on an external disk or remotely mounted directory with an awfully long path name.&lt;br /&gt;
If you images are &amp;quot;/some/where/with/a/very/long/path&amp;quot;, [[XDS.INP]] may not find the images and one must create a link to the actual directory. &lt;br /&gt;
&amp;lt;pre&amp;gt; #&amp;gt; ln -s /some/where/with/a/very/long/path images &amp;lt;/pre&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Getting [[XDS.INP]] ===&lt;br /&gt;
You must know the type of detector your data were collected on. Then visit the [http://www.mpimf-heidelberg.mpg.de/~kabsch/xds/html_doc/xds_prepare.html|XDS Homepage], download the appropriate template and rename it to [[XDS.INP]].&lt;br /&gt;
&lt;br /&gt;
== Editing [[XDS.INP]] ==&lt;br /&gt;
This tutorial uses the template for XDS-MARCCD.INP.&lt;br /&gt;
&lt;br /&gt;
Open [[XDS.INP]] with your favourite text editor (e.g. gedit, kate, kwrite, vim, emacs...) and make the following adjustments (from top to bottom): &lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Pixel Size&#039;&#039;&#039;  Find out the number of pixels of your detector. A very good program to find aus is [http://www.scripps.edu/~arvai/adxv.html adxv]: It allows to view the image header where these numbers often can be found. [[Image:Adxv_menu.jpeg|100px|adxv image viewer, main menu]] [[Image:Adxv_pixelsize.jpeg|100px|adxv showing image header info. Pixel size is highlighted]]&lt;br /&gt;
# &#039;&#039;&#039;Adjusting JOB Card&#039;&#039;&#039; Make a copy of the &#039;&#039;&#039;JOB&#039;&#039;&#039; line in [[XDS.INP]] for reference. Comment out one line by putting a exclamation mark &amp;quot;!&amp;quot; at the beginning of the line and prepare the other one to run the steps from XYCORR to CORRECT.[[Image:XDS_INP_adjustingJOB.jpeg|200px|Adjusting the JOB card in XDS.INP]]&lt;br /&gt;
# &#039;&#039;&#039;ORGX and ORGY&#039;&#039;&#039; Unless you can guess the direct beam position on the images, &#039;&#039;e.g.&#039;&#039; from ice rings, set both these values to half the detector size. In the case of this example, where the MAR-CCD is 3072x3072 pixels, this means&lt;br /&gt;
  ORGX=1536.00 ORGY=1536.00  !Detector origin (pixels).&lt;br /&gt;
#&#039;&#039;&#039;Experiment specific settings&#039;&#039;&#039; The following numbers are also usually found in the image header:&lt;br /&gt;
 DETECTOR_DISTANCE= 150.0   !(mm)&lt;br /&gt;
 OSCILLATION_RANGE=1.0            !degrees (&amp;gt;0)&lt;br /&gt;
 X-RAY_WAVELENGTH=1.07176         !Angstroem&lt;br /&gt;
 NAME_TEMPLATE_OF_DATA_FRAMES=./images/tutorial_????.img  ! TIFF&lt;br /&gt;
 DATA_RANGE=1  180    !Numbers of first and last data image collected&lt;br /&gt;
#&#039;&#039;&#039;Background range&#039;&#039;&#039; The default template suggests to use the first 5 images for detecting the average background per image. It does not harm to increase this number to 20 images. Especially with frame width of less than 1 degree you should do this.&lt;br /&gt;
 BACKGROUND_RANGE=1 20  !Numbers of first and last data image for background&lt;br /&gt;
&lt;br /&gt;
This is it to start. type &amp;lt;pre&amp;gt;#&amp;gt; xds_par &amp;lt;/pre&amp;gt; to run xds and wait until it&#039;s finished.&lt;br /&gt;
&lt;br /&gt;
== Indexing Fails ==&lt;br /&gt;
If the detector origin is too far from the image centre, IDXREF is going to stop with the error message&lt;br /&gt;
 !!! ERROR !!! SOLUTION IS INACCURATE&lt;br /&gt;
Do the following:&lt;br /&gt;
&amp;lt;source lang=fortran&amp;gt;&lt;br /&gt;
# In IDXREF.LP, find the table &#039;&#039;&#039;INDEXING OF OBSERVED SPOTS IN SPACE GROUP&#039;&#039;&#039;&lt;br /&gt;
 ***** INDEXING OF OBSERVED SPOTS IN SPACE GROUP #   1 *****&lt;br /&gt;
   16196 OUT OF   76452 SPOTS INDEXED.&lt;br /&gt;
       0 REJECTED REFLECTIONS (REASON: OVERLAP)&lt;br /&gt;
   60256 REJECTED REFLECTIONS (REASON: TOO FAR FROM IDEAL POSITION)&lt;br /&gt;
 EXPECTED ERROR IN SPINDLE  POSITION     2.398 DEGREES&lt;br /&gt;
 EXPECTED ERROR IN DETECTOR POSITION      1.72 PIXELS&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Unless really hardly any reflections could be indexed (second line in the table), scroll a few lines up and copy the refined values for the beam origin&lt;br /&gt;
 DETECTOR ORIGIN (PIXELS) AT                     1514.16   1537.27&lt;br /&gt;
as improved ORGX and ORGY to [[XDS.INP]] and try indexing again.&lt;br /&gt;
XDS is quite robust and in many cases this approach works&lt;br /&gt;
# Check the refined detector distance&lt;br /&gt;
 DETECTOR ORIGIN (PIXELS) AT                     1514.16   1537.27&lt;br /&gt;
 CRYSTAL TO DETECTOR DISTANCE (mm)       422.92    &lt;br /&gt;
If it deviates by more than 1-2mm from the input distance, check all you parameters again. Is the wavelength really correct, as well as the distance? If you are sure about them, try indexing with only a few images&lt;br /&gt;
 SPOT_RANGE = 1 20&lt;/div&gt;</summary>
		<author><name>Grunet</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/xds/index.php?title=Tutorial(First_Steps)&amp;diff=2080</id>
		<title>Tutorial(First Steps)</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/xds/index.php?title=Tutorial(First_Steps)&amp;diff=2080"/>
		<updated>2009-06-28T16:04:33Z</updated>

		<summary type="html">&lt;p&gt;Grunet: New page: = A beginner&amp;#039;s walk-through to XDS =  &amp;#039;&amp;#039;This page is under development. If you think it might be useful to you and worth completing faster, why not simply bother the author by sending him ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= A beginner&#039;s walk-through to XDS =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This page is under development. If you think it might be useful to you and worth completing faster, why not simply bother the author by sending him and email?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tutorial is directed at people who are beginners to XDS and do not want to start reading about all the technical details but rather want their images processed. Other processing programs are often more attractive to new users because using a GUI make starting easier than a [[XDS.INP|script file]]. If you notice a mistake or gap in this tutorial, please contact the authors.&lt;br /&gt;
&lt;br /&gt;
== Setting up ==&lt;br /&gt;
=== Image Location ===&lt;br /&gt;
&lt;br /&gt;
It is not recommended to process the images from within the same directory as the images are. At least create a subdirectory. In many cases the data images are on an external disk or remotely mounted directory with an awfully long path name.&lt;br /&gt;
If you images are &amp;quot;/some/where/with/a/very/long/path&amp;quot;, [[XDS.INP]] may not find the images and one must create a link to the actual directory. &lt;br /&gt;
&amp;lt;pre&amp;gt; #&amp;gt; ln -s /some/where/with/a/very/long/path images &amp;lt;/pre&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Getting [[XDS.INP]] ===&lt;br /&gt;
You must know the type of detector your data were collected on. Then visit the [http://www.mpimf-heidelberg.mpg.de/~kabsch/xds/html_doc/xds_prepare.html|XDS Homepage], download the appropriate template and rename it to [[XDS.INP]].&lt;br /&gt;
&lt;br /&gt;
== Editing [[XDS.INP]] ==&lt;br /&gt;
This tutorial uses the template for XDS-MARCCD.INP.&lt;br /&gt;
&lt;br /&gt;
Open [[XDS.INP]] with your favourite text editor (e.g. gedit, kate, kwrite, vim, emacs...) and make the following adjustments (from top to bottom): &lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Pixel Size&#039;&#039;&#039;  Find out the number of pixels of your detector. A very good program to find aus is [http://www.scripps.edu/~arvai/adxv.html adxv]: It allows to view the image header where these numbers often can be found. [[Image:Adxv_menu.jpeg|100px|adxv image viewer, main menu]] [[Image:Adxv_pixelsize.jpeg|100px|adxv showing image header info. Pixel size is highlighted]]&lt;br /&gt;
# &#039;&#039;&#039;Adjusting JOB Card&#039;&#039;&#039; Make a copy of the &#039;&#039;&#039;JOB&#039;&#039;&#039; line in [[XDS.INP]] for reference. Comment out one line by putting a exclamation mark &amp;quot;!&amp;quot; at the beginning of the line and prepare the other one to run the steps from XYCORR to CORRECT.[[Image:XDS_INP_adjustingJOB.jpeg|200px|Adjusting the JOB card in XDS.INP]]&lt;br /&gt;
# &#039;&#039;&#039;ORGX and ORGY&#039;&#039;&#039; Unless you can guess the direct beam position on the images, &#039;&#039;e.g.&#039;&#039; from ice rings, set both these values to half the detector size. In the case of this example, where the MAR-CCD is 3072x3072 pixels, this means&lt;br /&gt;
  ORGX=1536.00 ORGY=1536.00  !Detector origin (pixels).&lt;br /&gt;
#&#039;&#039;&#039;Experiment specific settings&#039;&#039;&#039; The following numbers are also usually found in the image header:&lt;br /&gt;
 DETECTOR_DISTANCE= 150.0   !(mm)&lt;br /&gt;
 OSCILLATION_RANGE=1.0            !degrees (&amp;gt;0)&lt;br /&gt;
 X-RAY_WAVELENGTH=1.07176         !Angstroem&lt;br /&gt;
 NAME_TEMPLATE_OF_DATA_FRAMES=./images/tutorial_????.img  ! TIFF&lt;br /&gt;
 DATA_RANGE=1  180    !Numbers of first and last data image collected&lt;br /&gt;
#&#039;&#039;&#039;Background range&#039;&#039;&#039; The default template suggests to use the first 5 images for detecting the average background per image. It does not harm to increase this number to 20 images. Especially with frame width of less than 1 degree you should do this.&lt;br /&gt;
 BACKGROUND_RANGE=1 20  !Numbers of first and last data image for background&lt;br /&gt;
&lt;br /&gt;
This is it to start. type &amp;lt;pre&amp;gt;#&amp;gt; xds_par &amp;lt;/pre&amp;gt; to run xds and wait until it&#039;s finished.&lt;/div&gt;</summary>
		<author><name>Grunet</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/xds/index.php?title=File:XDS_INP_adjustingJOB.jpeg&amp;diff=2079</id>
		<title>File:XDS INP adjustingJOB.jpeg</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/xds/index.php?title=File:XDS_INP_adjustingJOB.jpeg&amp;diff=2079"/>
		<updated>2009-06-28T15:25:49Z</updated>

		<summary type="html">&lt;p&gt;Grunet: XDS.INP file being edited with vim, looking at the &amp;#039;JOB&amp;#039; Card.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;XDS.INP file being edited with vim, looking at the &#039;JOB&#039; Card.&lt;/div&gt;</summary>
		<author><name>Grunet</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/xds/index.php?title=File:Adxv_pixelsize.jpeg&amp;diff=2078</id>
		<title>File:Adxv pixelsize.jpeg</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/xds/index.php?title=File:Adxv_pixelsize.jpeg&amp;diff=2078"/>
		<updated>2009-06-28T15:19:27Z</updated>

		<summary type="html">&lt;p&gt;Grunet: screenshot from adxv image header with pixel size highlighted.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;screenshot from adxv image header with pixel size highlighted.&lt;/div&gt;</summary>
		<author><name>Grunet</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/xds/index.php?title=File:Adxv_menu.jpeg&amp;diff=2077</id>
		<title>File:Adxv menu.jpeg</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/xds/index.php?title=File:Adxv_menu.jpeg&amp;diff=2077"/>
		<updated>2009-06-28T15:17:55Z</updated>

		<summary type="html">&lt;p&gt;Grunet: Screen shot from ADXV image viewer with menu to view image header.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Screen shot from ADXV image viewer with menu to view image header.&lt;/div&gt;</summary>
		<author><name>Grunet</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/xds/index.php?title=Topics&amp;diff=2076</id>
		<title>Topics</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/xds/index.php?title=Topics&amp;diff=2076"/>
		<updated>2009-06-28T14:49:44Z</updated>

		<summary type="html">&lt;p&gt;Grunet: /* Using XDS */  added link to tutorial&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Programs ==&lt;br /&gt;
* [[XDS]]&lt;br /&gt;
* [[XSCALE]]&lt;br /&gt;
* [[XDSCONV]]&lt;br /&gt;
* [[VIEW]]&lt;br /&gt;
* [[XDSSTAT]] (this is not part of the XDS package)&lt;br /&gt;
* [[Jiffies]] (little helpful scripts)&lt;br /&gt;
* [[SIM_MX]] (this is not part of the XDS package)&lt;br /&gt;
* [[adxv]] (this is not part of the XDS package)&lt;br /&gt;
&lt;br /&gt;
== Using XDS ==&lt;br /&gt;
* [[XDS.INP]]&lt;br /&gt;
* [[Tutorial(First_Steps)|Tutorial]] Quick beginner&#039;s walk-through if you just want to get going.&lt;br /&gt;
* [[Processing]]&lt;br /&gt;
* [[IDXREF]] with subtopics [[Obtaining ORGX ORGY]], [[Ice rings]], [[Indexing]], [[Reindexing]]&lt;br /&gt;
* [[CORRECT]], see also [[Reindexing]]&lt;br /&gt;
&lt;br /&gt;
== Typical procedures ==&lt;br /&gt;
* [[Space group determination]], see also [[Reindexing]] and [[Indexing]]&lt;br /&gt;
* [[Optimization]], subtopics [[MINIMUM_ZETA]], [[Aliens]], see also [[Ice rings]]&lt;br /&gt;
* [[Determining VALUE_RANGE_FOR_TRUSTED_DETECTOR_PIXELS]]&lt;br /&gt;
* [[Tips and Tricks]]&lt;br /&gt;
* [[Scaling with SCALA]]&lt;br /&gt;
&lt;br /&gt;
== XDS development ==&lt;br /&gt;
* [[INTEGRATE]] - how does INTEGRATE work?&lt;br /&gt;
* [[Quality Control]]&lt;br /&gt;
* [[Known Bugs]]&lt;br /&gt;
* [[Wishlist]]&lt;br /&gt;
* [[Features that are not officially documented]]&lt;br /&gt;
&lt;br /&gt;
== external Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.ccp4.ac.uk/xia/ xia2] Automated Data Reduction&lt;/div&gt;</summary>
		<author><name>Grunet</name></author>
	</entry>
</feed>