skip to main content NIST Center for Neutron Research NIST Center for Neutron Research National Institute of Standards and Technology
Home Live Data Instruments CHRNS Proposals

GA refl

Current version: 2009.03.02 (release notes)

Manual: ga_refl.pdf

GA refl is a program for simultaneous fitting of X ray and neutron polarized reflectometry data. Slab models are supported, with interfacial roughness.

A variety of fitting procedures are supported: genetic algorithms, Nelder-Mead simplex and Levenberg-Marquardt. All algorithms support bounds constraints.

GA refl is a work in progress. Preliminary versions of the program are available.

Building from source

Download the source for the current release garefl-2009.03.02-src.tar.gz or retrieve the current source from the repository:

    svn co svn://

Building GA refl from source requires various text processing tools (e.g., sed) to configure the source, and C, C++ and Fortran compilers to build the executable. You will need to install gnuplot to see the results.

Most unix systems will already have the required tools, though you may need to install some of the development packages.

For Mac OS X the developers kit available in the install CDs contains everything you need. See your Apple documentation for details. You will also need to find a version of fortran for your Mac. Several binaries for gfortran exist on the web.

On Windows it is easiest to install cygwin, being sure to select the packages for the compilers (gcc, g++, gfortran) and for subversion (svn). You can also use MinGW and MSYS.

Once you have the source downloaded and expanded, see the README file for details.

Citing GA refl

Acknowledging use of GA refl in publications may be done by making a reference to this site. For example:
The program ga_simul from the reflpak suite was used for elements of the analysis.[1]
[1] P.A. Kienzle, M. Doucet, D.J. McGillivray, K.V. O'Donovan, N.F. Berk, C.F. Majkrzak; 2000-2006


This software was developed at the National Institute of Standards and Technology at the NIST Center for Neutron Research by employees of the Federal Government in the course of their official duties. Pursuant to title 17 section 105* of the United States Code this software is not subject to copyright protection and is in the public domain. NIST does not assume any responsibility whatsoever for the use of this software, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic. The use of certain trade names or commercial products does not imply any endorsement of a particular product, nor does it imply that the named product is necessarily the best product for the stated purpose. We would appreciate acknowledgment if the software is used.

*Subject matter of copyright: United States Government works

Copyright protection under this title is not available for any work of the United States Government, but the United States Government is not precluded from receiving and holding copyrights transferred to it by assignment, bequest, or otherwise.


Portions of this work are based upon activities supported by the National Science Foundation under Agreement No. DMR-0412074.


Calculating polarized neutron reflectometry
C.F. Majrkzak, K.V. O'Donovan, N.F. Berk (2006); Polarized neutron reflectometry. In Neutron Scattering from Magnetic Materials, T. Chatterji, editor. Elsevier.

Last modified 31-August-2016 by website owner: NCNR (attn: Brian Kirby)