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

Workarounds for fractionAlong != (0 or 1)? #46

Open
JustasB opened this issue Mar 1, 2016 · 3 comments
Open

Workarounds for fractionAlong != (0 or 1)? #46

JustasB opened this issue Mar 1, 2016 · 3 comments

Comments

@JustasB
Copy link

JustasB commented Mar 1, 2016

I have a NEURON model where the segments are connected at non 0 or 1 parent locations, resulting in NML that uses e.g. fractionAlong="0.8" or "0.517...". When I use jnml to convert LEMS file to neuron, it results in the following error:

Cannot yet handle fractionAlong being neither 0 or 1

If I set the fractionAlong to 0 or 1, it introduces small errors in the voltage during simulation.

My example NML is:

            <segment id="1" name="Seg0_priden">
                <parent fractionAlong="1" segment="0"/>
                <proximal y="-3.005222e+00" x="4.340876e+00" z="6.010444e+00" diameter="5.000000e-01"/>
                <distal y="-7.102542e+01" x="1.025923e+02" z="1.420508e+02" diameter="5.000000e-01"/>
            </segment>
            <segment id="2" name="Seg0_priden2_0">
                <parent ****fractionAlong="0.8"**** segment="1"/>
                <proximal y="-3.005222e+00" x="4.340876e+00" z="6.010444e+00" diameter="4.000000e-01"/>
                <distal y="-9.691841e+01" x="1.399933e+02" z="1.938368e+02" diameter="4.000000e-01"/>
            </segment>

Is the best workaround for this issue to split the parent segment into two segments along the non-integer fraction of the parent segment's length? If so, I'll include this in the error message text and submit a pull-request.

@pgleeson

@pgleeson
Copy link
Member

@JustasB there is a quick fix for this (implemented locally here) if the parent segmentGroup/section has only one segment in it (i.e. use the fraction along the segment as fraction along the segmentGroup). Is this the case for you?

@JustasB
Copy link
Author

JustasB commented Mar 21, 2016

@pgleeson Yes, just one segment is in the parent segment.

@pgleeson
Copy link
Member

I've just committed a fix for this (with just one segment in the parent segment) on the dveelopment branch. Rebuild jNeuroML from source on the development branches and you should have the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants