v0.1.12: downsampling; total path length; various improvements and bug fixes#19
Merged
huangziwei merged 11 commits intomainfrom Sep 8, 2025
Merged
v0.1.12: downsampling; total path length; various improvements and bug fixes#19huangziwei merged 11 commits intomainfrom
huangziwei merged 11 commits intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 thertolparameters).Diagnostics: total path length
On top of
dx.volume(bbox), we now also have bounding box-awaredx.total_path_length(bbox).Bug Fixes
io.save_contact_sites_npz()andio.load_contact_sites_npz()should now save and load the latestContactSitesobject with all the new fields (bbox*) correctly.Improvements
pair.map_contact_sites()exits early with an emptyContactSiteswhencontact_seedsis empty.skel_cmapinplot.projection()akask.plot2d()now can take dictionary as input, which can override the default colormap. e.g.skel_camp={"soma": "black", "dendrite":"green"}.