INM-6 / hybridLFPy

Biophysics-based prediction of LFPs from point-neuron networks
GNU General Public License v3.0
10 stars 10 forks source link

bugs in population.py #40

Closed HilbertHuangHitomi closed 3 years ago

HilbertHuangHitomi commented 3 years ago

I found some bugs in population.py due to version issues.

population.py, line 1291, in cellsim electrode = LFPy.RecExtElectrode(**self.electrodeParams) TypeError: init() missing 1 required positional argument: 'cell'

This raises due to the newer version of LFPy, which can be fixed by adding cell_geometry as electrode = lfpykit.RecExtElectrode(cell_geometry, **self.electrodeParams).

BTW, I notice that the document of LFPy may be also out-of-date. In particular, cell_geometry = CellGeometry(x=np.c_[cell.xstart, cell.xend], y=np.c_[cell.ystart, cell.yend], z=np.c_[cell.zstart, cell.zend], d=cell.diam) should be simply modified as cell_geometry = CellGeometry(x=cell.x, y=cell.y, z=cell.z, d=cell.d). When I modify these in population.py, it works well XD.

Another, pip install hybridlfpy only gives version 0.1.3, which has syntax error in raise ae,, but can be fixed by installing from git.

espenhgn commented 3 years ago

Hi @HilbertHuangHitomi, thanks for the heads up! Which branch are you on? Branch nest3 which will be merged via #9 should be fairly up to date with regards to LFPy and Python 3, and is also way ahead of branch master. My plan is to merge when future NEST 3 is released (it should hopefully work with https://github.com/nest/nest-simulator@master)

HilbertHuangHitomi commented 3 years ago

I am on branch master currently. I will have a try on it. Thanks! >.<

espenhgn commented 3 years ago

Fine. Don't hesitate to reopen this issue if you encounter more problems. Btw., I meant branch nest3 not dev above.