unibe-cns / NEAT

NEAT (NEural Analysis Toolkit)
Other
12 stars 15 forks source link

Use of posix on windows and other errors #97

Closed sunzhenyang2018 closed 4 years ago

sunzhenyang2018 commented 4 years ago

In neuronmodel.py, posix is used on line 670 and 672, but apparently it is not available on windows. I was told the module os on windows does the same thing as posix. (I googled, so information may be inacurrate).

After I changed posix to os in neuronmodel.py, I encountered another issue in morphtree.py: issue3

WillemWybo commented 4 years ago

Regarding the time issue, I changed the time measurement to time.process_time() in the linked PR.

The soma issue was caused by an incomplete translation from the legacy code, as NEAT was originally created from BTMORPH (basically, the relevant lines are 1921 - 1952 in https://github.com/btorb/btmorph_v2/blob/master/btmorph2/btstructs.py). In the linked pull request I visually corrected the MorphTree._makeSomaFromCylinders function to do the same thing. I never actually used the function because all morphologies that I use have the three-point soma. If you have morphologies following other conventions it would be great if you could check whether they are loaded correctly now, and whether we could add a test for it in tests/test_morphtree.py