Skip to content

Commit

Permalink
Docstring improvements to mention the code is array foccussed
Browse files Browse the repository at this point in the history
  • Loading branch information
pc494 committed Sep 7, 2020
1 parent 3506399 commit 9af5f65
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions diffsims/utils/shape_factor_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ def binary(excitation_error, max_excitation_error):
Parameters
----------
excitation_error : float
excitation_error : array-like or float
The distance (reciprocal) from a reflection to the Ewald sphere
max_excitation_error : float
The distance at which a reflection becomes extinct
Returns
-------
intensity : float
intensities : array-like or float
"""
return 1

Expand All @@ -44,15 +44,15 @@ def linear(excitation_error, max_excitation_error):
Parameters
----------
excitation_error : float
excitation_error : array-like or float
The distance (reciprocal) from a reflection to the Ewald sphere
max_excitation_error : float
The distance at which a reflection becomes extinct
Returns
-------
intensity : float
intensities : array-like or float
"""

return 1 - excitation_error / max_excitation_error
Expand All @@ -64,7 +64,7 @@ def sinc(excitation_error, max_excitation_error, minima_number=5):
Parameters
----------
excitation_error : float
excitation_error : array-like or float
The distance (reciprocal) from a reflection to the Ewald sphere
max_excitation_error : float
Expand All @@ -75,7 +75,7 @@ def sinc(excitation_error, max_excitation_error, minima_number=5):
Returns
-------
intensity : float
intensity : array-like or float
"""

num = np.sin(np.pi * minima_number * excitation_error / max_excitation_error)
Expand Down

0 comments on commit 9af5f65

Please sign in to comment.