Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

swc issues and moogList #1

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/githubaction.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Python package

on: [push]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
sudo -E apt install -y cmake libgsl-dev g++ gcc git
sudo -E apt install python3-tk python-tk
python -m pip install numpy matplotlib --user
- name: Build
run: |
python setup.py install
1 change: 1 addition & 0 deletions pybind11/Finfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ py::cpp_function __Finfo__::getDestFinfoSetterFunc2(const ObjId& oid,
}
}


if(ftype1 == "Id") {
if(ftype2 == "Id") {
std::function<bool(Id, Id)> func = [oid, fname](Id a, Id b) {
Expand Down
6 changes: 3 additions & 3 deletions python/rdesigneur/moogul.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def drawForTheFirstTime( self, ax ):
class MooNeuron( MooDrawable ):
''' Draws collection of line segments of defined dia and color'''
def __init__( self,
neuronId,
mooObj,
fieldInfo,
field = 'Vm',
relativeObj = '.',
Expand All @@ -235,12 +235,12 @@ def __init__( self,
colormap = colormap, lenScale = lenScale,
diaScale = diaScale, autoscale = autoscale,
valMin = valMin, valMax = valMax )
self.neuronId = neuronId
self.mooObj = mooObj
self.updateCoords()

def updateCoords( self ):
''' Obtains coords from the associated cell'''
self.compts_ = moose.wildcardFind( self.neuronId.path + "/#[ISA=CompartmentBase]" )
self.compts_ = self.mooObj
# Matplotlib3d isn't able to do full rotations about an y axis,
# which is what the NeuroMorpho models use, so
# here we shuffle the axes around. Should be an option.
Expand Down
4 changes: 2 additions & 2 deletions python/rdesigneur/rdesigneur.py
Original file line number Diff line number Diff line change
Expand Up @@ -769,8 +769,8 @@ def _buildMoogli( self ):
pair = i.elecpath + " " + i.geom_expr
dendCompts = self.elecid.compartmentsFromExpression[ pair ]
spineCompts = self.elecid.spinesFromExpression[ pair ]
dendObj, mooField = self._parseComptField( dendCompts, i, knownFields )
spineObj, mooField2 = self._parseComptField( spineCompts, i, knownFields )
dendObj, mooField = self._MoogparseComptField( dendCompts, i, knownFields )
spineObj, mooField2 = self._MoogparseComptField( spineCompts, i, knownFields )
assert( mooField == mooField2 )
mooObj3 = dendObj + spineObj
numMoogli = len( mooObj3 )
Expand Down
2 changes: 1 addition & 1 deletion python/rdesigneur/rmoogli.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def makeMoogli( rd, mooObj, args, fieldInfo ):
valMin = ymin, valMax = ymax )
viewer.addDrawable( reacSystem )
else:
neuron = moogul.MooNeuron( rd.elecid, fieldInfo,
neuron = moogul.MooNeuron( mooObj, fieldInfo,
field = mooField, relativeObj = relObjPath,
valMin = ymin, valMax = ymax )
print( "min = {}, max = {}".format(ymin, ymax) )
Expand Down