Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3D positions of cells being displayed incorrectly #794

Open
pgleeson opened this issue Dec 19, 2023 · 1 comment
Open

3D positions of cells being displayed incorrectly #794

pgleeson opened this issue Dec 19, 2023 · 1 comment

Comments

@pgleeson
Copy link
Contributor

This NeuroML file contains 2 cells, a basket cell on the left (at the origin) and a pyramidal cell on the right (at <location x="400.0" y="-200.0" z="0.0"/>). The soma of the pyramidal cell should be below the basket cell as shown in this export of the cell from NML (use: pynml -png TwoCell.net.nml, see here):

TwoCell net

However when this is imported into NetPyNE (e.g. by creating a workspace from https://v2.opensourcebrain.org/repositories/14 and importing the NML file above) the soma is above the basket cell (left below):

Screenshot 2023-12-19 at 16 19 43

The correct position seems to be in netpyne's memory, as the right panel shows its own 3D view, with the yellow dot on the right for the pyramidal cell at the right locaion.

Also a json file exported from the neuroml version has the right location: https://github.com/OpenSourceBrain/NetPyNEShowcase/blob/master/NetPyNE/TwoCells/LEMS_TwoCell_netpyne_data.json#L29

Is it possibly the issue is to do with the "ynorm": -2.0 linked above, as the y position looks like it is wrongly multiplied by -2?

@pgleeson
Copy link
Contributor Author

This seems to be the source of the error...

x=float(cell['tags']['x'] * netpyne_model.net.params.cellsVisualizationSpacingMultiplier[0]),
y=-float(cell['tags']['y'] * netpyne_model.net.params.cellsVisualizationSpacingMultiplier[1]),
z=float(cell['tags']['z'] * netpyne_model.net.params.cellsVisualizationSpacingMultiplier[2])

The y value is being multiplied by -1, but not x or z... I can't think of any reason why you would explicitly state in the cellList that you want x=10, y=20, z=30 and then use (10,-20,30)... If the y axis should be pointing down for positive y, then why are all the cells displayed correctly with increasing y values on segments pointing up???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant