Skip to content

Commit

Permalink
code comments
Browse files Browse the repository at this point in the history
  • Loading branch information
andped10 committed Apr 12, 2024
1 parent 5b3eb87 commit 8b56946
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion EasyReflectometry/calculators/refl1d/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def calculate(self, q_array: np.ndarray, model_name: str) -> np.ndarray:
dq_vector = self._resolution_function(q_array)

if is_constant_resolution_function(self._resolution_function):
# Compute percentage of Q and normalize
# Get percentage of Q and change from sigma to FWHM
dq_vector = dq_vector * q_array / 100 / (2 * np.sqrt(2 * np.log(2)))

q = names.QProbe(
Expand Down
3 changes: 2 additions & 1 deletion EasyReflectometry/calculators/refnx/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ def calculate(self, q_array: np.ndarray, model_name: str) -> np.ndarray:

dq_vector = self._resolution_function(q_array)
if is_constant_resolution_function(self._resolution_function):
# For a constant resolution percentage refnx supports just to pass a float
# FWHM Percentage resolution is constant given as
# For a constant resolution percentage refnx supports to pass a scalar value rather than a vector
dq_vector = dq_vector[0]

return model(x=q_array, x_err=dq_vector)
Expand Down

0 comments on commit 8b56946

Please sign in to comment.