Menu

Introduction

Materials Science

Home

1. Introduction

pyanpha is a shell-based program, which applies the multi-wavelength anomalous diffraction technique to Surface Diffraction. It enables one to calculate the phases of the structure factors of crystal truncation rods when anomalous scatterers are present in the thin film. Functionality extends to standalone simulations. It was coined pyanpha which is an acronym for PYthon ANomalous PHAsing and it is written in python.

A detailed description of the mathematical background, as well as its application on real data, has been submitted to http://arxiv.org. The program is freely available at http://www.sourceforge.net. The program needs no installation and can be started in a shell with $ python pyanpha.py. The program has been tested to run with Python 2.7.1 using the Enthought Python Distribution (EPD), which is available at http://www.enthought.com and is cross platform compatible. It requires numpy >1.0 and matplotlib > 0.9, which are included in the EPD.

Within this manual, verbatim text represents input or output of pyanpha. Coloured output of pyanpha will not be displayed within this manual, since it serves only as an aid to the eye in the program. The program has the following colour code:

  • Black: Normal input and menu output
  • Red: Error messages
  • Grey: Directory contents
  • Blue: Normal output
  • Light blue: Atoms

However, this colour coding only works in unix shells and will fail in Windows or Cygwin.1

The content of this manual comprises a tutorial in Chapter 2, describing the first steps required to familiarise yourself with the programand a starting point for your anomalous experiment. In Chapter 3 an item-by-item description of the programis given, which shall serve you both as a gesamtschau of the programand a look-up for your usage. The final chapter is amore technical appendum,which lists and explains the source and database-files.
It also has some information about the different endings that should be used for filenames.

If you read through this manual from the beginning to the end, you may encounter certain parts several times. This was intentional and eliminates the need to jump forward and backward through the manual.


Next: 2. Tutorial


1 If you would like to see the colours as well in Windows, you can for example install the colorama package and add the lines:

from colorama import init
init()

to pyanpha.py.


Related

Wiki: Tutorial

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.