Closed SylviaWhittle closed 1 day ago
Oh also before merging, we need to discuss & solve the issue of the custom plots I've made. @MaxGamill-Sheffield will likely have a way to do this but currently it dumbly saves the images in the current directory and is just for experimentation.
The reason is that it does non-standard plotting things (multiple coloured lines etc) so can't currently be invoked using the Images
class (and therefore is not part of the plotting pipeline yet).
Not completely completed but would like high-level feedback before putting effort towards finalising if that's okay 😄
I'm wondering how much the sign of the angle difference matters, and whether it would be better to just consider the absolute magnitude for most applications? See example below, first plot is with the signed angle difference and the second is using the absolute value of the angle difference. To me, the absolute value makes it more intuitive e.g. dark red regions are highly curved, light regions are not.
Perhaps this could even be configurable if we anticipate different applications where one approach would be better than the other?
I'm wondering how much the sign of the angle difference matters, and whether it would be better to just consider the absolute magnitude for most applications? See example below, first plot is with the signed angle difference and the second is using the absolute value of the angle difference. To me, the absolute value makes it more intuitive e.g. dark red regions are highly curved, light regions are not.
Perhaps this could even be configurable if we anticipate different applications where one approach would be better than the other?
Just asked Tom, Libby and Kinga, and they say there is no use in directional curvature. I'd be happy with adding a np.abs()
for now and removing it in future if we need! I'll add that on Monday 😄
That sounds good to me. I really like your approach to this, and although the method itself is simple I think it will be really valuable for future projects! I agree with your comment about making the angle per nm part configurable, as I think it may show regions of high/low curvature better if we consider larger neighbourhoods around each point?? 1D gaussian would also be a neat solution for this!
Will update regtest
Only locally failing test now is the topology issue:
This PR adds just a basic angle-turn-per-nm metric, calculated for each molecule of each grain, linear and circular. It is super simple but extensible to meet future needs (I hope).
It will likely need tuning and maybe adding a configurable 1D gaussian filter (since curvature really changes depending on the length scale you're looking for. I've defaulted to angle per nm but maybe in future for different projects, we will want this configurable. Not adding it here yet though as I want feedback from different projects first.
Works best on high-res data!
Closes #168