Skip to content

PR 407 + tweaks #421

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

Merged
merged 84 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
c24a91b
Added ExportNML.py file to export SWC into NeuroML
AdityaPandeyCN Jul 18, 2024
d61a66b
removed example usage
AdityaPandeyCN Jul 18, 2024
8860733
removed unused variable
AdityaPandeyCN Jul 18, 2024
90de9ce
refactored the whole code
AdityaPandeyCN Jul 26, 2024
d12cd95
Merge branch 'development' of https://github.com/NeuroML/pyNeuroML in…
AdityaPandeyCN Jul 29, 2024
609dfaa
refactored for handling wrong node types
AdityaPandeyCN Jul 31, 2024
b845beb
added logger
AdityaPandeyCN Jul 31, 2024
6223b02
refactored the code with reference to using the neuroml library
AdityaPandeyCN Aug 5, 2024
7bd56db
removed unused imports
AdityaPandeyCN Aug 5, 2024
e1886b1
added SWCGraph and removed Segment.type
AdityaPandeyCN Aug 6, 2024
2da58d1
added __init__.py file
AdityaPandeyCN Aug 6, 2024
c617ef2
added unittest file
AdityaPandeyCN Aug 6, 2024
1bd17ce
removed absolute import
AdityaPandeyCN Aug 6, 2024
2112586
refactored to add component_factory
AdityaPandeyCN Aug 6, 2024
6e1a738
renmaed the test file
AdityaPandeyCN Aug 7, 2024
ca5c326
renmaed the test file
AdityaPandeyCN Aug 7, 2024
4dd5006
renmaed the test file
AdityaPandeyCN Aug 7, 2024
f46f933
added comments to provide more clarity
AdityaPandeyCN Aug 7, 2024
9fa84cc
removed component_factory
AdityaPandeyCN Aug 8, 2024
3a5a8cc
refactored the Export file
AdityaPandeyCN Aug 14, 2024
ab280ac
refactored the code for better segment formation
AdityaPandeyCN Aug 18, 2024
fcca73b
Delete pyneuroml/swc/dCH-cobalt.CNG.nml
AdityaPandeyCN Aug 18, 2024
38c24b0
refactore docstrings
AdityaPandeyCN Aug 18, 2024
e7dc36b
Merge branch 'feat/ExportSWC' of https://github.com/AdityaBITMESRA/py…
AdityaPandeyCN Aug 18, 2024
aa40ae5
refactored docstrings
AdityaPandeyCN Aug 18, 2024
34642ac
used relative imports
AdityaPandeyCN Aug 19, 2024
6d98ec2
removed the segment duplication error
AdityaPandeyCN Aug 20, 2024
ad92502
some changes
AdityaPandeyCN Aug 21, 2024
5bad25f
changes
AdityaPandeyCN Aug 21, 2024
89b5fd9
changes
AdityaPandeyCN Aug 21, 2024
1509d16
resolved the non-processing of non soma points error
AdityaPandeyCN Aug 21, 2024
b88b1a3
resolved the non-processing of non soma points error
AdityaPandeyCN Aug 21, 2024
d1d75f4
added detailed docstrings
AdityaPandeyCN Aug 22, 2024
7290dc9
refactored multipoint soma handling
AdityaPandeyCN Aug 22, 2024
612815d
Merge branch 'development' into feat/ExportSWC-ankur
sanjayankur31 Aug 27, 2024
763d35a
chore(swc): remove a few redundant bits
sanjayankur31 Aug 27, 2024
d00bfc3
chore: update docstrings
sanjayankur31 Aug 27, 2024
d6f02fd
chore(export-nml): update imports
sanjayankur31 Aug 27, 2024
d523cba
chore(export-nml): make methods private
sanjayankur31 Aug 27, 2024
5f6bd55
feat: add new pynml-swc2nml command line
sanjayankur31 Aug 27, 2024
2af654f
chore(swc2nml): correct command line arg
sanjayankur31 Aug 27, 2024
05036cc
feat(swc2nml): use debug for more logging
sanjayankur31 Aug 27, 2024
a81c280
feat(load-swc): reduce warning logging
sanjayankur31 Aug 27, 2024
5554ea8
chore(load-swc): also print line number for non-header comments
sanjayankur31 Aug 27, 2024
780c60c
chore(swc2nml): remove unused variables
sanjayankur31 Aug 27, 2024
49ff1f3
feat(load-swc): add filename in metadata if not included
sanjayankur31 Aug 27, 2024
ae244b7
chore(swc2nml): move notes to morphology element
sanjayankur31 Aug 27, 2024
d59a2b7
chore(swc2nml): replace spaces with `_` in segment names
sanjayankur31 Aug 27, 2024
37ded70
feat(swc2nml): allow exporting standalone Morphology element
sanjayankur31 Aug 27, 2024
9d5e697
feat(load-swc): check that first point line is root, with parent '-1'
sanjayankur31 Aug 27, 2024
c11a4ff
feat(swc2nml): use graph root as start point
sanjayankur31 Aug 27, 2024
fc882de
chore(swc2nml): re-order method args for consistency
sanjayankur31 Aug 27, 2024
3c57468
chore: comment purpose of class variables
sanjayankur31 Aug 29, 2024
c2ab280
wip: reviewing
sanjayankur31 Aug 29, 2024
398f4aa
chore(swc2nml): use try/except instead of check
sanjayankur31 Sep 3, 2024
ce8f4ae
feat(swc2nml): refactor general segment creation
sanjayankur31 Sep 3, 2024
326988d
feat(swc2nml): strip down tests
sanjayankur31 Sep 3, 2024
21eb3cb
feat(swc2nml): return NeuroMLDocument for programmatic access
sanjayankur31 Sep 3, 2024
d3ed6bb
chore: ignore `.coverage` everywhere
sanjayankur31 Sep 3, 2024
b77390d
chore: `logger.warn` -> `logger.warning`
sanjayankur31 Sep 3, 2024
bcf71c4
feat(swc2nml): allow main generate function to also only do morph
sanjayankur31 Sep 3, 2024
e9e2e60
test(swc2nml): checkin CVApp generated nml files
sanjayankur31 Sep 3, 2024
477e9ae
chore(load-swc): start line count from 0
sanjayankur31 Sep 3, 2024
35c3e41
test(swc2nml): re-do to compare created Python objects
sanjayankur31 Sep 3, 2024
0a881c7
refactor(swc2nml): comment code, other cosmetic changes
sanjayankur31 Sep 3, 2024
8612387
feat(swc2nml): improve `handle_soma` documentation and structure
sanjayankur31 Sep 3, 2024
0bb18a9
fix(swc2nml): correctly include parent info
sanjayankur31 Sep 3, 2024
3c56f28
wip(swc2nml): improve tests
sanjayankur31 Sep 3, 2024
e79c23b
chore: remove unused import
sanjayankur31 Sep 3, 2024
cf0d077
test(swc2nml): parameterize tests
sanjayankur31 Sep 4, 2024
0b72255
feat(swc2nml): note addition of proximal point to "cable" roots
sanjayankur31 Sep 4, 2024
99f0b0f
fix(swc2nml): correct generation of multi-point soma segments
sanjayankur31 Sep 4, 2024
0cd7e50
test(swc2nml): also match all the segments individually
sanjayankur31 Sep 4, 2024
57a86a5
chore(swc2nml): remove unused import
sanjayankur31 Sep 4, 2024
0755ed2
chore(swc2nml): add man page
sanjayankur31 Sep 4, 2024
1367ec5
feat(swc2nml): improve multi-point soma conversion
sanjayankur31 Sep 4, 2024
a486102
fix(swc2nml): handle all other soma cases, not just ones with >3 points
sanjayankur31 Sep 4, 2024
9f4e478
chore(pre-commit): allow 2MB files
sanjayankur31 Sep 4, 2024
4a0eda4
test(swc2nml): check in test swc + CVapp NML files
sanjayankur31 Sep 4, 2024
c2a4f38
chore(swc): tweak info message
sanjayankur31 Sep 4, 2024
9eda784
feat(swc2nml): improve segment group creation
sanjayankur31 Sep 4, 2024
e45cbc1
test(swc2nml): allow skipping detailed checks
sanjayankur31 Sep 4, 2024
1ee37a2
feat(plot-morph): use default group colours for single cells
sanjayankur31 Sep 4, 2024
6aee352
chore: remove stray print
sanjayankur31 Sep 4, 2024
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ examples/results/*.dat
.mypy_cache/
/examples/test_data/TwoCell.net.png
/examples/test_data/Purk2M9s.png
/.coverage
**/.coverage
/Nav.channel.nml
/iv_izh2007RS0.net.nml
/leak_chan.channel.nml
Expand Down
7 changes: 4 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
args: [ "--maxkb=5000"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.1
hooks:
Expand Down
1 change: 1 addition & 0 deletions man/man1/common.h2m
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
.BR pynml-povray (1),
.BR pynml-sonata (1),
.BR pynml-summary (1),
.BR pynml-swc2nml (1),
.BR pynml-tune (1),
.BR pynml-xpp (1),
.PP
Expand Down
3 changes: 2 additions & 1 deletion man/man1/pynml-archive.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-ARCHIVE "1" "August 2024" "pynml-archive v1.3.9" "User Commands"
.TH PYNML-ARCHIVE "1" "September 2024" "pynml-archive v1.3.9" "User Commands"
.SH NAME
pynml-archive \- manual page for pynml-archive v1.3.9
.SH DESCRIPTION
Expand Down Expand Up @@ -45,6 +45,7 @@ master file.
.BR pynml-povray (1),
.BR pynml-sonata (1),
.BR pynml-summary (1),
.BR pynml-swc2nml (1),
.BR pynml-tune (1),
.BR pynml-xpp (1),
.PP
Expand Down
3 changes: 2 additions & 1 deletion man/man1/pynml-channelanalysis.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-CHANNELANALYSIS "1" "August 2024" "pynml-channelanalysis v1.3.9" "User Commands"
.TH PYNML-CHANNELANALYSIS "1" "September 2024" "pynml-channelanalysis v1.3.9" "User Commands"
.SH NAME
pynml-channelanalysis \- manual page for pynml-channelanalysis v1.3.9
.SH DESCRIPTION
Expand Down Expand Up @@ -105,6 +105,7 @@ plot current vs voltage for ion channel
.BR pynml-povray (1),
.BR pynml-sonata (1),
.BR pynml-summary (1),
.BR pynml-swc2nml (1),
.BR pynml-tune (1),
.BR pynml-xpp (1),
.PP
Expand Down
3 changes: 2 additions & 1 deletion man/man1/pynml-channelml2nml.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-CHANNELML2NML "1" "August 2024" "pynml-channelml2nml v1.3.9" "User Commands"
.TH PYNML-CHANNELML2NML "1" "September 2024" "pynml-channelml2nml v1.3.9" "User Commands"
.SH NAME
pynml-channelml2nml \- manual page for pynml-channelml2nml v1.3.9
.SH DESCRIPTION
Expand Down Expand Up @@ -36,6 +36,7 @@ Name of the outputfile file
.BR pynml-povray (1),
.BR pynml-sonata (1),
.BR pynml-summary (1),
.BR pynml-swc2nml (1),
.BR pynml-tune (1),
.BR pynml-xpp (1),
.PP
Expand Down
3 changes: 2 additions & 1 deletion man/man1/pynml-modchananalysis.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-MODCHANANALYSIS "1" "August 2024" "pynml-modchananalysis v1.3.9" "User Commands"
.TH PYNML-MODCHANANALYSIS "1" "September 2024" "pynml-modchananalysis v1.3.9" "User Commands"
.SH NAME
pynml-modchananalysis \- manual page for pynml-modchananalysis v1.3.9
.SH DESCRIPTION
Expand Down Expand Up @@ -70,6 +70,7 @@ Name of the mod file containing the channel
.BR pynml-povray (1),
.BR pynml-sonata (1),
.BR pynml-summary (1),
.BR pynml-swc2nml (1),
.BR pynml-tune (1),
.BR pynml-xpp (1),
.PP
Expand Down
3 changes: 2 additions & 1 deletion man/man1/pynml-plotchan.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-PLOTCHAN "1" "August 2024" "pynml-plotchan v1.3.9" "User Commands"
.TH PYNML-PLOTCHAN "1" "September 2024" "pynml-plotchan v1.3.9" "User Commands"
.SH NAME
pynml-plotchan \- manual page for pynml-plotchan v1.3.9
.SH DESCRIPTION
Expand Down Expand Up @@ -36,6 +36,7 @@ Do not show plots as they are generated
.BR pynml-povray (1),
.BR pynml-sonata (1),
.BR pynml-summary (1),
.BR pynml-swc2nml (1),
.BR pynml-tune (1),
.BR pynml-xpp (1),
.PP
Expand Down
3 changes: 2 additions & 1 deletion man/man1/pynml-plotmorph.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-PLOTMORPH "1" "August 2024" "pynml-plotmorph v1.3.9" "User Commands"
.TH PYNML-PLOTMORPH "1" "September 2024" "pynml-plotmorph v1.3.9" "User Commands"
.SH NAME
pynml-plotmorph \- manual page for pynml-plotmorph v1.3.9
.SH DESCRIPTION
Expand Down Expand Up @@ -79,6 +79,7 @@ Scale axes so that image is approximately square, for
.BR pynml-povray (1),
.BR pynml-sonata (1),
.BR pynml-summary (1),
.BR pynml-swc2nml (1),
.BR pynml-tune (1),
.BR pynml-xpp (1),
.PP
Expand Down
3 changes: 2 additions & 1 deletion man/man1/pynml-plotspikes.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-PLOTSPIKES "1" "August 2024" "pynml-plotspikes v1.3.9" "User Commands"
.TH PYNML-PLOTSPIKES "1" "September 2024" "pynml-plotspikes v1.3.9" "User Commands"
.SH NAME
pynml-plotspikes \- manual page for pynml-plotspikes v1.3.9
.SH DESCRIPTION
Expand Down Expand Up @@ -58,6 +58,7 @@ Number of bins for rate histogram
.BR pynml-povray (1),
.BR pynml-sonata (1),
.BR pynml-summary (1),
.BR pynml-swc2nml (1),
.BR pynml-tune (1),
.BR pynml-xpp (1),
.PP
Expand Down
3 changes: 2 additions & 1 deletion man/man1/pynml-plottimeseries.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-PLOTTIMESERIES "1" "August 2024" "pynml-plottimeseries v1.3.9" "User Commands"
.TH PYNML-PLOTTIMESERIES "1" "September 2024" "pynml-plottimeseries v1.3.9" "User Commands"
.SH NAME
pynml-plottimeseries \- manual page for pynml-plottimeseries v1.3.9
.SH DESCRIPTION
Expand Down Expand Up @@ -36,6 +36,7 @@ Name of the image file to save plot to
.BR pynml-povray (1),
.BR pynml-sonata (1),
.BR pynml-summary (1),
.BR pynml-swc2nml (1),
.BR pynml-tune (1),
.BR pynml-xpp (1),
.PP
Expand Down
3 changes: 2 additions & 1 deletion man/man1/pynml-povray.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-POVRAY "1" "August 2024" "pynml-povray v1.3.9" "User Commands"
.TH PYNML-POVRAY "1" "September 2024" "pynml-povray v1.3.9" "User Commands"
.SH NAME
pynml-povray \- manual page for pynml-povray v1.3.9
.SH DESCRIPTION
Expand Down Expand Up @@ -107,6 +107,7 @@ Show segment ids
.BR pynml-povray (1),
.BR pynml-sonata (1),
.BR pynml-summary (1),
.BR pynml-swc2nml (1),
.BR pynml-tune (1),
.BR pynml-xpp (1),
.PP
Expand Down
3 changes: 2 additions & 1 deletion man/man1/pynml-sonata.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-SONATA "1" "August 2024" "pynml-sonata v1.3.9" "User Commands"
.TH PYNML-SONATA "1" "September 2024" "pynml-sonata v1.3.9" "User Commands"
.SH NAME
pynml-sonata \- manual page for pynml-sonata v1.3.9
.SH DESCRIPTION
Expand Down Expand Up @@ -45,6 +45,7 @@ jNeuroML_NEURON
.BR pynml-povray (1),
.BR pynml-sonata (1),
.BR pynml-summary (1),
.BR pynml-swc2nml (1),
.BR pynml-tune (1),
.BR pynml-xpp (1),
.PP
Expand Down
3 changes: 2 additions & 1 deletion man/man1/pynml-summary.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-SUMMARY "1" "August 2024" "pynml-summary v1.3.9" "User Commands"
.TH PYNML-SUMMARY "1" "September 2024" "pynml-summary v1.3.9" "User Commands"
.SH NAME
pynml-summary \- manual page for pynml-summary v1.3.9
.SH DESCRIPTION
Expand Down Expand Up @@ -30,6 +30,7 @@ print this help text and exit
.BR pynml-povray (1),
.BR pynml-sonata (1),
.BR pynml-summary (1),
.BR pynml-swc2nml (1),
.BR pynml-tune (1),
.BR pynml-xpp (1),
.PP
Expand Down
45 changes: 45 additions & 0 deletions man/man1/pynml-swc2nml.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-SWC2NML "1" "September 2024" "pynml-swc2nml v1.3.9" "User Commands"
.SH NAME
pynml-swc2nml \- manual page for pynml-swc2nml v1.3.9
.SH DESCRIPTION
usage: pynml\-swc2nml [\-h] [\-neuromlFile <NeuroML file>] [\-morphOnly]
.IP
<SWC file>
.PP
Convert provided SWC file to NeuroML2
.SS "positional arguments:"
.TP
<SWC file>
Name of the input SWC file
.SS "options:"
.TP
\fB\-h\fR, \fB\-\-help\fR
show this help message and exit
.TP
\fB\-neuromlFile\fR <NeuroML file>
Name of the output NeuroML file
.TP
\fB\-morphOnly\fR
Export as standalone Morphology, not as a Cell
.SH "SEE-ALSO"
.BR pynml (1),
.BR pynml-archive (1),
.BR pynml-channelanalysis (1),
.BR pynml-channelml2nml (1),
.BR pynml-modchananalysis (1),
.BR pynml-plotchan (1),
.BR pynml-plotmorph (1),
.BR pynml-plotspikes (1),
.BR pynml-plottimeseries (1),
.BR pynml-povray (1),
.BR pynml-sonata (1),
.BR pynml-summary (1),
.BR pynml-swc2nml (1),
.BR pynml-tune (1),
.BR pynml-xpp (1),
.PP
Please see https://docs.neuroml.org for complete documentation on the NeuroML standard and the software ecosystem.
.SH ENVIRONMENT
.PP
pyNeuroML v1.3.9 (libNeuroML v0.6.4, jNeuroML v0.13.3)
3 changes: 2 additions & 1 deletion man/man1/pynml-tune.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-TUNE "1" "August 2024" "pynml-tune v1.3.9" "User Commands"
.TH PYNML-TUNE "1" "September 2024" "pynml-tune v1.3.9" "User Commands"
.SH NAME
pynml-tune \- manual page for pynml-tune v1.3.9
.SH DESCRIPTION
Expand Down Expand Up @@ -143,6 +143,7 @@ as optimisation progresses?
.BR pynml-povray (1),
.BR pynml-sonata (1),
.BR pynml-summary (1),
.BR pynml-swc2nml (1),
.BR pynml-tune (1),
.BR pynml-xpp (1),
.PP
Expand Down
3 changes: 2 additions & 1 deletion man/man1/pynml-xpp.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-XPP "1" "August 2024" "pynml-xpp v1.3.9" "User Commands"
.TH PYNML-XPP "1" "September 2024" "pynml-xpp v1.3.9" "User Commands"
.SH NAME
pynml-xpp \- manual page for pynml-xpp v1.3.9
.SH DESCRIPTION
Expand Down Expand Up @@ -45,6 +45,7 @@ Plot saved variables
.BR pynml-povray (1),
.BR pynml-sonata (1),
.BR pynml-summary (1),
.BR pynml-swc2nml (1),
.BR pynml-tune (1),
.BR pynml-xpp (1),
.PP
Expand Down
3 changes: 2 additions & 1 deletion man/man1/pynml.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML "1" "August 2024" "pynml v1.3.9" "User Commands"
.TH PYNML "1" "September 2024" "pynml v1.3.9" "User Commands"
.SH NAME
pynml \- manual page for pynml v1.3.9
.SH DESCRIPTION
Expand Down Expand Up @@ -219,6 +219,7 @@ Load NeuroML file(s), and convert it to swc format
.BR pynml-povray (1),
.BR pynml-sonata (1),
.BR pynml-summary (1),
.BR pynml-swc2nml (1),
.BR pynml-tune (1),
.BR pynml-xpp (1),
.PP
Expand Down
17 changes: 12 additions & 5 deletions pyneuroml/plot/PlotMorphologyVispy.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,11 +725,18 @@ def plot_interactive_3D(
while pos_pop:
cell_index, pos = pos_pop.popitem()
radius = pop_id_vs_radii[pop_id] if pop_id in pop_id_vs_radii else 10
color = (
pop_id_vs_color[pop_id]
if pop_id in pop_id_vs_color
else random.choice(get_color_names())
)

# use color if specified in property
try:
color = pop_id_vs_color[pop_id]
except KeyError:
# if single cell only, use default groups
if total_cells == 1:
color = "default groups"
# if multiple cells, use different colors for each cell
else:
color = random.choice(get_color_names())

# if hightlight spec has a color for the cell, use that
try:
color = highlight_spec[cell.id]["cell_color"]
Expand Down
Loading