This works out as long as this condition for calculating log_delta_q is met as the calculations for n_low and n_high also use the inverse term appropriately. However, if this condition is not met, then log_delta_q is calculated by:
log_delta_q = log(10.) / DEFAULT_POINTS_PER_DECADE
or
log_delta_q = log(10.) / points_per_decade
which are no longer the inverse term. This would result in an incorrect calculation of n_low and n_high.
I noticed that the log_delta_q is calculated as the inverse of the equation listed in the documentation:
$$ \log \Delta q = (\log q_n - \log q_1) / (n - 1) $$
This works out as long as this condition for calculating log_delta_q is met as the calculations for n_low and n_high also use the inverse term appropriately. However, if this condition is not met, then log_delta_q is calculated by:
log_delta_q = log(10.) / DEFAULT_POINTS_PER_DECADE
orlog_delta_q = log(10.) / points_per_decade
which are no longer the inverse term. This would result in an incorrect calculation of n_low and n_high.For example:
@pkienzle can you confirm I am understanding intended functionality correctly? I think this issue would pre-date this PR.
_Originally posted by @caitwolf in https://github.com/SasView/sasmodels/pull/563#discussion_r1186312383_