Skip to content

Commit

Permalink
code comments
Browse files Browse the repository at this point in the history
  • Loading branch information
andped10 committed Apr 10, 2024
1 parent 8e38c95 commit 5b3eb87
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EasyReflectometry/calculators/wrapper_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from EasyReflectometry.experiment import constant_resolution_function

DEFAULT_RESOLUTION_PERCENTAGE = 5.0
DEFAULT_RESOLUTION_FWHM_PERCENTAGE = 5.0


class WrapperBase:
Expand All @@ -17,7 +17,7 @@ def __init__(self):
'item': {},
'model': {},
}
self._resolution_function = constant_resolution_function(DEFAULT_RESOLUTION_PERCENTAGE)
self._resolution_function = constant_resolution_function(DEFAULT_RESOLUTION_FWHM_PERCENTAGE)

def reset_storage(self):
"""Reset the storage area to blank."""
Expand Down
7 changes: 7 additions & 0 deletions EasyReflectometry/experiment/resolution_functions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
"""Resolution functions for the resolution of the experiment.
When a percentage is provided we assume that the resolution is a
Gaussian distribution with a FWHM of the percentage of the q value.
To convert from a sigma value to a FWHM value we use the formula
FWHM = 2.35 * sigma [2 * np.sqrt(2 * np.log(2)) * sigma].
"""

from typing import Callable
from typing import Union

Expand Down

0 comments on commit 5b3eb87

Please sign in to comment.