fileformat.rst 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. .. Copyright (C) 2011 - 2013 Stefano Mazzucco <stefano.mazzucco@gmail.com>.
  2. Permission is granted to copy, distribute and/or modify this document
  3. under the terms of the GNU Free Documentation License, Version 1.3
  4. or any later version published by the Free Software Foundation;
  5. with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
  6. A copy of the license is included in the section entitled "GNU
  7. Free Documentation License".
  8. The *Diffractogram* File Format: **.dfg**
  9. ==========================================
  10. Crystal Ball Plus makes use of a simple file format to read the data: the *Diffractogram* format with extension **dfg**.
  11. .. NOTE::
  12. The extension is purely used to distinguish the data files from
  13. other text files. Crystal Ball Plus can read any text file, no
  14. matter its extension.
  15. A *Diffractogram* file is a simple text file where the keyword elements are preceded by a *special comment* symbol, the *double hash* **##**, and the data are organized in columns.
  16. *Diffractogram* files can be read when creating an instance of the Diffractogram class via the method *read_file*:
  17. .. automethod:: crystalballplus.structures.Diffractogram.read_file
  18. :noindex:
  19. .. NOTE::
  20. For the **input** (experimental) files, only the *d-spacing* and *angle_to_x* columns are required:
  21. .. code-block:: bash
  22. ## d-Spacing (A) angle_to_x (deg)
  23. 2.479 0.00
  24. 2.029 55.14
  25. For the **reference** files instead, the *space group* and *unit cell* keywords are required (plus, of course, the *hkl* and *d-spacing* columns):
  26. .. code-block:: bash
  27. ## structure: Fe2 O3
  28. ## chem name: Iron (III) Oxide - Gamma
  29. ## space group: P41212 (92)
  30. ## crystal system: tetragonal
  31. ## unit cell: 8.332000 8.332000 25.113000 90.000000 90.000000 90.00000 (A) (deg)
  32. ## H K L D (A)
  33. 1 0 1 7.9081
  34. 1 0 2 6.9426
  35. 0 0 4 6.2783
  36. 1 0 3 5.9054