From e9c36661f33a37807a78cf8c1bc057191490a8d4 Mon Sep 17 00:00:00 2001 From: Cyrille Pierre Henri Favreau Date: Thu, 23 May 2024 12:07:23 +0200 Subject: [PATCH] Added connectome population name to add_astrocytes API --- bioexplorer/backend/science/api/Params.cpp | 1 + bioexplorer/backend/science/common/Types.h | 5 +++-- .../backend/science/io/db/DBConnector.cpp | 5 ++--- .../backend/science/io/db/DBConnector.h | 3 ++- .../science/morphologies/Astrocytes.cpp | 4 +++- .../pythonsdk/bioexplorer/bio_explorer.py | 9 +++++++++ .../astrocytes/BioExplorer_astrocytes.ipynb | 1 + .../BioExplorer_animated_astrocytes.ipynb | 9 +++++---- .../BioExplorer_neuromodulation_movie.ipynb | 8 +++++--- ...oExplorer_neuronmodulation_components.ipynb | 15 +++++++++------ .../BioExplorer_neuronmodulation_covers.ipynb | 16 +++++++++------- ...oExplorer_neuronmodulation_full_movie.ipynb | 13 ++++++++----- ...sculature_and_astrocytes_radii_report.ipynb | 16 +++++++++------- .../vasculature/BioExplorer_ngv.ipynb | 18 +++++++++++------- 14 files changed, 77 insertions(+), 46 deletions(-) diff --git a/bioexplorer/backend/science/api/Params.cpp b/bioexplorer/backend/science/api/Params.cpp index 043f9ddc4..ef518104e 100644 --- a/bioexplorer/backend/science/api/Params.cpp +++ b/bioexplorer/backend/science/api/Params.cpp @@ -944,6 +944,7 @@ bool from_json(AstrocytesDetails ¶m, const std::string &payload) FROM_JSON(param, js, assemblyName); FROM_JSON(param, js, populationName); FROM_JSON(param, js, vasculaturePopulationName); + FROM_JSON(param, js, connectomePopulationName); FROM_JSON(param, js, loadSomas); FROM_JSON(param, js, loadDendrites); FROM_JSON(param, js, generateInternals); diff --git a/bioexplorer/backend/science/common/Types.h b/bioexplorer/backend/science/common/Types.h index a5c7a6c93..dab15bcfe 100644 --- a/bioexplorer/backend/science/common/Types.h +++ b/bioexplorer/backend/science/common/Types.h @@ -1469,9 +1469,10 @@ typedef struct std::string assemblyName; /** Name of the population of astrocytes */ std::string populationName; - /** Name of the vasculature population. If not empty, endfeet are - * automatically loaded */ + /** Name of the vasculature population. If not empty, endfeet are automatically loaded */ std::string vasculaturePopulationName; + /** Name of the connectome population. If not empty, endfeet are automatically loaded */ + std::string connectomePopulationName; /** Load somas if set to true */ bool loadSomas{true}; /** Load dendrites if set to true */ diff --git a/bioexplorer/backend/science/io/db/DBConnector.cpp b/bioexplorer/backend/science/io/db/DBConnector.cpp index bf1dacdab..065a881cb 100644 --- a/bioexplorer/backend/science/io/db/DBConnector.cpp +++ b/bioexplorer/backend/science/io/db/DBConnector.cpp @@ -48,7 +48,6 @@ namespace db { const std::string DB_SCHEMA_OUT_OF_CORE = "outofcore"; const std::string DB_SCHEMA_METABOLISM = "metabolism"; -const std::string DB_SCHEMA_CONNECTOME = "connectome"; DBConnector* DBConnector::_instance = nullptr; std::mutex DBConnector::_mutex; @@ -568,7 +567,7 @@ SectionMap DBConnector::getAstrocyteSections(const std::string& populationName, return sections; } -EndFootMap DBConnector::getAstrocyteEndFeet(const std::string& vasculaturePopulationName, +EndFootMap DBConnector::getAstrocyteEndFeet(const std::string& vasculaturePopulationName, const std::string& connectomePopulationName, const uint64_t astrocyteId) const { CHECK_DB_INITIALIZATION @@ -584,7 +583,7 @@ EndFootMap DBConnector::getAstrocyteEndFeet(const std::string& vasculaturePopula "c.endfoot_compartment_length, c.endfoot_compartment_diameter " "* " "0.5 FROM " + - DB_SCHEMA_CONNECTOME + ".glio_vascular as c, " + vasculaturePopulationName + + connectomePopulationName + ".glio_vascular as c, " + vasculaturePopulationName + ".node as n WHERE c.vasculature_node_guid=n.guid AND " "c.astrocyte_guid=" + std::to_string(astrocyteId); diff --git a/bioexplorer/backend/science/io/db/DBConnector.h b/bioexplorer/backend/science/io/db/DBConnector.h index ea3f76802..ea8436652 100644 --- a/bioexplorer/backend/science/io/db/DBConnector.h +++ b/bioexplorer/backend/science/io/db/DBConnector.h @@ -220,10 +220,11 @@ class DBConnector * @brief Get the end-feet as nodes for a given astrocyte * * @param vasculaturePopulationName Name of the vasculature population + * @param connectomePopulationName Name of the connectome population * @param astrocyteId Identifier of the astrocyte * @return EndFootNodesMap A map of end-feet */ - morphology::EndFootMap getAstrocyteEndFeet(const std::string& vasculaturePopulationName, + morphology::EndFootMap getAstrocyteEndFeet(const std::string& vasculaturePopulationName, const std::string& connectomePopulationName, const uint64_t astrocyteId) const; /** diff --git a/bioexplorer/backend/science/morphologies/Astrocytes.cpp b/bioexplorer/backend/science/morphologies/Astrocytes.cpp index 60f3e3764..78c3634f6 100644 --- a/bioexplorer/backend/science/morphologies/Astrocytes.cpp +++ b/bioexplorer/backend/science/morphologies/Astrocytes.cpp @@ -170,7 +170,7 @@ void Astrocytes::_buildModel(const LoaderProgress& callback, const doubles& radi // End feet EndFootMap endFeet; if (loadEndFeet) - endFeet = connector.getAstrocyteEndFeet(_details.vasculaturePopulationName, somaId); + endFeet = connector.getAstrocyteEndFeet(_details.vasculaturePopulationName, _details.connectomePopulationName, somaId); // Soma radius uint64_t count = 1; @@ -421,6 +421,8 @@ void Astrocytes::_addEndFoot(ThreadSafeContainer& container, const Vector3d& som connector.getVasculatureNodes(_details.vasculaturePopulationName, "section_guid=" + std::to_string(endFoot.second.vasculatureSectionId)); + if (vasculatureNodes.empty()) + continue; uint64_t startIndex = 0; uint64_t endIndex = 1; const auto halfLength = endFoot.second.length / 2.0; diff --git a/bioexplorer/pythonsdk/bioexplorer/bio_explorer.py b/bioexplorer/pythonsdk/bioexplorer/bio_explorer.py index 658cdfef0..ff856bc7d 100644 --- a/bioexplorer/pythonsdk/bioexplorer/bio_explorer.py +++ b/bioexplorer/pythonsdk/bioexplorer/bio_explorer.py @@ -112,6 +112,8 @@ class BioExplorer: morphology_representation = MorphologyRepresentation morphology_color_scheme = MorphologyColorScheme morphology_realism_level = MorphologyRealismLevel + + population_color_scheme = PopulationColorScheme synapse_representation = SynapseRepresentation @@ -2814,6 +2816,7 @@ def add_astrocytes( assembly_name, population_name, vasculature_population_name="", + connectome_population_name="", realism_level=MorphologyRealismLevel.NONE, load_somas=True, load_dendrites=True, @@ -2838,6 +2841,8 @@ def add_astrocytes( :population_name: Name of the population of astrocytes :vasculature_population_name: Name of the vasculature population. Automatically load end-feet if not empty + :connectome_population_name: Name of the connectome population. Automatically load + end-feet if not empty :load_somas: Load somas if set to true :load_dendrites: Load dendrites if set to true :generate_internals: Generate internals (Nucleus and mitochondria) @@ -2859,11 +2864,15 @@ def add_astrocytes( assert isinstance(scale, Vector3) assert isinstance(animation_params, CellAnimationParams) assert isinstance(displacement_params, AstrocyteDisplacementParams) + if vasculature_population_name != '': + if connectome_population_name == '': + raise RuntimeError("A connectome population must be specified together with the vasculature population") params = dict() params["assemblyName"] = assembly_name params["populationName"] = population_name params["vasculaturePopulationName"] = vasculature_population_name + params["connectomePopulationName"] = connectome_population_name params["loadSomas"] = load_somas params["loadDendrites"] = load_dendrites params["generateInternals"] = generate_internals diff --git a/bioexplorer/pythonsdk/notebooks/astrocytes/BioExplorer_astrocytes.ipynb b/bioexplorer/pythonsdk/notebooks/astrocytes/BioExplorer_astrocytes.ipynb index 4bb165542..0ad5598dd 100644 --- a/bioexplorer/pythonsdk/notebooks/astrocytes/BioExplorer_astrocytes.ipynb +++ b/bioexplorer/pythonsdk/notebooks/astrocytes/BioExplorer_astrocytes.ipynb @@ -66,6 +66,7 @@ " assembly_name=assembly_name,\n", " population_name='Astrocytes',\n", " vasculature_population_name='vasculature',\n", + " connectome_population_name='connectome',\n", " load_micro_domains=False,\n", " load_dendrites=True,\n", " morphology_color_scheme=be.morphology_color_scheme.SECTION_TYPE,\n", diff --git a/bioexplorer/pythonsdk/notebooks/astrocytes/animation/BioExplorer_animated_astrocytes.ipynb b/bioexplorer/pythonsdk/notebooks/astrocytes/animation/BioExplorer_animated_astrocytes.ipynb index a54e41b67..7ca652250 100644 --- a/bioexplorer/pythonsdk/notebooks/astrocytes/animation/BioExplorer_animated_astrocytes.ipynb +++ b/bioexplorer/pythonsdk/notebooks/astrocytes/animation/BioExplorer_animated_astrocytes.ipynb @@ -132,7 +132,8 @@ " assembly_name=assembly_name,\n", " population_name='astrocytes',\n", " vasculature_population_name='vasculature',\n", - " population_color_scheme=be.POPULATION_COLOR_SCHEME_ID,\n", + " connectome_population_name='connectome',\n", + " population_color_scheme=be.population_color_scheme.ID,\n", " radius_multiplier=1.0,\n", " morphology_color_scheme=be.morphology_color_scheme.SECTION_TYPE,\n", " realism_level=be.morphology_realism_level.ALL,\n", @@ -144,7 +145,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 13, "id": "7cd24ef9", "metadata": {}, "outputs": [], @@ -205,9 +206,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.10" + "version": "3.10.12" } }, "nbformat": 4, "nbformat_minor": 5 -} \ No newline at end of file +} diff --git a/bioexplorer/pythonsdk/notebooks/neuromodulation/BioExplorer_neuromodulation_movie.ipynb b/bioexplorer/pythonsdk/notebooks/neuromodulation/BioExplorer_neuromodulation_movie.ipynb index 8dc26921b..cb07a72a0 100644 --- a/bioexplorer/pythonsdk/notebooks/neuromodulation/BioExplorer_neuromodulation_movie.ipynb +++ b/bioexplorer/pythonsdk/notebooks/neuromodulation/BioExplorer_neuromodulation_movie.ipynb @@ -69,6 +69,7 @@ "neuron_population_name = 'o1'\n", "vasculature_population_name = 'vasculature'\n", "astrocytes_population_name = 'astrocytes'\n", + "connectome_population_name='connectome'\n", "\n", "if load_neuron:\n", " neuron_sql_filter = 'guid=%d' % neuron_guid\n", @@ -79,7 +80,7 @@ " assembly_name=neuron_assembly_name,\n", " morphology_color_scheme=be.morphology_color_scheme.SECTION_TYPE,\n", " population_name=neuron_population_name,\n", - " realism_level=realism_level, generate_buttons=True,\n", + " realism_level=realism_level,\n", " synapses_type=be.neuron_synapse_type.AFFERENT, show_membrane=not load_mesh_neuron,\n", " generate_internals=True, generate_externals=False,\n", " sql_node_filter=neuron_sql_filter, scale=scale,\n", @@ -106,6 +107,7 @@ " assembly_name=astrocytes_assembly_name,\n", " population_name=astrocytes_population_name,\n", " vasculature_population_name=vasculature_population_name,\n", + " connectome_population_name=connectome_population_name,\n", " radius_multiplier=0.5,\n", " realism_level=realism_level, generate_internals=True,\n", " load_somas=True, load_dendrites=True,\n", @@ -752,9 +754,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.10" + "version": "3.10.12" } }, "nbformat": 4, "nbformat_minor": 5 -} \ No newline at end of file +} diff --git a/bioexplorer/pythonsdk/notebooks/neuromodulation/BioExplorer_neuronmodulation_components.ipynb b/bioexplorer/pythonsdk/notebooks/neuromodulation/BioExplorer_neuronmodulation_components.ipynb index c133430d9..4e4b4dcd8 100644 --- a/bioexplorer/pythonsdk/notebooks/neuromodulation/BioExplorer_neuronmodulation_components.ipynb +++ b/bioexplorer/pythonsdk/notebooks/neuromodulation/BioExplorer_neuronmodulation_components.ipynb @@ -151,7 +151,7 @@ "vasculature_model = be.add_vasculature(\n", " assembly_name=vasculature_assembly_name,\n", " population_name=vasculature_population_name,\n", - " representation=be.VASCULATURE_REPRESENTATION_SECTION,\n", + " representation=be.vascular_representation.SECTION,\n", " realism_level=be.morphology_realism_level.ALL,\n", " sql_filter='sqrt(pow(x - %f, 2) + pow(y - %f, 2) + pow(z - %f, 2)) < 200' % (target[0], target[1], target[2])\n", ")" @@ -165,11 +165,14 @@ "outputs": [], "source": [ "astrocytes_assembly_name = 'Astrocytes'\n", + "astrocytes_population_name = 'astrocytes'\n", + "connectome_population_name = 'connectome'\n", "be.remove_assembly(astrocytes_assembly_name)\n", "astrocytes_assembly = be.add_assembly(astrocytes_assembly_name)\n", "astrocytes_model = be.add_astrocytes(\n", " assembly_name=astrocytes_assembly_name,\n", - " population_name=vasculature_population_name,\n", + " population_name=astrocytes_population_name,\n", + " connectome_population_name=connectome_population_name,\n", " realism_level=be.morphology_realism_level.ALL,\n", " generate_internals=True,\n", " load_somas=True, load_dendrites=True,\n", @@ -213,12 +216,12 @@ " for material_id in material_ids:\n", " mid = material_id % palette_size\n", " colors.append(palette[mid])\n", - " if mid == be.NEURON_MATERIAL_SYNAPSE:\n", + " if mid in [be.neuron_material.AFFERENT_SYNAPSE, be.neuron_material.EFFERENT_SYNAPSE]:\n", " opacities.append(opacity)\n", " shading_modes.append(shading_mode)\n", " glossinesses.append(glossiness)\n", " specular_exponents.append(5.0)\n", - " elif mid in [be.NEURON_MATERIAL_VARICOSITY]:\n", + " elif mid in [be.neuron_material.VARICOSITY]:\n", " opacities.append(opacity)\n", " shading_modes.append(shading_mode)\n", " glossinesses.append(glossiness)\n", @@ -343,9 +346,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.10" + "version": "3.10.12" } }, "nbformat": 4, "nbformat_minor": 5 -} \ No newline at end of file +} diff --git a/bioexplorer/pythonsdk/notebooks/neuromodulation/BioExplorer_neuronmodulation_covers.ipynb b/bioexplorer/pythonsdk/notebooks/neuromodulation/BioExplorer_neuronmodulation_covers.ipynb index 477ce6d2f..c5c86572f 100644 --- a/bioexplorer/pythonsdk/notebooks/neuromodulation/BioExplorer_neuronmodulation_covers.ipynb +++ b/bioexplorer/pythonsdk/notebooks/neuromodulation/BioExplorer_neuronmodulation_covers.ipynb @@ -48,7 +48,6 @@ "from tqdm.notebook import tqdm\n", "\n", "db_host = os.getenv('DB_HOST')\n", - "db_host = '10.80.7.21'\n", "db_name = os.getenv('DB_NAME')\n", "db_user = os.getenv('DB_USER')\n", "db_password = os.getenv('DB_PASSWORD')\n", @@ -165,12 +164,15 @@ "outputs": [], "source": [ "astrocytes_assembly_name = 'Astrocytes'\n", + "astrocytes_population_name = 'astrocytes'\n", + "connectome_population_name = 'connectome'\n", "be.remove_assembly(astrocytes_assembly_name)\n", "astrocytes_assembly = be.add_assembly(astrocytes_assembly_name)\n", "astrocytes_model = be.add_astrocytes(\n", " assembly_name=astrocytes_assembly_name,\n", - " population_name=vasculature_population_name,\n", + " population_name=astrocytes_population_name,\n", " vasculature_population_name=vasculature_population_name,\n", + " connectome_population_name=connectome_population_name,\n", " radius_multiplier=0.5,\n", " realism_level=be.morphology_realism_level.ALL,\n", " generate_internals=True, load_somas=True, load_dendrites=True,\n", @@ -191,7 +193,7 @@ "acetylcholin_path = os.path.join(pdb_folder, 'neuromodulation', 'acetylcholin.pdb')\n", "\n", "def add_acetylcholin(radius, nb_molecules, radius_multiplier, frame=0):\n", - " protein_representation = be.REPRESENTATION_ATOMS\n", + " protein_representation = be.protein_representation.ATOMS\n", "\n", " acetylcholin_assembly_name = 'Acetylcholin'\n", " acetylcholin_name = 'Acetylcholin'\n", @@ -210,7 +212,7 @@ " )\n", " volume = Volume(\n", " name=acetylcholin_assembly_name,\n", - " shape=be.ASSEMBLY_SHAPE_FILLED_SPHERE,\n", + " shape=be.assembly_shape.FILLED_SPHERE,\n", " shape_params=Vector3(radius, 0.0, 0.0),\n", " protein=acetylcholin)\n", " be.add_volume(\n", @@ -258,7 +260,7 @@ "\n", " for material_id in material_ids:\n", " mid = material_id % palette_size\n", - " if mid == be.NEURON_MATERIAL_SYNAPSE:\n", + " if mid == [be.neuron_material.AFFERENT_SYNAPSE, be.neuron_material.EFFERENT_SYNAPSE]:\n", " colors.append(palette[0])\n", " opacities.append(1.0)\n", " shading_modes.append(shading_mode)\n", @@ -560,9 +562,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.10" + "version": "3.10.12" } }, "nbformat": 4, "nbformat_minor": 5 -} \ No newline at end of file +} diff --git a/bioexplorer/pythonsdk/notebooks/neuromodulation/BioExplorer_neuronmodulation_full_movie.ipynb b/bioexplorer/pythonsdk/notebooks/neuromodulation/BioExplorer_neuronmodulation_full_movie.ipynb index f7a2ead62..0434ca558 100644 --- a/bioexplorer/pythonsdk/notebooks/neuromodulation/BioExplorer_neuronmodulation_full_movie.ipynb +++ b/bioexplorer/pythonsdk/notebooks/neuromodulation/BioExplorer_neuronmodulation_full_movie.ipynb @@ -235,12 +235,15 @@ "outputs": [], "source": [ "astrocytes_assembly_name = 'Astrocytes'\n", + "astrocytes_population_name = 'astrocytes'\n", + "connectome_population_name = 'connectome'\n", "be.remove_assembly(astrocytes_assembly_name)\n", "astrocytes_assembly = be.add_assembly(astrocytes_assembly_name)\n", "astrocytes_model = be.add_astrocytes(\n", " assembly_name=astrocytes_assembly_name,\n", - " population_name=vasculature_population_name,\n", + " population_name=astrocytes_population_name,\n", " vasculature_population_name=vasculature_population_name,\n", + " connectome_population_name=connectome_population_name,\n", " radius_multiplier=0.5,\n", " realism_level=be.morphology_realism_level.ALL,\n", " generate_internals=True, load_somas=True, load_dendrites=True,\n", @@ -323,13 +326,13 @@ "\n", " for material_id in material_ids:\n", " mid = material_id % palette_size\n", - " if mid == be.NEURON_MATERIAL_SYNAPSE:\n", + " if mid in [be.neuron_material.AFFERENT_SYNAPSE, be.neuron_material.EFFERENT_SYNAPSE]:\n", " colors.append(palette[1])\n", " opacities.append(1.0)\n", " shading_modes.append(shading_mode)\n", " glossinesses.append(glossiness)\n", " specular_exponents.append(5.0)\n", - " elif mid in [be.NEURON_MATERIAL_VARICOSITY]:\n", + " elif mid in [be.neuron_material.VARICOSITY]:\n", " colors.append(palette[min(2, palette_size-1)])\n", " opacities.append(1.0)\n", " shading_modes.append(shading_mode)\n", @@ -630,9 +633,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.10" + "version": "3.10.12" } }, "nbformat": 4, "nbformat_minor": 5 -} \ No newline at end of file +} diff --git a/bioexplorer/pythonsdk/notebooks/vasculature/BioExplorer_full_vasculature_and_astrocytes_radii_report.ipynb b/bioexplorer/pythonsdk/notebooks/vasculature/BioExplorer_full_vasculature_and_astrocytes_radii_report.ipynb index 76bb247ad..e732c6eac 100644 --- a/bioexplorer/pythonsdk/notebooks/vasculature/BioExplorer_full_vasculature_and_astrocytes_radii_report.ipynb +++ b/bioexplorer/pythonsdk/notebooks/vasculature/BioExplorer_full_vasculature_and_astrocytes_radii_report.ipynb @@ -79,14 +79,16 @@ "outputs": [], "source": [ "astrocyte_end_feet_assembly_name = 'AstrocytesEndFeet'\n", - "astrocyte_population_name = 'Astrocyte'\n", + "astrocyte_population_name = 'astrocytes'\n", + "connectome_population_name = 'connectome'\n", "be.remove_assembly(astrocyte_end_feet_assembly_name)\n", "astrocyte_assembly = be.add_assembly(astrocyte_end_feet_assembly_name)\n", "astrocyte_model = be.add_astrocytes(\n", " assembly_name=astrocyte_end_feet_assembly_name,\n", " population_name=astrocyte_population_name,\n", " vasculature_population_name=vasculature_population_name,\n", - " population_color_scheme=be.POPULATION_COLOR_SCHEME_ID,\n", + " connectome_population_name=connectome_population_name,\n", + " population_color_scheme=be.population_color_scheme.ID,\n", " realism_level=realism_level, load_somas=False, load_dendrites=False\n", ")" ] @@ -197,7 +199,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -206,7 +208,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -216,7 +218,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -302,9 +304,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.10" + "version": "3.10.12" } }, "nbformat": 4, "nbformat_minor": 5 -} \ No newline at end of file +} diff --git a/bioexplorer/pythonsdk/notebooks/vasculature/BioExplorer_ngv.ipynb b/bioexplorer/pythonsdk/notebooks/vasculature/BioExplorer_ngv.ipynb index 720730ee7..d80aa12c0 100644 --- a/bioexplorer/pythonsdk/notebooks/vasculature/BioExplorer_ngv.ipynb +++ b/bioexplorer/pythonsdk/notebooks/vasculature/BioExplorer_ngv.ipynb @@ -30,8 +30,8 @@ "core = be.core_api()\n", "status = be.reset_scene()\n", "\n", - "morphology_realism_level = be.MORPHOLOGY_REALISM_LEVEL_SOMA \n", - "vasculature_realism_level = be.VASCULATURE_REALISM_LEVEL_NONE" + "morphology_realism_level = be.morphology_realism_level.SOMA \n", + "vasculature_realism_level = be.vascular_realism_level.NONE" ] }, { @@ -82,13 +82,17 @@ "outputs": [], "source": [ "astrocytes_assembly_name = 'Astrocytes'\n", + "astrocytes_population_name = 'astrocytes'\n", + "connectome_population_name = 'connectome'\n", + "\n", "be.remove_assembly(astrocytes_assembly_name)\n", "vasculature_assembly = be.add_assembly(astrocytes_assembly_name)\n", "vasculature_model = be.add_astrocytes(\n", " assembly_name=astrocytes_assembly_name,\n", - " population_name='astrocytes',\n", + " population_name=astrocytes_population_name,\n", " vasculature_population_name=vasculature_population_name, # This creates end-feet to the vasculature\n", - " population_color_scheme=be.POPULATION_COLOR_SCHEME_ID,\n", + " connectome_population_name=connectome_population_name, # This creates end-feet to the vasculature\n", + " population_color_scheme=be.population_color_scheme.ID,\n", " realism_level=morphology_realism_level, sql_filter=filter + ' AND guid%10=0'\n", ")" ] @@ -150,7 +154,7 @@ " c=palette[i]\n", " diffuse_colors.append(c)\n", " specular_colors.append(c )\n", - " shading_modes.append(be.SHADING_MODE_GOODSELL)\n", + " shading_modes.append(be.shading_mode.GOODSELL)\n", " emissions.append(0)\n", " cast_user_datas.append(cast_user_data)\n", " \n", @@ -229,7 +233,7 @@ "metadata": {}, "outputs": [], "source": [ - "status = core.set_camera(current='bio_explorer_perspective')" + "status = core.set_camera(current='perspective')" ] }, { @@ -290,4 +294,4 @@ }, "nbformat": 4, "nbformat_minor": 5 -} \ No newline at end of file +}