Skip to content

Commit

Permalink
working on documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
bonfus committed May 20, 2016
1 parent 37d3734 commit 7d4ef7c
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 12 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Optional dependencies are:

| package | version | url | provides |
|----------|------------|------------|----------|
| spglib | 1.8 | http://atztogo.github.io/spglib | library for finding lattice structure symmetries |
| XCrysden | any | http://www.xcrysden.org | tool for showing lattice and magnetic structures |
| sympy | 1.0 | sympy.org | for symbolic Fourier components definition |
| spglib | 1.8 | [Spglib](http://atztogo.github.io/spglib) | library for finding lattice structure symmetries |
| XCrysden | any | [XCrysden](http://www.xcrysden.org) | tool for showing lattice and magnetic structures |
| sympy | 1.0 | [Sympy](http://sympy.org) | for symbolic Fourier components definition |


Install and Usage
Expand All @@ -34,7 +34,6 @@ Known problems
- Non-standard spacegroup settings can cause some tedious problems when
using the spglib functions. Pay attention!


Please not that the code is still under heavy development.
You'll probably find bugs so please report them!

Expand Down
2 changes: 1 addition & 1 deletion docs/ContactTerm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The value of N can strongly impact on the results. The best approximation strong


From CGS to SI
==============
--------------

Hyperfine couplings are often reported in mol/emu while Muesr uses :math:`{\buildrel _{\circ} \over {\mathrm{A}}}^{-3}`.
Here's how to convert the former into the latter.
Expand Down
1 change: 1 addition & 0 deletions docs/FAQ.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ Symmetry is not correctly recognized by spglib!
a bug at spglib.sf.net .

How do I convert the hyperfine filed to reasonable units?

See ContactTerm
2 changes: 1 addition & 1 deletion docs/Install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ XCrysDen >= 1.0 :mod:`muesr.io.xsf.xsf.show_cell` , http://www.x
To compile the python extension you also need the build tools appropriate
for your system (gcc on Linux, XCode on OS X, Visual Studio or gcc on Windows).

If you do not want to compile
If you do not want to compile you can use these wheels:

Installation
------------
Expand Down
8 changes: 4 additions & 4 deletions docs/Intro.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Baisc theory
Basic theory
====================

Local fields in MuSR
Expand All @@ -14,7 +14,7 @@ Description of Magnetic Structures

There are two possibilities to describe a magnetic structure: using the
colored group theory or with the propagation vector and Fourier
coefficients formalism. :py:mod:`muesr` opts for the latter.
coefficients formalism. :mod:`muesr` opts for the latter.
A magnetic structure is defined as

.. math::
Expand Down Expand Up @@ -42,7 +42,7 @@ group formed by the operators leaving invariant the propagation vector.
[TODO] Discuss the phase!


:py:mod:`muesr` can only handle 1-k magnetic structures.
:mod:`muesr` can only handle 1-k magnetic structures.
However, since local field are linear in the magnetic moment, the
results for multiple-k magnetic orders can be obtained by performing
multiple simulations for each of the k vectors describing the system
Expand All @@ -51,7 +51,7 @@ and summing the results.
Implementation details
----------------------------

:py:mod:`muesr` is a tool to analyze muon sites and local field contributions
:mod:`muesr` is a tool to analyze muon sites and local field contributions
generated by a known magnetic structure. It is intended to be used in an
interactive python environment such ipython or Jupyter notebooks.

Expand Down
9 changes: 8 additions & 1 deletion docs/Source.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@ Source documentation
:members:
:undoc-members:
:show-inheritance:


:mod:`muesr.core.sampleErrors` -- Sample related exceptions
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

.. automodule:: muesr.core.sampleErrors
:members:
:undoc-members:
:show-inheritance:

:mod:`muesr.core.cells` -- Functions for lattice
+++++++++++++++++++++++++++++++++++++++++++++++++
Expand Down
2 changes: 1 addition & 1 deletion docs/Symmetry.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Symmetry
========

MuESR tries to grab symmetry information from either the CIF files or
:mod:`muesr` tries to grab symmetry information from either the CIF files or
using the `spglib` routines.
If a magnetic cif (*.mcif) is loaded, the symmetry is disregarded.
The symmetry equivalent sites depend indeed only on the symmetry of the
Expand Down
12 changes: 12 additions & 0 deletions docs/Usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,15 @@ positions with the additional constraint of being sufficiently separated
from the atoms of the hosting system.


Understanding errors
--------------------

:mod:`muesr` raises the conventional python exceptions (mainly ValueError and
TypeError) or other 4 specific Exceptions:

- CellError

To see their meaning follow the links.

The utility functions are mainly intented for interactive usage and report
problems
15 changes: 15 additions & 0 deletions muesr/core/sampleErrors.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
class SampleException(Exception):
"""
Exceptions connected with problems with the Sample definition.
"""
pass

class SymmetryError(SampleException):
"""
Symmetry needed but not defined.
"""
pass

class CellError(SampleException):
"""
Lattice structure needed but not defined.
"""
pass

class MagDefError(SampleException):
"""
Magnetic structure not defined or incompatible.
"""
pass

class MuonError(SampleException):
"""
Muon position needed but not defined.
"""
pass

0 comments on commit 7d4ef7c

Please sign in to comment.