Repository navigation
Fixes possible incorrect mapping between eai metric values and exposure points in trajectories - #1297
Conversation
peanutfun
left a comment
There was a problem hiding this comment.
Looks reasonable. But are there no tests for the results?
|
There are, just not for the very specific case where the index of the geodataframe of the exposure is not a continuous range of number. |
|
Is that a hassle to implement? Simply dropping a row from a built exposure object before the test should do it, right? |
chahank
left a comment
There was a problem hiding this comment.
Does this need a test to avoid breaking it in the future?
emanuel-schmid
left a comment
There was a problem hiding this comment.
looks nice - but sorry, I don't get it. 😕 A test would be awesome. But also a more explanatory description could help.
I think it's less about the future and more about the change: show the bug and the prove that it's fixed. |
|
I've added a specific non range based index in the exposure factory. With it and without the fix, two existing tests related to the computation of EAI fail. I would assume that's enough? |
|
🙌 |
This PR fixes a bug in
calc_eai_gdf(both for static and interpolated trajectories) where the exposure points coordinates are incorrectly mapped to the corresponding risk value when the exposureGeoDataFrameindex is discontinuous.The suggested fix directly uses the index, instead of creating it from a range.
PR Author Checklist
develop)PR Reviewer Checklist