Giter VIP home page Giter VIP logo

Comments (9)

juanchopanza avatar juanchopanza commented on July 30, 2024

Did you manage to reproduce the problem with a single file? If so, could you send it? If not, could you put the data somewhere I can access it (for example, nfs?)

from neurom.

chalimou avatar chalimou commented on July 30, 2024

Hi, this is exactly the problem :) I just put the first cell on a separate directory and run it but everything works fine for that! It's only for the whole population of 100 cells that TreeType.all does not work. TreeType.basal_dendrite works for the population. I'll now try small populations and let you know. Nancy

from neurom.

chalimou avatar chalimou commented on July 30, 2024

Now, I think I localised the cell that causes the problems: It's the 37th one. if you run the script:

from neurom.ezy import load_neurons
from neurom.core.types import TreeType

def extract_feature(data_dir, feature, neurite_type=TreeType.all):
    population = load_neurons(data_dir)
    feature_data = [getattr(n, 'get_' + feature)(neurite_type=neurite_type) for n in population]
    return feature_data

with this single cell, feature = 'local_bifurcation_angles' it gives the math domain error.
L5TTPC1_37th.zip

I hoped it uploaded the file correctly, otherwise I can send it per mail. I try to learn to use those systems :)

from neurom.

juanchopanza avatar juanchopanza commented on July 30, 2024

Sorry, I cannot reproduce the problem. Here is a simple script that attempts to reproduce what I think you did. For the record, this is the kind of code you should submit. A script that can be simply run to reproduce the reported issue.

from neurom.ezy import load_neurons
from neurom.core.types import TreeType

def extract_feature(data_dir, feature, neurite_type=TreeType.all):
    population = load_neurons(data_dir)
    feature_data = [getattr(n, 'get_' + feature)(neurite_type=neurite_type)
                    for n in population]
    return feature_data

if __name__ == '__main__':
    # data is ./L5TTPC1_37th/L5TTPC1_nancy_ID36.h5
    # from L5TTPC1_37th.zip
    ddir = 'L5TTPC1_37th'
    feature = 'local_bifurcation_angles'
    f = extract_feature(ddir, feature, TreeType.all)
    print f

from neurom.

chalimou avatar chalimou commented on July 30, 2024

Hi Juan, can you do me a favour? I think I sent you the wrong cell. It's the cell with ID35 that causes me the problems and not with ID36. I'm attaching the script test.py and the ID35 cell below. Could you run it in your environment when you find a minute? Thanks very much and sorry for the mess :) nancy
cell35_script.zip

from neurom.

juanchopanza avatar juanchopanza commented on July 30, 2024

I can reproduce the problem with the latest morphology. I will have a look at it. FYI, this is a small example that reproduces the problem:

from neurom.ezy import load_neuron, TreeType


if __name__ == '__main__':

    data_file = './cell35_script/L5TTPC1_36th/L5TTPC1_nancy_ID35.h5'
    nrn = load_neuron(data_file)
    f = nrn.get_local_bifurcation_angles(neurite_type=TreeType.apical_dendrite)

from neurom.

juanchopanza avatar juanchopanza commented on July 30, 2024

I found the problem: morphmath.angle_3points is not robust against collinear vectors. The apical dendrite in your problem morphology has a bifurcation with angle pi radians.

I changed the implementation for a more robust one (after adding obvious tests that should have been there in the first place). See pull request #195.

from neurom.

chalimou avatar chalimou commented on July 30, 2024

thanks very much Juan! I think there are no embarrassing bugs, embarrassing was to send you the wrong cell and let you search in the wrong place :)

nancy
On 06 Jan 2016, at 10:04, Juan Palacios <[email protected]mailto:[email protected]> wrote:

I found the problem: morphmath.angle_3points is not robust against collinear vectors. I changes the implementation for a more robust one (after adding obvious tests that should have been there in the first place). See pull request #195#195.


Reply to this email directly or view it on GitHubhttps://github.com//issues/194#issuecomment-169271249.

from neurom.

juanchopanza avatar juanchopanza commented on July 30, 2024

Fixed with #195.

from neurom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.