neurots.generate.algorithms.common¶
Functionality used by multiple algorithms.
Functions
|
Check bif/term. |
|
Generate section data dictionary from arguments. |
Classes
|
Class to define the data for stop criteria based on the TMD method. |
- class neurots.generate.algorithms.common.TMDStop(bif_id, bif, term_id, term, ref)¶
Bases:
objectClass to define the data for stop criteria based on the TMD method.
- Parameters:
- child_length()¶
Return the child length.
Return the absolute difference between bifurcation and termination, which defines the length of the bar.
- expected_bifurcation_length()¶
Compute an estimate for the length of the branch if a bifurcation occurs.
That will happen at distance
bifand therefore the expected length is:(bifurcation - current length). Ifbifurcationisinf, the expected length is zero.
- expected_maximum_length()¶
Return the expected length of the current section.
That is computed as the difference between reference value and the expected bifurcation value. If
bifurcation < termination, then the reference value minus the termination will be computed instead. In real morphologies termination will be larger than bifurcation, unlessbifurcationis set toinf. So the expected length will be computed based on term only if the section will terminate before it bifurcates.
- expected_termination_length()¶
Compute an estimate for the length of the branch if a termination occurs.
That will happen at distance
termand therefore the expected length is:(termination - current length). Ifterminationisinf, the expected length is zero.
- printme()¶
Print all features.
- update_bif(bif_id, bif)¶
Set new values to bifurcation.
- update_term(term_id, term)¶
Set new values to termination.
- neurots.generate.algorithms.common.checks_bif_term(ref, bif, term, target_length)¶
Check bif/term.
- Parameters:
- Returns:
Trueif:Ref < Bif < Termunless Bif is infinite, thenRef < Term.target_length >= (Bif - Ref).target_length >= (Term - Ref).
Otherwise returns
False.- Return type:
- neurots.generate.algorithms.common.section_data(direction, first_point, stop_criteria, process_type)¶
Generate section data dictionary from arguments.