You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The numbers 3.5 and 21 seem arbitrary. We should look into if these are the optimal values.
The 21 * len(q_array) indicates that the resolution calculation will assume that calc_Qo consists of many close-lying points (perhaps the calculation relies on Fast Fourier Transforms?). This is probably always the case in the typical use case when q_array is a set of data points, but might not be true in general, e.g. if a model value is calculated only at a few points.
We should check if the calculation is consistent if q_array is, say, only a few points in a wide q-range vs. hundreds of points in the same q-range. If it is not consistent, we should implement a check to make sure the results of the calculation are reliable, and warn the user if they are not.
Furthermore, if the calculations are time-consuming, the numbers 3.5 and 21 can possibly be tweaked to optimize performance.
The text was updated successfully, but these errors were encountered:
I can advise on these numbers for refnx if required (issue seems to be about refl1d though). The point-wise resolution smearing of refnx uses a highly optimised gaussian quadrature. The abscissa are at Gauss Legendre points, not linearly spaced. The current default in refnx is to use an oversampling of 17, not 21. You need to choose that oversampling number depending on how thick your films are. For thicker films that number might need to be higher. W.r.t the +/- 3.5 that's to ensure the entirety of the gaussian is probed. It may be possible to bring that in slightly, but the main thing in calculation speed is the oversampling factor.
As part of the resolution calculations, EasyReflectometry/calculators/refl1d/wrapper.py, the following is calculated
The numbers 3.5 and 21 seem arbitrary. We should look into if these are the optimal values.
The
21 * len(q_array)
indicates that the resolution calculation will assume thatcalc_Qo
consists of many close-lying points (perhaps the calculation relies on Fast Fourier Transforms?). This is probably always the case in the typical use case whenq_array
is a set of data points, but might not be true in general, e.g. if a model value is calculated only at a few points.We should check if the calculation is consistent if
q_array
is, say, only a few points in a wide q-range vs. hundreds of points in the same q-range. If it is not consistent, we should implement a check to make sure the results of the calculation are reliable, and warn the user if they are not.Furthermore, if the calculations are time-consuming, the numbers 3.5 and 21 can possibly be tweaked to optimize performance.
The text was updated successfully, but these errors were encountered: