<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Tutorial</title><link>https://sourceforge.net/p/pyanpha/wiki/Tutorial/</link><description>Recent changes to Tutorial</description><atom:link href="https://sourceforge.net/p/pyanpha/wiki/Tutorial/feed" rel="self"/><language>en</language><lastBuildDate>Tue, 06 Mar 2012 13:14:58 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/pyanpha/wiki/Tutorial/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage Tutorial modified by Materials Science</title><link>https://sourceforge.net/p/pyanpha/wiki/Tutorial/</link><description>&lt;pre&gt;--- v23 
+++ v24 
@@ -27,70 +27,72 @@
 &gt; OB1  O2m 0.500 0.000 0.000 1.00 0.00927
 &gt; OB2  O2m 0.500 0.500 0.500 1.00 0.00927
 &gt; OB3  O2m 0.000 0.500 0.000 1.00 0.00927&lt;/pre&gt;
+
 Lastly, you can provide a config file (&lt;code&gt;.cfg&lt;/code&gt;). This is not necessary and can also be generated within the program, or you can change the file &lt;code&gt;user_vars_template.cfg&lt;/code&gt; in the root directory for your purpose. In [section 4.1](Program Source/#types), all the parameters within the config file are described one-by-one. We start here without predefining a config file.
 
 &lt;h4 id="phases"&gt; 2.2 Get the phases &lt;/h4&gt;
 You now have all the required input and you are ready to start with your analysis. Open a shell and enter &lt;code&gt;$ python pyanpha.py&lt;/code&gt;. In the main menu enter &lt;code&gt;&gt;&gt; z&lt;/code&gt; and change to your project directory. Next enter &lt;code&gt;&gt;&gt; c&lt;/code&gt; to enter the menu system to calculate the phases. Now we will set up the config file for the phase calculation. Enter &lt;code&gt;&gt;&gt; e&lt;/code&gt; and provide all the information for your sample. Below is our input shown. Not all the fields asked need an input at this time and can just be returned blank. First you need to provide the three files which have been
 prepared in the last section:
 
 &gt; &lt;code&gt;Bulkfilename (’bulk.atm’) : bulk.atm
 &gt; Anomfilename (’anom.atm’) : anom.atm
 &gt; Datafilename (’ctrs.dat’) : data.dat&lt;/code&gt;
 
 Afterwards, the unit cell parameters are defined. In our tutorial, we have a cubic system:
 
 &gt; &lt;code&gt;a (3.9045) : 3.8
 &gt; b (3.9045) : 3.8
 &gt; c (3.9045) : 3.8
 &gt; alp (90.000000) : 90
 &gt; bet (90.000000) : 90
 &gt; gam (90.000000) : 90&lt;/code&gt;
 
 Then you have to enter the three energies, which belong to *I&lt;sub&gt;n&lt;/sub&gt;*, *I&lt;sub&gt;a&lt;/sub&gt;*, and *I&lt;sub&gt;b&lt;/sub&gt;*. For the tutorial datafile, we have recorded around the Sr edge at 16.105 keV.
 
 &gt; &lt;code&gt;E_n (16.00) : 16.0
 &gt; E_a (16.11) : 16.11
 &gt; E_b (16.50) : 16.5&lt;/code&gt;
 
 The incidence angle is then requested:
 
 &gt; &lt;code&gt;\[Instrument\]
 &gt; Incidence angle (0.500000) : 1.0&lt;/code&gt;
 
 Next some information on the anomalous scatterer is defined. It does not matter, if you have entered a different ion in the anomalous atom-file than you enter here. It also asks you to specify *f′* and *f′′*, the energy dependent part of the form factor of your specified element. If you made a measurement of them, you can enter them here. If you leave it as zeros, it will use the tabulated values.
 
 &gt; &lt;code&gt;Anomalous Atom (’Sr’) : Sr
 &gt; Measured anomalous form factor of Sr
 &gt; f1, f2 @ 16.00(’0.0, 0.0’) :
 &gt; f1, f2 @ 16.11(’0.0, 0.0’) :
 &gt; f1, f2 @ 16.50(’0.0, 0.0’) :&lt;/code&gt;
 
 Lastly you have to provide an output filename for the phase-file (&lt;code&gt;.phs&lt;/code&gt;).
 
 &gt;  &lt;code&gt;Filename (’data.phs’): data.phs&lt;/code&gt;
 
 Now you can run the phase calculation by typing  &lt;code&gt;&gt;&gt; r&lt;/code&gt; and it will produce the phase-file.
 
 &lt;h4 id="ed"&gt; 2.3 From phases to electron density &lt;/h4&gt;
 The resulting file &lt;code&gt;data.phs&lt;/code&gt; contains the *h*, *k*, and *l* indices and the amplitude and phase of the surface structure factors, which *pyanpha* was able to retrieve. With this file we can now calculate the electron density (ED). Go back to the root-menu and enter &lt;code&gt;&gt;&gt; e&lt;/code&gt;. You are now in the ED calculation menu. Again, we need to further specify things in the config file. We do this manually and enter &lt;code&gt;&gt;&gt; e&lt;/code&gt; again.
 
 Make sure that you have the correct phase-filename:
 
 &gt; &lt;code&gt;Datafilename (’data.phs’) : data.phs&lt;/code&gt;
 
 Afterwards, you will be asked again about the unit cell parameters, the energies, and the incidence angle, which we have provided already before in the calculate phase menu. You can leave these blank, carriage return for each. Next, you will be asked about the dimensions and symmetry of your diffraction pattern. We have recorded from *h* = 0 ... 4 and *k* = 0 ... 4 and up to *l* = 4.5 were it was possible, with a stepsize of 0.02 r.l.u.:
 &gt; &lt;pre&gt;h_max (4) : 4
 &gt; k_max (4) : 4
 &gt; l_max (4.5): 4.5
 &gt; \# L points (226) : 226
 &gt; Symmetry : S_1 = 0
 &gt;            S_2 = 1
 &gt;            S_m = 2
 &gt;          S_2mm = 3
 &gt;            S_4 = 4
 &gt;          S_4mm = 5
 &gt;           S_m2 =10
 &gt; (5) : 5&lt;/pre&gt;
+
 After some other inputs, which we can skip with carriage returns, we have to enter the support. This is the part of the retrieved ED which is not vacuum. It has to be given in voxels. The support’s size is determined by *h&lt;sub&gt;max&lt;/sub&gt;*, *k&lt;sub&gt;max&lt;/sub&gt;*, and *l&lt;sub&gt;max&lt;/sub&gt;*. We only have to provide the support in the *z*-direction, so *l&lt;sub&gt;max&lt;/sub&gt;* = 4.5 is relevant for us.
 
 Since the program completes the dataset also down to *−l&lt;sub&gt;max&lt;/sub&gt;*, we get a total *l*-range of 9. This means, a unit-cell has a size of 9 voxels. We want to retrieve 6 unit cells, therefore we need to enter at least 54. It is recommended to make it a bit larger, so we enter 60.
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Materials Science</dc:creator><pubDate>Tue, 06 Mar 2012 13:14:58 -0000</pubDate><guid>https://sourceforge.net2a886530576f93d0265027977b026e566e511163</guid></item><item><title>WikiPage Tutorial modified by Materials Science</title><link>https://sourceforge.net/p/pyanpha/wiki/Tutorial/</link><description>&lt;pre&gt;--- v22 
+++ v23 
@@ -1,112 +1,107 @@
 [Home](Pyanpha User Guide) - [Previous: 1. Introduction](Introduction)
 
-
 ***
 
 &lt;h3 id="top"&gt; 2. Tutorial &lt;/h3&gt;
 
 [2.1 Required Input](Tutorial/#input)  
 [2.2 Get the phases](Tutorial/#phases)    
 [2.3 From phases to electron density](Tutorial/#ed)
 
-This chapter describes how to get you started with *pyanpha*. It will outline the path from your experimental data to extracted atomic positions. This tutorial does not provide you with the best possible solutions to tweak parameters, but should bring you up to speed with the program functionality. If you want to know more about all the functions and possibilities included, have a look in [Chapter 3](The Menu System). If you have no recorded data yet and simply want to try out the program, have a look at [section 3.3](The Menu System/#simulating) and simulate a dataset, or use the files provided in the &lt;font face="courier"&gt;tutorial&lt;/font&gt; directory.
+This chapter describes how to get you started with *pyanpha*. It will outline the path from your experimental data to extracted atomic positions. This tutorial does not provide you with the best possible solutions to tweak parameters, but should bring you up to speed with the program functionality. If you want to know more about all the functions and possibilities included, have a look in [Chapter 3](The Menu System). If you have no recorded data yet and simply want to try out the program, have a look at [section 3.3](The Menu System/#simulating) and simulate a dataset, or use the files provided in the &lt;code&gt;tutorial&lt;/code&gt; directory.
 
 &lt;h4 id="input"&gt; 2.1 Required Input &lt;/h4&gt;
 It is recommended that you create a project directory in the *pyanpha*-root directory, where all your project related files are thus stored. Before you can start with your analysis, you need three data files:
 
 - Datafile
 - Bulk positions
 - Anomalous scatterer positions
 - Config file (optional)
 
-Your datafile (&lt;font face="courier"&gt;.dat&lt;/font&gt;) should consist of 6 columns: *h k l I&lt;sub&gt;n&lt;/sub&gt; I&lt;sub&gt;a&lt;/sub&gt; I&lt;sub&gt;b&lt;/sub&gt;*, whereby *h*, *k*, and *l* are the Miller indices of the intensities, and *I&lt;sub&gt;n&lt;/sub&gt;*, *I&lt;sub&gt;a&lt;/sub&gt;*, and *I&lt;sub&gt;b&lt;/sub&gt;* are the intensities recorded at normal energy, first and second anomalous energy, respectively.
-
-Both the bulk and anomalous scatterer positions are provided with an atom-file (&lt;font face="courier"&gt;.atm&lt;/font&gt;). In the bulk atomfile, all the atoms of the bulk unit-cell have to be provided. While this file will remain constant during the processing, the anomalous scatterer file will change. This file should be your guess of both the position and occupation of your anomalous scatterers in the film. The atom-file consists of 7 columns: Label Type *x y z* &lt;font face="symbol"&gt;Q&lt;/font&gt; *U*. Within an atom-file the label per atom has to be unique, but it will not matter if it includes the elements name. The Type should be an element or an ion of the element (plus/minus denoted p/m i.e., 2m for O&lt;sup&gt;2−&lt;/sup&gt;). *x*, *y*, *z* are the coordinates of the atom within the unit-cell, &lt;font face="symbol"&gt;Q&lt;/font&gt; is the occupation of the site and *U* is the Debye-Waller factor. For more information about the atom-file consult either [section 3.2](The Menus System/#atoms) or [chapter 4](Program Source). An example (&lt;font face="courier"&gt;bulk.atm&lt;/font&gt; from the &lt;font face="courier"&gt;tutorial&lt;/font&gt; directory) is given below:
-
-&gt; &lt;font face="courier"&gt;\#Label atom x y z occ u
+Your datafile (&lt;code&gt;.dat&lt;/code&gt;) should consist of 6 columns: *h k l I&lt;sub&gt;n&lt;/sub&gt; I&lt;sub&gt;a&lt;/sub&gt; I&lt;sub&gt;b&lt;/sub&gt;*, whereby *h*, *k*, and *l* are the Miller indices of the intensities, and *I&lt;sub&gt;n&lt;/sub&gt;*, *I&lt;sub&gt;a&lt;/sub&gt;*, and *I&lt;sub&gt;b&lt;/sub&gt;* are the intensities recorded at normal energy, first and second anomalous energy, respectively.
+
+Both the bulk and anomalous scatterer positions are provided with an atom-file (&lt;code&gt;.atm&lt;/code&gt;). In the bulk atomfile, all the atoms of the bulk unit-cell have to be provided. While this file will remain constant during the processing, the anomalous scatterer file will change. This file should be your guess of both the position and occupation of your anomalous scatterers in the film. The atom-file consists of 7 columns: Label Type *x y z* &lt;font face="symbol"&gt;Q&lt;/font&gt; *U*. Within an atom-file the label per atom has to be unique, but it will not matter if it includes the elements name. The Type should be an element or an ion of the element (plus/minus denoted p/m i.e., 2m for O&lt;sup&gt;2−&lt;/sup&gt;). *x*, *y*, *z* are the coordinates of the atom within the unit-cell, &lt;font face="symbol"&gt;Q&lt;/font&gt; is the occupation of the site and *U* is the Debye-Waller factor. For more information about the atom-file consult either [section 3.2](The Menus System/#atoms) or [chapter 4](Program Source). An example (&lt;code&gt;bulk.atm&lt;/code&gt; from the &lt;code&gt;tutorial&lt;/code&gt; directory) is given below:
+&gt; &lt;pre&gt;\#Label atom x y z occ u
 &gt; GaB Ga3p 0.500 0.500 0.000 1.00 0.00557
 &gt; NdB Nd3p 0.000 0.000 0.500 1.00 0.00787
 &gt; OB1  O2m 0.500 0.000 0.000 1.00 0.00927
 &gt; OB2  O2m 0.500 0.500 0.500 1.00 0.00927
-&gt; OB3  O2m 0.000 0.500 0.000 1.00 0.00927&lt;/font&gt;
-
-Lastly, you can provide a config file (&lt;font face="courier"&gt;.cfg&lt;/font&gt;). This is not necessary and can also be generated within the program, or you can change the file &lt;font face="courier"&gt;user_vars_template.cfg&lt;/font&gt; in the root directory for your purpose. In [section 4.1](Program Source/#types), all the parameters within the config file are described one-by-one. We start here without predefining a config file.
+&gt; OB3  O2m 0.000 0.500 0.000 1.00 0.00927&lt;/pre&gt;
+Lastly, you can provide a config file (&lt;code&gt;.cfg&lt;/code&gt;). This is not necessary and can also be generated within the program, or you can change the file &lt;code&gt;user_vars_template.cfg&lt;/code&gt; in the root directory for your purpose. In [section 4.1](Program Source/#types), all the parameters within the config file are described one-by-one. We start here without predefining a config file.
 
 &lt;h4 id="phases"&gt; 2.2 Get the phases &lt;/h4&gt;
-You now have all the required input and you are ready to start with your analysis. Open a shell and enter &lt;font face="courier"&gt;$ python pyanpha.py&lt;/font&gt;. In the main menu enter &lt;font face="courier"&gt;&gt;&gt; z&lt;/font&gt; and change to your project directory. Next enter &lt;font face="courier"&gt;&gt;&gt; c&lt;/font&gt; to enter the menu system to calculate the phases. Now we will set up the config file for the phase calculation. Enter &lt;font face="courier"&gt;&gt;&gt; e&lt;/font&gt; and provide all the information for your sample. Below is our input shown. Not all the fields asked need an input at this time and can just be returned blank. First you need to provide the three files which have been
+You now have all the required input and you are ready to start with your analysis. Open a shell and enter &lt;code&gt;$ python pyanpha.py&lt;/code&gt;. In the main menu enter &lt;code&gt;&gt;&gt; z&lt;/code&gt; and change to your project directory. Next enter &lt;code&gt;&gt;&gt; c&lt;/code&gt; to enter the menu system to calculate the phases. Now we will set up the config file for the phase calculation. Enter &lt;code&gt;&gt;&gt; e&lt;/code&gt; and provide all the information for your sample. Below is our input shown. Not all the fields asked need an input at this time and can just be returned blank. First you need to provide the three files which have been
 prepared in the last section:
 
-&gt; &lt;font face="courier"&gt;Bulkfilename (’bulk.atm’) : bulk.atm
+&gt; &lt;code&gt;Bulkfilename (’bulk.atm’) : bulk.atm
 &gt; Anomfilename (’anom.atm’) : anom.atm
-&gt; Datafilename (’ctrs.dat’) : data.dat&lt;/font&gt;
+&gt; Datafilename (’ctrs.dat’) : data.dat&lt;/code&gt;
 
 Afterwards, the unit cell parameters are defined. In our tutorial, we have a cubic system:
 
-&gt; &lt;font face="courier"&gt;a (3.9045) : 3.8
+&gt; &lt;code&gt;a (3.9045) : 3.8
 &gt; b (3.9045) : 3.8
 &gt; c (3.9045) : 3.8
 &gt; alp (90.000000) : 90
 &gt; bet (90.000000) : 90
-&gt; gam (90.000000) : 90&lt;/font&gt;
+&gt; gam (90.000000) : 90&lt;/code&gt;
 
 Then you have to enter the three energies, which belong to *I&lt;sub&gt;n&lt;/sub&gt;*, *I&lt;sub&gt;a&lt;/sub&gt;*, and *I&lt;sub&gt;b&lt;/sub&gt;*. For the tutorial datafile, we have recorded around the Sr edge at 16.105 keV.
 
-&gt; &lt;font face="courier"&gt;E_n (16.00) : 16.0
+&gt; &lt;code&gt;E_n (16.00) : 16.0
 &gt; E_a (16.11) : 16.11
-&gt; E_b (16.50) : 16.5&lt;/font&gt;
+&gt; E_b (16.50) : 16.5&lt;/code&gt;
 
 The incidence angle is then requested:
 
-&gt; &lt;font face="courier"&gt;\[Instrument\]
-&gt; Incidence angle (0.500000) : 1.0&lt;/font&gt;
+&gt; &lt;code&gt;\[Instrument\]
+&gt; Incidence angle (0.500000) : 1.0&lt;/code&gt;
 
 Next some information on the anomalous scatterer is defined. It does not matter, if you have entered a different ion in the anomalous atom-file than you enter here. It also asks you to specify *f′* and *f′′*, the energy dependent part of the form factor of your specified element. If you made a measurement of them, you can enter them here. If you leave it as zeros, it will use the tabulated values.
 
-&gt; &lt;font face="courier"&gt;Anomalous Atom (’Sr’) : Sr
+&gt; &lt;code&gt;Anomalous Atom (’Sr’) : Sr
 &gt; Measured anomalous form factor of Sr
 &gt; f1, f2 @ 16.00(’0.0, 0.0’) :
 &gt; f1, f2 @ 16.11(’0.0, 0.0’) :
-&gt; f1, f2 @ 16.50(’0.0, 0.0’) :&lt;/font&gt;
-
-Lastly you have to provide an output filename for the phase-file (&lt;font face="courier"&gt;.phs&lt;/font&gt;).
-
-&gt;  &lt;font face="courier"&gt;Filename (’data.phs’): data.phs&lt;/font&gt;
-
-Now you can run the phase calculation by typing  &lt;font face="courier"&gt;&gt;&gt; r&lt;/font&gt; and it will produce the phase-file.
+&gt; f1, f2 @ 16.50(’0.0, 0.0’) :&lt;/code&gt;
+
+Lastly you have to provide an output filename for the phase-file (&lt;code&gt;.phs&lt;/code&gt;).
+
+&gt;  &lt;code&gt;Filename (’data.phs’): data.phs&lt;/code&gt;
+
+Now you can run the phase calculation by typing  &lt;code&gt;&gt;&gt; r&lt;/code&gt; and it will produce the phase-file.
 
 &lt;h4 id="ed"&gt; 2.3 From phases to electron density &lt;/h4&gt;
-The resulting file &lt;font face="courier"&gt;data.phs&lt;/font&gt; contains the *h*, *k*, and *l* indices and the amplitude and phase of the surface structure factors, which *pyanpha* was able to retrieve. With this file we can now calculate the electron density (ED). Go back to the root-menu and enter &lt;font face="courier"&gt;&gt;&gt; e&lt;/font&gt;. You are now in the ED calculation menu. Again, we need to further specify things in the config file. We do this manually and enter &lt;font face="courier"&gt;&gt;&gt; e&lt;/font&gt; again.
+The resulting file &lt;code&gt;data.phs&lt;/code&gt; contains the *h*, *k*, and *l* indices and the amplitude and phase of the surface structure factors, which *pyanpha* was able to retrieve. With this file we can now calculate the electron density (ED). Go back to the root-menu and enter &lt;code&gt;&gt;&gt; e&lt;/code&gt;. You are now in the ED calculation menu. Again, we need to further specify things in the config file. We do this manually and enter &lt;code&gt;&gt;&gt; e&lt;/code&gt; again.
 
 Make sure that you have the correct phase-filename:
 
-&gt; &lt;font face="courier"&gt;Datafilename (’data.phs’) : data.phs&lt;/font&gt;
+&gt; &lt;code&gt;Datafilename (’data.phs’) : data.phs&lt;/code&gt;
 
 Afterwards, you will be asked again about the unit cell parameters, the energies, and the incidence angle, which we have provided already before in the calculate phase menu. You can leave these blank, carriage return for each. Next, you will be asked about the dimensions and symmetry of your diffraction pattern. We have recorded from *h* = 0 ... 4 and *k* = 0 ... 4 and up to *l* = 4.5 were it was possible, with a stepsize of 0.02 r.l.u.:
-
-&gt; &lt;code&gt;h_max (4) : 4
+&gt; &lt;pre&gt;h_max (4) : 4
 &gt; k_max (4) : 4
 &gt; l_max (4.5): 4.5
 &gt; \# L points (226) : 226
 &gt; Symmetry : S_1 = 0
-&gt; \           S_2 = 1
+&gt;            S_2 = 1
 &gt;            S_m = 2
 &gt;          S_2mm = 3
 &gt;            S_4 = 4
 &gt;          S_4mm = 5
 &gt;           S_m2 =10
-&gt; (5) : 5&lt;/code&gt;
-
+&gt; (5) : 5&lt;/pre&gt;
 After some other inputs, which we can skip with carriage returns, we have to enter the support. This is the part of the retrieved ED which is not vacuum. It has to be given in voxels. The support’s size is determined by *h&lt;sub&gt;max&lt;/sub&gt;*, *k&lt;sub&gt;max&lt;/sub&gt;*, and *l&lt;sub&gt;max&lt;/sub&gt;*. We only have to provide the support in the *z*-direction, so *l&lt;sub&gt;max&lt;/sub&gt;* = 4.5 is relevant for us.
 
 Since the program completes the dataset also down to *−l&lt;sub&gt;max&lt;/sub&gt;*, we get a total *l*-range of 9. This means, a unit-cell has a size of 9 voxels. We want to retrieve 6 unit cells, therefore we need to enter at least 54. It is recommended to make it a bit larger, so we enter 60.
 
-&gt; &lt;font face="courier"&gt;Support (70) : 60&lt;/font&gt;
-
-Finally, we have to give an ED filename (&lt;font face="courier"&gt;.zip&lt;/font&gt;):
-
-&gt; &lt;font face="courier"&gt;Filename (’ed.zip’): data.zip&lt;/font&gt;
-
-We are now able to run the ED calculation by entering &lt;font face="courier"&gt;&gt;&gt; r&lt;/font&gt;. If you have entered everything correctly, you should have generated an ED file. You can either look at this now in the plot ED menu (cf. [Section 3.8](The Menu System/#ploted)) or extract the atomic positions (cf. [Section 3.9](The Menu System/#extracting). With this, all the steps from the anomalous intensities datafile to an ED file are complete. It is now up to you to tweak the input parameters such that you get a better looking ED. Change your anomalous scatterers, interpolate missing datapoints, add simulated data, and repeat described procedure.
+&gt; &lt;code&gt;Support (70) : 60&lt;/code&gt;
+
+Finally, we have to give an ED filename (&lt;code&gt;.zip&lt;/code&gt;):
+
+&gt; &lt;code&gt;Filename (’ed.zip’): data.zip&lt;/code&gt;
+
+We are now able to run the ED calculation by entering &lt;code&gt;&gt;&gt; r&lt;/code&gt;. If you have entered everything correctly, you should have generated an ED file. You can either look at this now in the plot ED menu (cf. [Section 3.8](The Menu System/#ploted)) or extract the atomic positions (cf. [Section 3.9](The Menu System/#extracting). With this, all the steps from the anomalous intensities datafile to an ED file are complete. It is now up to you to tweak the input parameters such that you get a better looking ED. Change your anomalous scatterers, interpolate missing datapoints, add simulated data, and repeat described procedure.
 
 ***
 [Back to top](Tutorial/#top)
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Materials Science</dc:creator><pubDate>Tue, 06 Mar 2012 13:14:25 -0000</pubDate><guid>https://sourceforge.net85222f258de9120d850787463f05ab4d8c339a43</guid></item><item><title>WikiPage Tutorial modified by Materials Science</title><link>https://sourceforge.net/p/pyanpha/wiki/Tutorial/</link><description>&lt;pre&gt;--- v21 
+++ v22 
@@ -83,18 +83,18 @@
 
 Afterwards, you will be asked again about the unit cell parameters, the energies, and the incidence angle, which we have provided already before in the calculate phase menu. You can leave these blank, carriage return for each. Next, you will be asked about the dimensions and symmetry of your diffraction pattern. We have recorded from *h* = 0 ... 4 and *k* = 0 ... 4 and up to *l* = 4.5 were it was possible, with a stepsize of 0.02 r.l.u.:
 
-&gt; &lt;font face="courier"&gt;h_max (4) : 4
+&gt; &lt;code&gt;h_max (4) : 4
 &gt; k_max (4) : 4
 &gt; l_max (4.5): 4.5
 &gt; \# L points (226) : 226
 &gt; Symmetry : S_1 = 0
-&gt;            S_2 = 1
+&gt; \           S_2 = 1
 &gt;            S_m = 2
 &gt;          S_2mm = 3
 &gt;            S_4 = 4
 &gt;          S_4mm = 5
 &gt;           S_m2 =10
-&gt; (5) : 5&lt;/font&gt;
+&gt; (5) : 5&lt;/code&gt;
 
 After some other inputs, which we can skip with carriage returns, we have to enter the support. This is the part of the retrieved ED which is not vacuum. It has to be given in voxels. The support’s size is determined by *h&lt;sub&gt;max&lt;/sub&gt;*, *k&lt;sub&gt;max&lt;/sub&gt;*, and *l&lt;sub&gt;max&lt;/sub&gt;*. We only have to provide the support in the *z*-direction, so *l&lt;sub&gt;max&lt;/sub&gt;* = 4.5 is relevant for us.
 
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Materials Science</dc:creator><pubDate>Tue, 06 Mar 2012 13:08:11 -0000</pubDate><guid>https://sourceforge.net7389118fe9b586a3b9666b3e631c96bd8f1f4fa7</guid></item><item><title>WikiPage Tutorial modified by Materials Science</title><link>https://sourceforge.net/p/pyanpha/wiki/Tutorial/</link><description>&lt;pre&gt;--- v20 
+++ v21 
@@ -60,55 +60,55 @@
 &gt; &lt;font face="courier"&gt;\[Instrument\]
 &gt; Incidence angle (0.500000) : 1.0&lt;/font&gt;
 
-Next some information on the anomalous scatterer is defined. It does not matter, if you have entered a different ion in the anomalous atom-file than you enter here. It also asks you to specify *f ′* and *f ′′*, the energy dependent part of the form factor of your specified element. If you made a measurement of them, you can enter them here. If you leave it as zeros, it will use the tabulated values.
-
+Next some information on the anomalous scatterer is defined. It does not matter, if you have entered a different ion in the anomalous atom-file than you enter here. It also asks you to specify *f′* and *f′′*, the energy dependent part of the form factor of your specified element. If you made a measurement of them, you can enter them here. If you leave it as zeros, it will use the tabulated values.
+
 &gt; &lt;font face="courier"&gt;Anomalous Atom (’Sr’) : Sr
 &gt; Measured anomalous form factor of Sr
 &gt; f1, f2 @ 16.00(’0.0, 0.0’) :
 &gt; f1, f2 @ 16.11(’0.0, 0.0’) :
 &gt; f1, f2 @ 16.50(’0.0, 0.0’) :&lt;/font&gt;
 
 Lastly you have to provide an output filename for the phase-file (&lt;font face="courier"&gt;.phs&lt;/font&gt;).
 
 &gt;  &lt;font face="courier"&gt;Filename (’data.phs’): data.phs&lt;/font&gt;
 
 Now you can run the phase calculation by typing  &lt;font face="courier"&gt;&gt;&gt; r&lt;/font&gt; and it will produce the phase-file.
 
 &lt;h4 id="ed"&gt; 2.3 From phases to electron density &lt;/h4&gt;
-The resulting file data.phs contains the h, k, and l indices and the amplitude and phase of the surface structure factors, which pyanpha was able to retrieve. With this file we can now calculate the electron density (ED). Go back to the root-menu and enter &gt;&gt; e. You are now in the ED calculation menu. Again, we need to further specify things in the config file. We do this manually and enter &gt;&gt; e again.
+The resulting file &lt;font face="courier"&gt;data.phs&lt;/font&gt; contains the *h*, *k*, and *l* indices and the amplitude and phase of the surface structure factors, which *pyanpha* was able to retrieve. With this file we can now calculate the electron density (ED). Go back to the root-menu and enter &lt;font face="courier"&gt;&gt;&gt; e&lt;/font&gt;. You are now in the ED calculation menu. Again, we need to further specify things in the config file. We do this manually and enter &lt;font face="courier"&gt;&gt;&gt; e&lt;/font&gt; again.
 
 Make sure that you have the correct phase-filename:
 
-&gt; Datafilename (’data.phs’) : data.phs
-
-Afterwards, you will be asked again about the unit cell parameters, the energies, and the incidence angle, which we have provided already before in the calculate phase menu. You can leave these blank, carriage return for each. Next, you will be asked about the dimensions and symmetry of your diffraction pattern. We have recorded from h = 0. . . 4 and k = 0. . . 4 and up to l = 4.5 were it was possible, with a stepsize of 0.02 r.l.u.:
-
-&gt; h_max (4) : 4
+&gt; &lt;font face="courier"&gt;Datafilename (’data.phs’) : data.phs&lt;/font&gt;
+
+Afterwards, you will be asked again about the unit cell parameters, the energies, and the incidence angle, which we have provided already before in the calculate phase menu. You can leave these blank, carriage return for each. Next, you will be asked about the dimensions and symmetry of your diffraction pattern. We have recorded from *h* = 0 ... 4 and *k* = 0 ... 4 and up to *l* = 4.5 were it was possible, with a stepsize of 0.02 r.l.u.:
+
+&gt; &lt;font face="courier"&gt;h_max (4) : 4
 &gt; k_max (4) : 4
 &gt; l_max (4.5): 4.5
 &gt; \# L points (226) : 226
 &gt; Symmetry : S_1 = 0
-&gt; S_2 = 1
-&gt; S_m = 2
-&gt; S_2mm = 3
-&gt; S_4 = 4
-&gt; S_4mm = 5
-&gt; S_m2 =10
-&gt; (5) : 5
-
-After some other inputs, which we can skip with carriage returns, we have to enter the support. This is the part of the retrieved ED which is not vacuum. It has to be given in voxels. The support’s size is determined by hmax, kmax, and lmax. We only have to provide the support in the z-direction, so lmax = 4.5 is relevant for us.
-
-Since the program completes the dataset also down to −lmax, we get a total l-range of 9. This means, a unit-cell has a size of 9 voxels. We want to retrieve 6 unit cells, therefore we need to enter at least 54. It is recommended to make it a bit larger, so we enter 60.
-
-&gt; Support (70) : 60
-
-Finally, we have to give an ED filename (.zip):
-
-&gt; Filename (’ed.zip’): data.zip
-
-We are now able to run the ED calculation by entering &gt;&gt; r. If you have entered everything correctly, you should have generated an ED file. You can either look at this now in the plot ED menu (cf. Section 3.8) or extract the atomic positions (cf. Section 3.9).With this, all the steps from the anomalous intensities datafile to an ED file are complete. It is now up to you to tweak the input parameters such that you get a better looking ED. Change your anomalous scatterers, interpolate missing datapoints, add simulated data, and repeat described procedure.
+&gt;            S_2 = 1
+&gt;            S_m = 2
+&gt;          S_2mm = 3
+&gt;            S_4 = 4
+&gt;          S_4mm = 5
+&gt;           S_m2 =10
+&gt; (5) : 5&lt;/font&gt;
+
+After some other inputs, which we can skip with carriage returns, we have to enter the support. This is the part of the retrieved ED which is not vacuum. It has to be given in voxels. The support’s size is determined by *h&lt;sub&gt;max&lt;/sub&gt;*, *k&lt;sub&gt;max&lt;/sub&gt;*, and *l&lt;sub&gt;max&lt;/sub&gt;*. We only have to provide the support in the *z*-direction, so *l&lt;sub&gt;max&lt;/sub&gt;* = 4.5 is relevant for us.
+
+Since the program completes the dataset also down to *−l&lt;sub&gt;max&lt;/sub&gt;*, we get a total *l*-range of 9. This means, a unit-cell has a size of 9 voxels. We want to retrieve 6 unit cells, therefore we need to enter at least 54. It is recommended to make it a bit larger, so we enter 60.
+
+&gt; &lt;font face="courier"&gt;Support (70) : 60&lt;/font&gt;
+
+Finally, we have to give an ED filename (&lt;font face="courier"&gt;.zip&lt;/font&gt;):
+
+&gt; &lt;font face="courier"&gt;Filename (’ed.zip’): data.zip&lt;/font&gt;
+
+We are now able to run the ED calculation by entering &lt;font face="courier"&gt;&gt;&gt; r&lt;/font&gt;. If you have entered everything correctly, you should have generated an ED file. You can either look at this now in the plot ED menu (cf. [Section 3.8](The Menu System/#ploted)) or extract the atomic positions (cf. [Section 3.9](The Menu System/#extracting). With this, all the steps from the anomalous intensities datafile to an ED file are complete. It is now up to you to tweak the input parameters such that you get a better looking ED. Change your anomalous scatterers, interpolate missing datapoints, add simulated data, and repeat described procedure.
 
 ***
-[Back to top](#top)
+[Back to top](Tutorial/#top)
 
 [Next: 3. The Menu System](The Menu System)
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Materials Science</dc:creator><pubDate>Tue, 06 Mar 2012 13:06:00 -0000</pubDate><guid>https://sourceforge.net0a0b4200a5e77a9ac900ebbe3cc3d9e56d28b8a4</guid></item><item><title>WikiPage Tutorial modified by Materials Science</title><link>https://sourceforge.net/p/pyanpha/wiki/Tutorial/</link><description>&lt;pre&gt;--- v19 
+++ v20 
@@ -26,53 +26,53 @@
 &gt; &lt;font face="courier"&gt;\#Label atom x y z occ u
 &gt; GaB Ga3p 0.500 0.500 0.000 1.00 0.00557
 &gt; NdB Nd3p 0.000 0.000 0.500 1.00 0.00787
-&gt; OB1 O2m 0.500 0.000 0.000 1.00 0.00927
-&gt; OB2 O2m 0.500 0.500 0.500 1.00 0.00927
-&gt; OB3 O2m 0.000 0.500 0.000 1.00 0.00927&lt;/font&gt;
-
-Lastly, you can provide a config file (&lt;font face="courier"&gt;.cfg&lt;/font&gt;). This is not necessary and can also be generated within the program, or you can change the file &lt;font face="courier"&gt;user_vars_template.cfg&lt;/font&gt; in the root directory for your purpose. In [section 4.1](Program Source#types), all the parameters within the config file are described one-by-one. We start here without predefining a config file.
-
+&gt; OB1  O2m 0.500 0.000 0.000 1.00 0.00927
+&gt; OB2  O2m 0.500 0.500 0.500 1.00 0.00927
+&gt; OB3  O2m 0.000 0.500 0.000 1.00 0.00927&lt;/font&gt;
+
+Lastly, you can provide a config file (&lt;font face="courier"&gt;.cfg&lt;/font&gt;). This is not necessary and can also be generated within the program, or you can change the file &lt;font face="courier"&gt;user_vars_template.cfg&lt;/font&gt; in the root directory for your purpose. In [section 4.1](Program Source/#types), all the parameters within the config file are described one-by-one. We start here without predefining a config file.
+
 &lt;h4 id="phases"&gt; 2.2 Get the phases &lt;/h4&gt;
-You now have all the required input and you are ready to start with your analysis. Open a shell and enter $ python pyanpha.py. In the main menu enter &gt;&gt; z and change to your project directory. Next enter &gt;&gt; c to enter the menu system to calculate the phases. Now we will set up the config file for the phase calculation. Enter &gt;&gt; e and provide all the information for your sample. Below is our input shown. Not all the fields asked need an input at this time and can just be returned blank. First you need to provide the three files which have been
+You now have all the required input and you are ready to start with your analysis. Open a shell and enter &lt;font face="courier"&gt;$ python pyanpha.py&lt;/font&gt;. In the main menu enter &lt;font face="courier"&gt;&gt;&gt; z&lt;/font&gt; and change to your project directory. Next enter &lt;font face="courier"&gt;&gt;&gt; c&lt;/font&gt; to enter the menu system to calculate the phases. Now we will set up the config file for the phase calculation. Enter &lt;font face="courier"&gt;&gt;&gt; e&lt;/font&gt; and provide all the information for your sample. Below is our input shown. Not all the fields asked need an input at this time and can just be returned blank. First you need to provide the three files which have been
 prepared in the last section:
 
-&gt; Bulkfilename (’bulk.atm’) : bulk.atm
+&gt; &lt;font face="courier"&gt;Bulkfilename (’bulk.atm’) : bulk.atm
 &gt; Anomfilename (’anom.atm’) : anom.atm
-&gt; Datafilename (’ctrs.dat’) : data.dat
+&gt; Datafilename (’ctrs.dat’) : data.dat&lt;/font&gt;
 
 Afterwards, the unit cell parameters are defined. In our tutorial, we have a cubic system:
 
-&gt; a (3.9045) : 3.8
+&gt; &lt;font face="courier"&gt;a (3.9045) : 3.8
 &gt; b (3.9045) : 3.8
 &gt; c (3.9045) : 3.8
 &gt; alp (90.000000) : 90
 &gt; bet (90.000000) : 90
-&gt; gam (90.000000) : 90
-
-Then you have to enter the three energies, which belong to In, Ia, and Ib. For the tutorial datafile, we have recorded around the Sr edge at 16.105 keV.
-
-&gt; E_n (16.00) : 16.0
+&gt; gam (90.000000) : 90&lt;/font&gt;
+
+Then you have to enter the three energies, which belong to *I&lt;sub&gt;n&lt;/sub&gt;*, *I&lt;sub&gt;a&lt;/sub&gt;*, and *I&lt;sub&gt;b&lt;/sub&gt;*. For the tutorial datafile, we have recorded around the Sr edge at 16.105 keV.
+
+&gt; &lt;font face="courier"&gt;E_n (16.00) : 16.0
 &gt; E_a (16.11) : 16.11
-&gt; E_b (16.50) : 16.5
+&gt; E_b (16.50) : 16.5&lt;/font&gt;
 
 The incidence angle is then requested:
 
-&gt; \[Instrument\]
-&gt; Incidence angle (0.500000) : 1.0
-
-Next some information on the anomalous scatterer is defined. It does not matter, if you have entered a different ion in the anomalous atom-file than you enter here. It also asks you to specify f ′ and f ′′, the energy dependent part of the form factor of your specified element. If you made a measurement of them, you can enter them here. If you leave it as zeros, it will use the tabulated values.
-
-&gt; Anomalous Atom (’Sr’) : Sr
+&gt; &lt;font face="courier"&gt;\[Instrument\]
+&gt; Incidence angle (0.500000) : 1.0&lt;/font&gt;
+
+Next some information on the anomalous scatterer is defined. It does not matter, if you have entered a different ion in the anomalous atom-file than you enter here. It also asks you to specify *f ′* and *f ′′*, the energy dependent part of the form factor of your specified element. If you made a measurement of them, you can enter them here. If you leave it as zeros, it will use the tabulated values.
+
+&gt; &lt;font face="courier"&gt;Anomalous Atom (’Sr’) : Sr
 &gt; Measured anomalous form factor of Sr
 &gt; f1, f2 @ 16.00(’0.0, 0.0’) :
 &gt; f1, f2 @ 16.11(’0.0, 0.0’) :
-&gt; f1, f2 @ 16.50(’0.0, 0.0’) :
-
-Lastly you have to provide an output filename for the phase-file (.phs).
-
-&gt; Filename (’data.phs’): data.phs
-
-Now you can run the phase calculation by typing &gt;&gt; r and it will produce the phase-file.
+&gt; f1, f2 @ 16.50(’0.0, 0.0’) :&lt;/font&gt;
+
+Lastly you have to provide an output filename for the phase-file (&lt;font face="courier"&gt;.phs&lt;/font&gt;).
+
+&gt;  &lt;font face="courier"&gt;Filename (’data.phs’): data.phs&lt;/font&gt;
+
+Now you can run the phase calculation by typing  &lt;font face="courier"&gt;&gt;&gt; r&lt;/font&gt; and it will produce the phase-file.
 
 &lt;h4 id="ed"&gt; 2.3 From phases to electron density &lt;/h4&gt;
 The resulting file data.phs contains the h, k, and l indices and the amplitude and phase of the surface structure factors, which pyanpha was able to retrieve. With this file we can now calculate the electron density (ED). Go back to the root-menu and enter &gt;&gt; e. You are now in the ED calculation menu. Again, we need to further specify things in the config file. We do this manually and enter &gt;&gt; e again.
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Materials Science</dc:creator><pubDate>Tue, 06 Mar 2012 12:59:14 -0000</pubDate><guid>https://sourceforge.netcc8bd2efed1afd681a19b69063b293d903c8a7dc</guid></item><item><title>WikiPage Tutorial modified by Materials Science</title><link>https://sourceforge.net/p/pyanpha/wiki/Tutorial/</link><description>&lt;pre&gt;--- v18 
+++ v19 
@@ -6,22 +6,22 @@
 &lt;h3 id="top"&gt; 2. Tutorial &lt;/h3&gt;
 
 [2.1 Required Input](Tutorial/#input)  
-[2.2 Get the phases](Tutorial#phases)    
-[2.3 From phases to electron density](Tutorial#ed)
-
-This chapter describes how to get you started with *pyanpha*. It will outline the path from your experimental data to extracted atomic positions. This tutorial does not provide you with the best possible solutions to tweak parameters, but should bring you up to speed with the program functionality. If you want to know more about all the functions and possibilities included, have a look in [Chapter 3](The Menu System). If you have no recorded data yet and simply want to try out the program, have a look at [section 3.3](The Menu System#simulating) and simulate a dataset, or use the files provided in the &lt;font face="courier"&gt;tutorial&lt;/font&gt; directory.
-
+[2.2 Get the phases](Tutorial/#phases)    
+[2.3 From phases to electron density](Tutorial/#ed)
+
+This chapter describes how to get you started with *pyanpha*. It will outline the path from your experimental data to extracted atomic positions. This tutorial does not provide you with the best possible solutions to tweak parameters, but should bring you up to speed with the program functionality. If you want to know more about all the functions and possibilities included, have a look in [Chapter 3](The Menu System). If you have no recorded data yet and simply want to try out the program, have a look at [section 3.3](The Menu System/#simulating) and simulate a dataset, or use the files provided in the &lt;font face="courier"&gt;tutorial&lt;/font&gt; directory.
+
 &lt;h4 id="input"&gt; 2.1 Required Input &lt;/h4&gt;
 It is recommended that you create a project directory in the *pyanpha*-root directory, where all your project related files are thus stored. Before you can start with your analysis, you need three data files:
 
 - Datafile
 - Bulk positions
 - Anomalous scatterer positions
 - Config file (optional)
 
 Your datafile (&lt;font face="courier"&gt;.dat&lt;/font&gt;) should consist of 6 columns: *h k l I&lt;sub&gt;n&lt;/sub&gt; I&lt;sub&gt;a&lt;/sub&gt; I&lt;sub&gt;b&lt;/sub&gt;*, whereby *h*, *k*, and *l* are the Miller indices of the intensities, and *I&lt;sub&gt;n&lt;/sub&gt;*, *I&lt;sub&gt;a&lt;/sub&gt;*, and *I&lt;sub&gt;b&lt;/sub&gt;* are the intensities recorded at normal energy, first and second anomalous energy, respectively.
 
-Both the bulk and anomalous scatterer positions are provided with an atom-file (&lt;font face="courier"&gt;.atm&lt;/font&gt;). In the bulk atomfile, all the atoms of the bulk unit-cell have to be provided. While this file will remain constant during the processing, the anomalous scatterer file will change. This file should be your guess of both the position and occupation of your anomalous scatterers in the film. The atom-file consists of 7 columns: Label Type *x y z* &lt;font face="symbol"&gt;Q&lt;/font&gt; *U*. Within an atom-file the label per atom has to be unique, but it will not matter if it includes the elements name. The Type should be an element or an ion of the element (plus/minus denoted p/m i.e., 2m for O&lt;sup&gt;2−&lt;/sup&gt;). *x*, *y*, *z* are the coordinates of the atom within the unit-cell, &lt;font face="symbol"&gt;Q&lt;/font&gt; is the occupation of the site and *U* is the Debye-Waller factor. For more information about the atom-file consult either [section 3.2](The Menus System#atoms) or [chapter 4](Program Source). An example (&lt;font face="courier"&gt;bulk.atm&lt;/font&gt; from the &lt;font face="courier"&gt;tutorial&lt;/font&gt; directory) is given below:
+Both the bulk and anomalous scatterer positions are provided with an atom-file (&lt;font face="courier"&gt;.atm&lt;/font&gt;). In the bulk atomfile, all the atoms of the bulk unit-cell have to be provided. While this file will remain constant during the processing, the anomalous scatterer file will change. This file should be your guess of both the position and occupation of your anomalous scatterers in the film. The atom-file consists of 7 columns: Label Type *x y z* &lt;font face="symbol"&gt;Q&lt;/font&gt; *U*. Within an atom-file the label per atom has to be unique, but it will not matter if it includes the elements name. The Type should be an element or an ion of the element (plus/minus denoted p/m i.e., 2m for O&lt;sup&gt;2−&lt;/sup&gt;). *x*, *y*, *z* are the coordinates of the atom within the unit-cell, &lt;font face="symbol"&gt;Q&lt;/font&gt; is the occupation of the site and *U* is the Debye-Waller factor. For more information about the atom-file consult either [section 3.2](The Menus System/#atoms) or [chapter 4](Program Source). An example (&lt;font face="courier"&gt;bulk.atm&lt;/font&gt; from the &lt;font face="courier"&gt;tutorial&lt;/font&gt; directory) is given below:
 
 &gt; &lt;font face="courier"&gt;\#Label atom x y z occ u
 &gt; GaB Ga3p 0.500 0.500 0.000 1.00 0.00557
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Materials Science</dc:creator><pubDate>Tue, 06 Mar 2012 12:54:31 -0000</pubDate><guid>https://sourceforge.neta07db9843afdb8a6c6d4cfa76ceaffb5e50755d5</guid></item><item><title>WikiPage Tutorial modified by Materials Science</title><link>https://sourceforge.net/p/pyanpha/wiki/Tutorial/</link><description>&lt;pre&gt;--- v17 
+++ v18 
@@ -5,7 +5,7 @@
 
 &lt;h3 id="top"&gt; 2. Tutorial &lt;/h3&gt;
 
-[2.1 Required Input](Tutorial#input)  
+[2.1 Required Input](Tutorial/#input)  
 [2.2 Get the phases](Tutorial#phases)    
 [2.3 From phases to electron density](Tutorial#ed)
 
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Materials Science</dc:creator><pubDate>Tue, 06 Mar 2012 12:53:05 -0000</pubDate><guid>https://sourceforge.netbe09a099e9b9a66851688c86c94005e8f64ed759</guid></item><item><title>WikiPage Tutorial modified by Materials Science</title><link>https://sourceforge.net/p/pyanpha/wiki/Tutorial/</link><description>&lt;pre&gt;--- v16 
+++ v17 
@@ -5,9 +5,9 @@
 
 &lt;h3 id="top"&gt; 2. Tutorial &lt;/h3&gt;
 
-[2.1 Required Input](/#input/)  
-[2.2 Get the phases](#phases)    
-[2.3 From phases to electron density](#ed)
+[2.1 Required Input](Tutorial#input)  
+[2.2 Get the phases](Tutorial#phases)    
+[2.3 From phases to electron density](Tutorial#ed)
 
 This chapter describes how to get you started with *pyanpha*. It will outline the path from your experimental data to extracted atomic positions. This tutorial does not provide you with the best possible solutions to tweak parameters, but should bring you up to speed with the program functionality. If you want to know more about all the functions and possibilities included, have a look in [Chapter 3](The Menu System). If you have no recorded data yet and simply want to try out the program, have a look at [section 3.3](The Menu System#simulating) and simulate a dataset, or use the files provided in the &lt;font face="courier"&gt;tutorial&lt;/font&gt; directory.
 
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Materials Science</dc:creator><pubDate>Tue, 06 Mar 2012 12:52:42 -0000</pubDate><guid>https://sourceforge.net61ec95a3351ec70cb464638d55ab79a5999e2245</guid></item><item><title>WikiPage Tutorial modified by Materials Science</title><link>https://sourceforge.net/p/pyanpha/wiki/Tutorial/</link><description>&lt;pre&gt;--- v15 
+++ v16 
@@ -5,7 +5,7 @@
 
 &lt;h3 id="top"&gt; 2. Tutorial &lt;/h3&gt;
 
-[2.1 Required Input](#input)  
+[2.1 Required Input](/#input/)  
 [2.2 Get the phases](#phases)    
 [2.3 From phases to electron density](#ed)
 
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Materials Science</dc:creator><pubDate>Tue, 06 Mar 2012 12:52:09 -0000</pubDate><guid>https://sourceforge.net4d2b15aa5d3f0e66eed01354dc74b8853d1c0c9e</guid></item><item><title>WikiPage Tutorial modified by Materials Science</title><link>https://sourceforge.net/p/pyanpha/wiki/Tutorial/</link><description>&lt;pre&gt;--- v14 
+++ v15 
@@ -1,107 +1,114 @@
 [Home](Pyanpha User Guide) - [Previous: 1. Introduction](Introduction)
-***
-
-### 2. Tutorial ###
-
-This chapter describes how to get you started with pyanpha. It will outline the path from your experimental data to extracted atomic positions. This tutorial does not provide you with the best possible solutions to tweak parameters, but should bring you up to speed with the program functionality. If you want to know more about all the functions and possibilities included, have a look in Chapter 3. If you have no recorded data yet and simply want to try out the program, have a look at section 3.3 and simulate a dataset, or use the files provided in the
-tutorial directory.
-
+
+
+***
+
+&lt;h3 id="top"&gt; 2. Tutorial &lt;/h3&gt;
+
+[2.1 Required Input](#input)  
+[2.2 Get the phases](#phases)    
+[2.3 From phases to electron density](#ed)
+
+This chapter describes how to get you started with *pyanpha*. It will outline the path from your experimental data to extracted atomic positions. This tutorial does not provide you with the best possible solutions to tweak parameters, but should bring you up to speed with the program functionality. If you want to know more about all the functions and possibilities included, have a look in [Chapter 3](The Menu System). If you have no recorded data yet and simply want to try out the program, have a look at [section 3.3](The Menu System#simulating) and simulate a dataset, or use the files provided in the &lt;font face="courier"&gt;tutorial&lt;/font&gt; directory.
+
 &lt;h4 id="input"&gt; 2.1 Required Input &lt;/h4&gt;
-It is recommended that you create a project directory in the pyanpha-root directory, where all your project related files are thus stored. Before you can start with your analysis, you need three data files:
+It is recommended that you create a project directory in the *pyanpha*-root directory, where all your project related files are thus stored. Before you can start with your analysis, you need three data files:
 
 - Datafile
 - Bulk positions
 - Anomalous scatterer positions
 - Config file (optional)
 
-Your datafile (.dat) should consist of 6 columns: h k l In Ia Ib, whereby h, k, and l are the Miller indices of the intensities, and I_n, I_a, and I_b are the intensities recorded at normal energy, first and second anomalous energy, respectively.
-Both the bulk and anomalous scatterer positions are provided with an atom-file (.atm). In the bulk atomfile, all the atoms of the bulk unit-cell have to be provided. While this file will remain constant during the processing, the anomalous scatterer file will change. This file should be your guess of both the position and occupation of your anomalous scatterers in the film. The atom-file consists of 7 columns: Label Type x y z Q U. Within an atom-file the label per atom has to be unique, but it will not matter if it includes the elements name. The Type should be an element or an ion of the element (plus/minus denoted p/m i.e., 2m for O2−). x, y, z are the coordinates of the atom within the unit-cell, Q is the occupation of the site and U is the Debye-Waller factor. For more information about the atom-file consult either section 3.2 or chapter 4. An example (bulk.atm from the tutorial directory) is given below:
-
-&gt; \#Label atom x y z occ u
+Your datafile (&lt;font face="courier"&gt;.dat&lt;/font&gt;) should consist of 6 columns: *h k l I&lt;sub&gt;n&lt;/sub&gt; I&lt;sub&gt;a&lt;/sub&gt; I&lt;sub&gt;b&lt;/sub&gt;*, whereby *h*, *k*, and *l* are the Miller indices of the intensities, and *I&lt;sub&gt;n&lt;/sub&gt;*, *I&lt;sub&gt;a&lt;/sub&gt;*, and *I&lt;sub&gt;b&lt;/sub&gt;* are the intensities recorded at normal energy, first and second anomalous energy, respectively.
+
+Both the bulk and anomalous scatterer positions are provided with an atom-file (&lt;font face="courier"&gt;.atm&lt;/font&gt;). In the bulk atomfile, all the atoms of the bulk unit-cell have to be provided. While this file will remain constant during the processing, the anomalous scatterer file will change. This file should be your guess of both the position and occupation of your anomalous scatterers in the film. The atom-file consists of 7 columns: Label Type *x y z* &lt;font face="symbol"&gt;Q&lt;/font&gt; *U*. Within an atom-file the label per atom has to be unique, but it will not matter if it includes the elements name. The Type should be an element or an ion of the element (plus/minus denoted p/m i.e., 2m for O&lt;sup&gt;2−&lt;/sup&gt;). *x*, *y*, *z* are the coordinates of the atom within the unit-cell, &lt;font face="symbol"&gt;Q&lt;/font&gt; is the occupation of the site and *U* is the Debye-Waller factor. For more information about the atom-file consult either [section 3.2](The Menus System#atoms) or [chapter 4](Program Source). An example (&lt;font face="courier"&gt;bulk.atm&lt;/font&gt; from the &lt;font face="courier"&gt;tutorial&lt;/font&gt; directory) is given below:
+
+&gt; &lt;font face="courier"&gt;\#Label atom x y z occ u
 &gt; GaB Ga3p 0.500 0.500 0.000 1.00 0.00557
 &gt; NdB Nd3p 0.000 0.000 0.500 1.00 0.00787
 &gt; OB1 O2m 0.500 0.000 0.000 1.00 0.00927
 &gt; OB2 O2m 0.500 0.500 0.500 1.00 0.00927
-&gt; OB3 O2m 0.000 0.500 0.000 1.00 0.00927
-
-Lastly, you can provide a config file (.cfg). This is not necessary and can also be generated within the program, or you can change the file user_vars_template.cfg in the root directory for your purpose. In section 4.1, all the parameters within the config file are described one-by-one.We start here without predefining a config file.
+&gt; OB3 O2m 0.000 0.500 0.000 1.00 0.00927&lt;/font&gt;
+
+Lastly, you can provide a config file (&lt;font face="courier"&gt;.cfg&lt;/font&gt;). This is not necessary and can also be generated within the program, or you can change the file &lt;font face="courier"&gt;user_vars_template.cfg&lt;/font&gt; in the root directory for your purpose. In [section 4.1](Program Source#types), all the parameters within the config file are described one-by-one. We start here without predefining a config file.
 
 &lt;h4 id="phases"&gt; 2.2 Get the phases &lt;/h4&gt;
 You now have all the required input and you are ready to start with your analysis. Open a shell and enter $ python pyanpha.py. In the main menu enter &gt;&gt; z and change to your project directory. Next enter &gt;&gt; c to enter the menu system to calculate the phases. Now we will set up the config file for the phase calculation. Enter &gt;&gt; e and provide all the information for your sample. Below is our input shown. Not all the fields asked need an input at this time and can just be returned blank. First you need to provide the three files which have been
 prepared in the last section:
 
 &gt; Bulkfilename (’bulk.atm’) : bulk.atm
 &gt; Anomfilename (’anom.atm’) : anom.atm
 &gt; Datafilename (’ctrs.dat’) : data.dat
 
 Afterwards, the unit cell parameters are defined. In our tutorial, we have a cubic system:
 
 &gt; a (3.9045) : 3.8
 &gt; b (3.9045) : 3.8
 &gt; c (3.9045) : 3.8
 &gt; alp (90.000000) : 90
 &gt; bet (90.000000) : 90
 &gt; gam (90.000000) : 90
 
 Then you have to enter the three energies, which belong to In, Ia, and Ib. For the tutorial datafile, we have recorded around the Sr edge at 16.105 keV.
 
 &gt; E_n (16.00) : 16.0
 &gt; E_a (16.11) : 16.11
 &gt; E_b (16.50) : 16.5
 
 The incidence angle is then requested:
 
 &gt; \[Instrument\]
 &gt; Incidence angle (0.500000) : 1.0
 
 Next some information on the anomalous scatterer is defined. It does not matter, if you have entered a different ion in the anomalous atom-file than you enter here. It also asks you to specify f ′ and f ′′, the energy dependent part of the form factor of your specified element. If you made a measurement of them, you can enter them here. If you leave it as zeros, it will use the tabulated values.
 
 &gt; Anomalous Atom (’Sr’) : Sr
 &gt; Measured anomalous form factor of Sr
 &gt; f1, f2 @ 16.00(’0.0, 0.0’) :
 &gt; f1, f2 @ 16.11(’0.0, 0.0’) :
 &gt; f1, f2 @ 16.50(’0.0, 0.0’) :
 
 Lastly you have to provide an output filename for the phase-file (.phs).
 
 &gt; Filename (’data.phs’): data.phs
 
 Now you can run the phase calculation by typing &gt;&gt; r and it will produce the phase-file.
 
 &lt;h4 id="ed"&gt; 2.3 From phases to electron density &lt;/h4&gt;
 The resulting file data.phs contains the h, k, and l indices and the amplitude and phase of the surface structure factors, which pyanpha was able to retrieve. With this file we can now calculate the electron density (ED). Go back to the root-menu and enter &gt;&gt; e. You are now in the ED calculation menu. Again, we need to further specify things in the config file. We do this manually and enter &gt;&gt; e again.
 
 Make sure that you have the correct phase-filename:
 
 &gt; Datafilename (’data.phs’) : data.phs
 
 Afterwards, you will be asked again about the unit cell parameters, the energies, and the incidence angle, which we have provided already before in the calculate phase menu. You can leave these blank, carriage return for each. Next, you will be asked about the dimensions and symmetry of your diffraction pattern. We have recorded from h = 0. . . 4 and k = 0. . . 4 and up to l = 4.5 were it was possible, with a stepsize of 0.02 r.l.u.:
 
 &gt; h_max (4) : 4
 &gt; k_max (4) : 4
 &gt; l_max (4.5): 4.5
 &gt; \# L points (226) : 226
 &gt; Symmetry : S_1 = 0
 &gt; S_2 = 1
 &gt; S_m = 2
 &gt; S_2mm = 3
 &gt; S_4 = 4
 &gt; S_4mm = 5
 &gt; S_m2 =10
 &gt; (5) : 5
 
 After some other inputs, which we can skip with carriage returns, we have to enter the support. This is the part of the retrieved ED which is not vacuum. It has to be given in voxels. The support’s size is determined by hmax, kmax, and lmax. We only have to provide the support in the z-direction, so lmax = 4.5 is relevant for us.
 
 Since the program completes the dataset also down to −lmax, we get a total l-range of 9. This means, a unit-cell has a size of 9 voxels. We want to retrieve 6 unit cells, therefore we need to enter at least 54. It is recommended to make it a bit larger, so we enter 60.
 
 &gt; Support (70) : 60
 
 Finally, we have to give an ED filename (.zip):
 
 &gt; Filename (’ed.zip’): data.zip
 
 We are now able to run the ED calculation by entering &gt;&gt; r. If you have entered everything correctly, you should have generated an ED file. You can either look at this now in the plot ED menu (cf. Section 3.8) or extract the atomic positions (cf. Section 3.9).With this, all the steps from the anomalous intensities datafile to an ED file are complete. It is now up to you to tweak the input parameters such that you get a better looking ED. Change your anomalous scatterers, interpolate missing datapoints, add simulated data, and repeat described procedure.
 
 ***
+[Back to top](#top)
 
 [Next: 3. The Menu System](The Menu System)
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Materials Science</dc:creator><pubDate>Tue, 06 Mar 2012 12:51:16 -0000</pubDate><guid>https://sourceforge.netbe3957126e3897074ef0a54b1f11dacf21a6ab68</guid></item></channel></rss>