-
Notifications
You must be signed in to change notification settings - Fork 12
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
Remove derivation of "circular" variable in tracing #1043
Comments
I've been looking through this and there are two places where the Both values are used to populate the value of a dictionary ( Its simple enough to remove these from the dictionaries but this has consequences further down the processing pipeline when we come to undertake splining as this requires knowledge of whether the molecule is linear or circular. My initial though was that we could potentially drop in the test = [0, 1, 4]
for x in test:
if x:
print(f"{x} evaluates to True")
else:
print(f"{x} evaluates to False")
0 evaluates to False
1 evaluates to True
4 evaluates to True ...and so we wouldn't have to change any of the logic of whether linear or circular molecules are being calculated. However, after checking where I think we might therefore be able to add disordered_trace_crop_data[f"grain_{cropped_image_index}"]["grain_endpoints"] = np.int32((conv_pruned_skeleton == 2).sum()) ...and use the this value, which is passed into both We would have to make sure the This is I think do-able, but its not going to get done today as its going to take me more than an hour to do it and I have activities planned for this evening so won't be putting in extra hours. With regards to v2.3.0 release, it doesn't affect the output because we already return |
In
tracing/ordered_tracing.py
wetracing_stats.pop("circular")
so that the old column that indicates whether a molecule is linear or circular is not returned (instead the number ofgrain_ends
is reported, if this is0
then a molecule is circular/closed loop).Rather than
pop()
from the data frame we should remove the code that creates it in the first place as there is no point spending time calculating something if its not subsequently used.The initial derivation of this is done by the
tracing.ordered_tracing.linear_or_circular()
function and is needed since the value is conditionally used to determine whethertracing.tracingfuncs.reorderTrace.circularTrace()
ortracing.tracingfuncs.reorderTrace.linearTrace()
is used.But somewhere this value is added to the dataset that is returned (I think it might be the
grainstats
dictionaries but haven't narrowed it down yet)The text was updated successfully, but these errors were encountered: