Adds topological features into better tracing
Adds:
- branch idx and associated image and funcs
- topological classifications using the Topoly library
- writhe classification and associated functions
- turned grains images rainbow so users could distinguish from background
- adds many more skan params (min, median, mid values + segment connections)
- moves get_two_combinations from node stats to tracing funcs as now used in ordered tracing too
I've addressed most of the above in a separate branch which I will merge into maxgamill-sheffield/800-better-tracing. The renaming/refactoring of dnatracing.trace_image() will take a while though so will be addressed as a separate task.
I've addressed most of the above in a separate branch which I will merge into maxgamill-sheffield/800-better-tracing. The renaming/refactoring of dnatracing.trace_image() will take a while though so will be addressed as a separate task.
Further work required this is more involved, see #899
Hey @ns-rse , just seen your comments and want to double check what is required for this to merge:
- Add Sylvias testing suite from #897
- Resolve pre-commit errors: (Done in #900 ?)
- markdown
<br>'s - ruff complaints
- plot_crossing_linetrace_halfmax docstrings
- Fix merge conflicts (which I will do now)
Also the merge conflicts in process_scan relate to the changing of grainstats_additions_df to splining_stats and similarly for the per molecule statistics. I might further change these into splining_grainstats and splining_molstats as I think it's clearer what stats each refers to
- Not sure if you need to merge those into this although there may be issues if you've changed things and it breaks the tests @SylviaWhittle has written.
- Yes I've addressed those.
- Sorry for the merge conflicts, it's almost unavoidable when three people are working on the same areas of code.
Feel free to go with more meaningful names, I just didn't feel grainstats_additions_df gave much information as to what was being added.
@SylviaWhittle I think the merge conflicts in tests_splining are to merge both, or one is outdated, as they both consider he whole file. Please could you take a look at which one is to be merged and resolve this?
@SylviaWhittle I think the merge conflicts in
tests_spliningare to merge both, or one is outdated, as they both consider he whole file. Please could you take a look at which one is to be merged and resolve this?
Yeah defo merge both I think
For the pyproject.toml conflict would it be possible to order the dependencies alphabetically please (both now and in the future rather than appending to the list). It makes it much easier to read and find what dependencies there are (I corrected this the other day in something).
AFMReader will also need bumping to the top of the list.
- Alphabetised dependencies
- Resolved merge conflict in
test_splines.py
Comments have been addressed so is this ready to go into [maxgamill-sheffield/800-better-tracing]?
Just fixed all the tracing tests 👍
This all looks good to me and I'd be happy for it to be merged, I tested functionality out on a set of varied molecules and all were handled correctly! 👍
I tested functionality out on a set of varied molecules and all were handled correctly! 👍
Could these perhaps be used as part of the test suite? It could be as simple as additional regression tests that check the Matplotlib images I suspect are being manually reviewed in a notebook to make the decision that they are being handled correctly, but it would give us some reassurance in the future if/when any of the code is refactored that things aren't broken, or if they do change that we take time to consider if the change is intended.