TopoStats icon indicating copy to clipboard operation
TopoStats copied to clipboard

Adds topological features into better tracing

Open Max-Gamill opened this issue 1 year ago • 8 comments

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

Max-Gamill avatar Sep 11 '24 15:09 Max-Gamill

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.

ns-rse avatar Sep 11 '24 21:09 ns-rse

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

ns-rse avatar Sep 12 '24 07:09 ns-rse

Hey @ns-rse , just seen your comments and want to double check what is required for this to merge:

  1. Add Sylvias testing suite from #897
  2. Resolve pre-commit errors: (Done in #900 ?)
  • markdown <br>'s
  • ruff complaints
  • plot_crossing_linetrace_halfmax docstrings
  1. 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

Max-Gamill avatar Sep 18 '24 09:09 Max-Gamill

  1. 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.
  2. Yes I've addressed those.
  3. 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.

ns-rse avatar Sep 18 '24 12:09 ns-rse

@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?

Max-Gamill avatar Oct 01 '24 20:10 Max-Gamill

@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?

Yeah defo merge both I think

SylviaWhittle avatar Oct 01 '24 20:10 SylviaWhittle

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.

ns-rse avatar Oct 02 '24 08:10 ns-rse

  • Alphabetised dependencies
  • Resolved merge conflict in test_splines.py

SylviaWhittle avatar Oct 02 '24 11:10 SylviaWhittle

Comments have been addressed so is this ready to go into [maxgamill-sheffield/800-better-tracing]?

Max-Gamill avatar Oct 07 '24 13:10 Max-Gamill

Just fixed all the tracing tests 👍

SylviaWhittle avatar Oct 07 '24 15:10 SylviaWhittle

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! 👍

llwiggins avatar Oct 07 '24 15:10 llwiggins

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.

ns-rse avatar Oct 08 '24 09:10 ns-rse