Closed 2320sharon closed 4 months ago
hi @2320sharon , good that you're having a look at this level as the devil is in the details with these things. I think you are right, good catch. The goal of having multiple points to calculate the intersection is to get a more robust estimate when calculating the median intersection, as when done with only 1 point is not a median intersection anymore. So by default I have set it to 3 points. If 1 of those 3 points was below the min_chainage, then it will still pass the n_intersect condition, although the median was calculated with only 2 points. I am happy with this change, if you have time could you pls PR? thanks
Thank you for clearing up my confusion @kvos and for explaining the logic. I'll submit a PR later today with the new code added in. It makes sense that you won't compute a median intersection with less than 3 points.
As always thanks for your all your work maintaining coastsat @kvos !
thanks for this update @2320sharon
Hi Killian,
I was going through
compute_intersection_QC
and I noticed you usedn_intersect[i] = len(xy_rot[0, :])
on line 344 inSDS_transects.py
instead ofn_intersect[i] = np.sum(~np.isnan(xy_rot[0, :]))
. The reason I ask becausen_intersect[i] = len(xy_rot[0, :])
includes NaN points in the count whilenp.sum(~np.isnan(xy_rot[0, :]))
does not count the NaN points. In the linexy_rot[0, xy_rot[0,:] < settings['min_chainage']] = np.nan
the points that were below themin_chainage
are set toNaN
, so shouldn't these points not be considered an intersection point?Here is the relevant portion of the code