Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

branch_properties key "number" exists? #46

Closed
mcyc opened this issue Oct 22, 2018 · 3 comments
Closed

branch_properties key "number" exists? #46

mcyc opened this issue Oct 22, 2018 · 3 comments

Comments

@mcyc
Copy link

mcyc commented Oct 22, 2018

I don't think values associated with the key "number" was typically generated for branch_properties. This is an issue when it comes to executing the following line:

branch_properties["number"][n] -= 1

Note: the "number" values are not a part of the branch_properties returned by init_lengths():

def init_lengths(labelisofil, filbranches, array_offsets, img):

@e-koch
Copy link
Owner

e-koch commented Oct 23, 2018

Hi @mcyc -- You're right, and I think the issue is that init_lengths was never being used on its own. branch_properties['number'] is getting set after calling init_lengths: https://github.com/e-koch/FilFinder/blob/master/fil_finder/filament.py#L264 (there's a similar line in the old fil_finder_2D). Setting the number of branches in init_lengths does make more sense.

Is this causing an error for you when running FilFinder2D?

@mcyc
Copy link
Author

mcyc commented Oct 23, 2018

I haven't tried it with FilFinder2d, but it did cause me an error when I tried to run prune_graph with my own wrapper. Specifically, I run into an error when the 'criteria'

if criteria:

is true. This typically happens when the length_thresh parameter has a none-zero value.

@e-koch
Copy link
Owner

e-koch commented Oct 24, 2018

Added a fix in #47

@e-koch e-koch closed this as completed Oct 24, 2018
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

No branches or pull requests

2 participants