Skip to content

Tools to analyze grazing incidence x-ray diffraction data

License

Notifications You must be signed in to change notification settings

linupi/GIXDtools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GIXDtools

Tools to analyze grazing incidence x-ray diffraction data.

❗ The code published here is not yet in a state where it can be easily used by other scientist. I am aware that it is lacking a lot of documentation and tutorials how to use it. The main reason to publish this code is to complete the publications in which it has been used. Please feel welcome to contact me via email ( linus . pithan {AT} esrf .fr ) in case these software tools could be interesting for you.

Publications that I am aware of where the here presented tools have been used:

  • S. Bommel, Sebastian,Unravelling nanoscale molecular processes in organic thin films, PhD Thesis, Humboldt-Universität zu Berlin, Mathematisch-Naturwissenschaftliche Fakultät, 2015, http://dx.doi.org/10.18452/17315
  • L. Pithan, D. Nabok, C. Cocchi, P. Beyer, G. Duva, J. Simbrunner, J. Rawle, C. Nicklin, P. Schäfer, C. Draxl, F. Schreiber, S. Kowarik, Molecular structure of the substrate-induced thin-film phase of tetracene, accepted for publication in The Journal of Chemical Physics.

The codes presented here have been tested under Linux and MacOS.

UnitCellIndexerGUI

A simple python3 tool that helps to find approximate unit cell parameters of organic thin films. All six parameters (a, b, c, alpha, beta, gamma) can be addjusted manually until the experimental data and the calculated reflection positions are matching.

Please note: this tool is still under development and not yet in its final version. The current version should rather be regarded as an alpha version with many important features still missing.

Known Issues

hard-code image resolution and origin

Image resolution and origin are hard-code in the script. Right now there are the follwing two lines in the script

origin=np.array([0.301501,-0.0984982])
scale=np.array([0.00300172,0.00300353])
  • origin represents q coordinates of the low left corner in q_xy and q_z
  • scale discribes the q per pixel

the given values correspond to the example image but might need to be changed.

selection of displayed hkl-triples

To change the displayed hkl-triples the follwoing lines in the code have to be modified:

            #Put reflection markers          
            for h in self.my_range (-1, 3, 1):
                for k in self.my_range (-2, 2, 1):
                    for l in self.my_range(-3, 5, 1):
                        self.putMarker (a1_r, a2_r, a3_r, h, k, l)

UnitCellCalculator

This is a JAVA code that helps wiht the determination of crystallographic unit-cells of molecular thin films. Based on GIXD diffraction data a set of hypothetical diffraction patterns is generated by varying the unit-cell parameters to find the best fit corresponding to the experimental findings.

To sample the multidimensional reciprocal space uniformly it uses the latin hypercube sampling.

How to run the code

There is no graphical user interface as this code is intended to be used in combination with a batch queuing system. Here is a draft of how to run the code:

  1. Prepare a mask of the experimental data in q-space. (example in rawdata/example_data.png)
  2. Prepare a configuration file. (example in in/example_config.txt)
  3. Run the java program (e.g. java -Xmx1024M -Xms1024M UnitCellCalculator in/example_config.txt >> out/example_output.txt)
  4. Have a look in the folder that has the output file (here out/example_output.txt) and the outpt folder (here example_data, generally the same name as the mask file). If caluclation was successfull a set of files should have been generated in this folder. The filename correspondes to the number of reflections matching the generated unit cell.
  5. Create histograms based on the calculated results. There are some tools here that can be used.
    • run java Histographer example_data/ TOP3 36 35 34 where TOP3 is an name that can be freely choosen
    • copy gnuplot script in to the output folder cp histo_template.gp example_data/
    • cd into output folder
    • modify filename prefix in second line if needed
    • run gnuplot gnuplot histo_template.gp
    • enjoy the plots e.g. via eog *.png

Know Issues

In case you see Unsupported major.minor version 52.0 error message you should try use at least java 8. In case you have to deal with the two problems below don't forget to recompile the .java files after changing them.

hard-code image resolution and origin

in order to use the program other than the example data you may need to modify the following lines in the DataListToImage and Mask class that deal with the relation beween pixels in the image file and the q-space calibration:

    private int qParaMinPx = 0;
    private int qParaMaxPx = 1251;
    private int qPerpMinPx = 0;
    private int qPerpMaxPx = 501;
    
    private static double qParaMinValue = 1;
    private static double qParaMaxValue = 3.5;
    private static double qPerpMinValue = 0;
    private static double qPerpMaxValue = 1;
    
    private static double qPerpPerPx = 0.002;
    private static double qParaPerPx = 0.002;

hard-code hkl-triples that are considered

in the file hklList.java are several lines like add(new hkl( -1 , 0 , 5 )); that should only represent expected reflections, which are specific for the problem that you want to solve.

About

Tools to analyze grazing incidence x-ray diffraction data

Resources

License

Stars

Watchers

Forks

Packages

No packages published