Closed riddick-the-furyan closed 1 year ago
Hello again @riddick-the-furyan
I think that you have to provide a value to the neurite_types
parameter. The default value for this parameter is ["basal_dendrite", "apical_dendrite", "axon"]
, but if none of your morphologies has axon
for example, then you should provide neurite_types=["basal_dendrite", "apical_dendrite"]
to the neurots.extract_input.distributions
function.
Nevertheless I think we should support this case, WDYT @arnaudon ?
Yes, I got this error once as well but I didn't make it crash more gracefully. I can send a PR for this later today if you want.
@adrien-berchet when you say morphologies are you still referring to the variable neurite_types or the morphologies parameter when talking about if it has axon??
"morphologies" refers to the data in the files contained in the data_dir / "neurons"
(or neurons if you prefer)
I see. I misread what you meant.
By any chance do you have an idea of the timeframe in which the next micro version of NeuroTS can support morphologies without axons? Sorry in advance if this sounds forward.
Hello, it is already,
in the function distribution
, there is a neurite_types
argument which you didn't use in your script above. Just give it the neurite types you want to synthesize. I suppose for you it would be distr = extract_input.distributions(..., neurite_types=["basal_dendrite", "apical_dendrite"])
, or without apical_dendrites
if you don't have any.
Hi, thank you so much! The extract_synthesis_inputs.py ran with no errors and the parameters, distributions and morphologies were created so I am really grateful for your help. Though after the program terminated, I got this message "Selected step size 1.000000 is too big for bars of size 0.681029" in red in jupyter notebook. Should I be worried about it?
Great! For this warning, it should not be an issue, but maybe @lidakanari could tell you more on this one. It is related to a bar being smaller than the distance between two points. I see this sometimes, and the created morphologies are ok.
Hi, thank you so much! The extract_synthesis_inputs.py ran with no errors and the parameters, distributions and morphologies were created so I am really grateful for your help. Though after the program terminated, I got this message "Selected step size 1.000000 is too big for bars of size 0.681029" in red in jupyter notebook. Should I be worried about it?
Glad to know it worked! I close this issue as it seems solved but don't hesitate to reopen it if you need more help on this topic (or open a new one if it's about about something else).
When running the .py file I get "ValueError: zero-size array to reduction operation maximum which has no identity." The error seems to be in line 61 of simple_diametrizer.py indicated by lengths /= lengths.max(). The source code of extract_synthesis_inputs.py is syntactically different to what I am used to in python so I am not throwing out the probability that the error is with a change I made. Though I assume the slash is the error but I made a change to the source code of extract_synthesis_inputs.py. Which was only adding the directory to the reconstructions of neurons on my pc.
Here is the source code for extract_synthesis_inputs.py:
Package versions neurots==3.3.1, tmd==2.3.0, diameter-synthesis==0.5.3 and morphio==3.3.4. None of these packages have been edited in anyway.