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
It looks like there's a problem with eccentricity calculations related to the cosine mask produced by the cosmask function. The logic of the calculations and the related normalization code (e.g., in _refine function) assumes that this mask is equal to zero at the center. However, in reality it is equal to one, since np.arctan2 function used by theta_mask simply returns 0 rad when both of its arguments are zero at the center. As a result, the eccentricity values are systematically off, especially for compact features (in the limit of a single-pixel feature it would give an eccentricity of infinity).
One way to solve this issue is to explicitly set the center to zero either in the cosmask definition, or in all the places where it is later used (as far as I can see, 4 different places in the code).
The text was updated successfully, but these errors were encountered:
It looks like there's a problem with eccentricity calculations related to the cosine mask produced by the cosmask function. The logic of the calculations and the related normalization code (e.g., in _refine function) assumes that this mask is equal to zero at the center. However, in reality it is equal to one, since
np.arctan2
function used by theta_mask simply returns 0 rad when both of its arguments are zero at the center. As a result, the eccentricity values are systematically off, especially for compact features (in the limit of a single-pixel feature it would give an eccentricity of infinity).One way to solve this issue is to explicitly set the center to zero either in the
cosmask
definition, or in all the places where it is later used (as far as I can see, 4 different places in the code).The text was updated successfully, but these errors were encountered: