Skip to content

build_compartment_graph doesn't follow min_radius when computing electrical properties #741

@bantin

Description

@bantin

Hi Jaxley team -- congrats on the paper! Really nice to see that it's finally out.

Anyway, I noticed an issue with the way that build_compartment_graph handles the min_radius argument. Right now, the morph_attrs_from_xyzr uses the values of the radii before they are clipped to the value of min_radius. This means that effectively the min_radius argument is ignored when setting the properties of the cell.

I noticed this when I was trying to load a (weird) SWC file where the radii were all zeros. I thought that I would be able to get a working model by passing min_radius, but the resulting values like resitive_load_in, resistive_load_out were all NaN.

Suggested fix: Before calling swc_radius, swc_area, swc_volume, or swc_resistive_load in morph_attrs_from_xyzr, clip the xyzr radii to min_radius (when provided). I'm happy to submit a PR for this if helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions