Skip to content

Comments

v0.1.12: downsampling; total path length; various improvements and bug fixes#19

Merged
huangziwei merged 11 commits intomainfrom
subsample
Sep 8, 2025
Merged

v0.1.12: downsampling; total path length; various improvements and bug fixes#19
huangziwei merged 11 commits intomainfrom
subsample

Conversation

@huangziwei
Copy link
Collaborator

@huangziwei huangziwei commented Sep 4, 2025

New

Post-processing: downsample skeleton

The skeleton output from skeletonize() preserves a lot of details, which is good in some cases (such as finding contacts between cells), but bad for others (too many nodes to build a biophysical model -> inefficient).

This PR added skeleton downsampling (post.downsample()) to reduce the number of nodes while mostly keeping the total volume and the radii distribution stable (that is, only nodes with similar radii got merged, mainly depending on the rtol parameters).

Diagnostics: total path length

On top of dx.volume(bbox), we now also have bounding box-aware dx.total_path_length(bbox).

Bug Fixes

  • io.save_contact_sites_npz() and io.load_contact_sites_npz() should now save and load the latest ContactSites object with all the new fields (bbox*) correctly.

Improvements

  • pair.map_contact_sites() exits early with an empty ContactSites when contact_seeds is empty.
  • skel_cmap in plot.projection() aka sk.plot2d() now can take dictionary as input, which can override the default colormap. e.g. skel_camp={"soma": "black", "dendrite":"green"}.

@huangziwei huangziwei changed the title Post-processing: downsample skeleton v0.1.12 Sep 8, 2025
@huangziwei huangziwei changed the title v0.1.12 v0.1.12: downsampling; total path length; various improvements and bug fixes Sep 8, 2025
@huangziwei huangziwei merged commit 60c5ce1 into main Sep 8, 2025
4 checks passed
@huangziwei huangziwei deleted the subsample branch September 8, 2025 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant