BlueBrain / MOOC-neurons-and-synapses-2017

Reference data for the "Simulation Neuroscience:Neurons and Synapses" Massive Online Open Course
Other
43 stars 26 forks source link

Week 5: ballandstickopt.ipynb #87

Closed joni-herttuainen closed 3 years ago

joni-herttuainen commented 3 years ago

Hi,

I seem to have different plot from the ball and stick model than in the lecture video (should be 1 spike in the first and 5 spikes in the second subplot):

ballandstickplot

I noticed that the SWC string differs from what is in the video (at least). It is now:

morph_swc_string = """
1 1 0.0 0.0 -10.0 10.0 -1                                                        
2 1 0.0 0.0 0.0 10.0 1                                                           
3 1 0.0 0.0 10.0 10.0 1                                                          
4 3 0.0 10.0 0.0 2.0 1                                                           
5 3 0.0 110.0 0.0 2.0 4
"""

it used to be:

morph_swc_string = """
1 1 0.0 0.0 -10.0 10.0 -1                                                        
2 1 0.0 0.0 0.0 10.0 1                                                           
3 1 0.0 0.0 10.0 10.0 2                                                          
4 3 0.0 10.0 0.0 2.0 2                                                           
5 3 0.0 110.0 0.0 2.0 4
"""

I backtracked the changes to the following commits: https://github.com/BlueBrain/MOOC-neurons-and-synapses-2017/pull/77/commits/d5d1fa2d3d990fa4d767e9a8b91ccbf76d11820a https://github.com/BlueBrain/MOOC-neurons-and-synapses-2017/commit/916c3474d33ba5bba0a80c67c79c307ea4e0ac7e but there was no particular explanation (at least that I would've noticed) why they were changed.

Moreover, I tried with the old SWC string and got the following warning:

Warning: with a 3 points soma, neurites must be connected to the first soma point:
ballandstick.swc:5:warning

after running the block:

import neurom
import neurom.viewer
fig, ax = neurom.viewer.draw(neurom.load_neuron('ballandstick.swc'))

I continued running the notebook until the plot and now I have 4 spikes in the second subplot:

ballandstickplot2

I am not sure what's going on here.

alex4200 commented 3 years ago

Hello @joni-herttuainen @stefanoantonel @wvangeit

It is correct that the SWC string creates some errors/warning, see this ticket.

But I just tried the following morphology (only one line changes instead of 2):

morph_swc_string = """ 1 1 0.0 0.0 -10.0 10.0 -1
2 1 0.0 0.0 0.0 10.0 1
3 1 0.0 0.0 10.0 10.0 2
4 3 0.0 10.0 0.0 2.0 1
5 3 0.0 110.0 0.0 2.0 4 """

which seems to avoid any error/warning, and which produces the 4 spikes.

Can you check that please independently from my side - if it works for you, we can make the change and it is fixed.

stefanoantonel commented 3 years ago

Thank you Alex. If I understood correctly the issue is mainly that the original was outputing 5 spikes instead of 4. So even with the original swc file, we get some difference

Screenshot 2021-09-16 at 10 39 41

joni-herttuainen commented 3 years ago

Hi @alex4200 , @stefanoantonel

That is correct, in the video, the original version was outputting 5 spikes.

The issue here is if a user doesn't get the same results as in the tutorial, how does he/she know he/she is doing everything correctly.

Moreover, since even with the same input as in the original, neuron/ephys produces different output than before, are we sure that the expected answers (in the tutorial exercise and even more so in the graded exercise) are correct anymore?

EDIT: I tested it with the 3-liner mentioned in https://github.com/BlueBrain/NeuroM/issues/953#issuecomment-882539462 , it still produces only 4 spikes.

joni-herttuainen commented 3 years ago

Update: I finished the graded exercise for the week 5 and that one is unaffected.

alex4200 commented 3 years ago

@joni-herttuainen @stefanoantonel Anything left to do here?

joni-herttuainen commented 3 years ago

I don't know. I have heard nothing after my latest update.

Depending on your course of action, there might not be anything to do here as the issue in the tutorial does not affect the graded exercise. If that's the case, it would be nice (from users' point-of-view) to at least add some kind of a note/comment above the course video and/or in the notebook that the user might get 1 spike instead of 5.