diff --git a/.github/workflows/sanitize.yml b/.github/workflows/sanitize.yml index 6762039add..8fd3c75772 100644 --- a/.github/workflows/sanitize.yml +++ b/.github/workflows/sanitize.yml @@ -1,10 +1,18 @@ name: Sanitize on: - pull_request: + push: branches: [ master ] paths-ignore: 'doc/**' + schedule: + - cron: '0 2 * * 0' # run at 2 AM every sunday + +permissions: + issues: write + pull-requests: write + contents: write + jobs: build: name: "Sanitize" @@ -58,7 +66,39 @@ jobs: cd - - name: Run unit tests run: | - build/bin/unit --gtest_filter=-*DeathTest - build/bin/unit-modcc + build/bin/unit --gtest_filter=-*DeathTest 2>&1 | tee output.log + build/bin/unit-modcc 2>&1 | tee -a output.log + shell: bash - name: Run examples - run: scripts/run_cpp_examples.sh + run: scripts/run_cpp_examples.sh 2>&1 | tee -a output.log + shell: bash + - name: Ouput File + if: ${{ failure() && github.event_name == 'schedule' }} + run: | + FENCE='```' + HEADER="$(cat << EOF +
+ + output from test runs + + ${FENCE} + EOF + )" + FOOTER="$(cat << EOF + ${FENCE} + +
+ EOF + )" + echo "${HEADER}" > issue.md + cat output.log >> issue.md + echo "${FOOTER}" >> issue.md + echo -e "\nSee also the [corresponding workflow](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})\n" >> issue.md + - name: Create Issue From File + if: ${{ failure() && github.event_name == 'schedule' }} + uses: peter-evans/create-issue-from-file@v4 + with: + title: '[AUTOMATED] Sanitize checks failed' + content-filepath: ./issue.md + labels: | + automated issue diff --git a/.github/workflows/test-docs.yaml b/.github/workflows/test-docs.yaml index 7c6918f2fd..d7cac2a8b2 100644 --- a/.github/workflows/test-docs.yaml +++ b/.github/workflows/test-docs.yaml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-20.04] - python-version: [3.7] + python-version: [3.8] steps: - name: Set up cmake uses: jwlawson/actions-setup-cmake@v1.13 diff --git a/.github/workflows/test-matrix.yml b/.github/workflows/test-matrix.yml index c760b4d8c2..d1c4e8d0c6 100644 --- a/.github/workflows/test-matrix.yml +++ b/.github/workflows/test-matrix.yml @@ -20,7 +20,7 @@ jobs: os: "ubuntu-20.04", cc: "gcc-9", cxx: "g++-9", - py: "3.7", + py: "3.8", cmake: "3.19.x", mpi: "ON", simd: "OFF" @@ -30,7 +30,7 @@ jobs: os: "ubuntu-20.04", cc: "clang-9", cxx: "clang++-9", - py: "3.7", + py: "3.8", cmake: "3.19.x", mpi: "ON", simd: "OFF" @@ -40,7 +40,7 @@ jobs: os: "macos-11", cc: "clang", cxx: "clang++", - py: "3.7", + py: "3.8", cmake: "3.19.x", mpi: "ON", simd: "OFF" diff --git a/.github/workflows/test-pip.yml b/.github/workflows/test-pip.yml index f65f1ca08d..df029593e9 100644 --- a/.github/workflows/test-pip.yml +++ b/.github/workflows/test-pip.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-20.04] - python-version: [3.7] + python-version: [3.8] steps: - uses: actions/setup-python@v4 with: diff --git a/.readthedocs.yml b/.readthedocs.yml index 2750945e28..10cbaca0f2 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -13,11 +13,10 @@ sphinx: formats: [] build: - os: ubuntu-20.04 + os: ubuntu-22.04 tools: - python: "3.7" + python: "3.11" python: - system_packages: true install: - - requirements: doc/requirements.txt \ No newline at end of file + - requirements: doc/requirements.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index 26a3d153a2..c32763dda5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -103,7 +103,7 @@ After much more delay than anticipated, we are very happy to present a new Arbor ## New Contributors * @musicinmybrain made their first contribution in https://github.com/arbor-sim/arbor/pull/2080 -**Full Changelog**: https://github.com/arbor-sim/arbor/compare/v0.8...v0.9.0-rc +**Full Changelog**: https://github.com/arbor-sim/arbor/compare/v0.8.1...v0.9.0 # v0.8.1 diff --git a/CITATION.bib b/CITATION.bib index e271888207..2d42e26b7e 100644 --- a/CITATION.bib +++ b/CITATION.bib @@ -8,7 +8,7 @@ @INPROCEEDINGS{ doi={10.1109/EMPDP.2019.8671560}, ISSN={2377-5750}} -@software{nora_abi_akar_2022_7473671, +@software{nora_abi_akar_2023_8233847, author = {Nora Abi Akar and John Biddiscombe and Benjamin Cumming and @@ -32,11 +32,11 @@ @software{nora_abi_akar_2022_7473671 Simon Frasch and Lukas Drescher and Lennart Landsmeer}, - title = {Arbor Library v0.8.1}, + title = {Arbor Library v0.9.0}, month = nov, - year = 2022, + year = 2023, publisher = {Zenodo}, - version = {v0.8}, - doi = {10.5281/zenodo.7473671}, - url = {https://doi.org/10.5281/zenodo.7473671} -} \ No newline at end of file + version = {v0.9.0}, + doi = {10.5281/zenodo.8233847}, + url = {https://doi.org/10.5281/zenodo.8233847} +} diff --git a/CMakeLists.txt b/CMakeLists.txt index 20f75795f5..3a0e9e85d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -359,7 +359,7 @@ endif() #---------------------------------------------------------- # The minimum version of Python supported by Arbor. -set(arb_py_version 3.7.0) +set(arb_py_version 3.8.0) if(DEFINED PYTHON_EXECUTABLE) set(Python3_EXECUTABLE ${PYTHON_EXECUTABLE}) diff --git a/VERSION b/VERSION index ac39a106c4..dc9bff91aa 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.0 +0.9.1-dev diff --git a/arbor/CMakeLists.txt b/arbor/CMakeLists.txt index c8f1a465a7..c456e1e355 100644 --- a/arbor/CMakeLists.txt +++ b/arbor/CMakeLists.txt @@ -26,7 +26,7 @@ set(arbor_sources io/serialize_hex.cpp label_resolution.cpp lif_cell_group.cpp - mc_cell_group.cpp + cable_cell_group.cpp mechcat.cpp mechinfo.cpp memory/gpu_wrappers.cpp diff --git a/arbor/backends/event_delivery.md b/arbor/backends/event_delivery.md index 5ca2945b04..fc2a63ead0 100644 --- a/arbor/backends/event_delivery.md +++ b/arbor/backends/event_delivery.md @@ -20,7 +20,7 @@ Target handles are used by the lowered cell implementation to identify a particu instance that can receive events — ultimately via `net_receive` — and corresponding simulated cell. The cell information is given as an index into the cell group collection of cells. -Target handles are represented by the `target_handle` struct, opaque to `mc_cell_group`, +Target handles are represented by the `target_handle` struct, opaque to `cable_cell_group`, but created in the `fvm_multicell` for each point mechanism (synapse) in the cell group. ### Deliverable events diff --git a/arbor/mc_cell_group.cpp b/arbor/cable_cell_group.cpp similarity index 96% rename from arbor/mc_cell_group.cpp rename to arbor/cable_cell_group.cpp index fdde92ff9b..ca7f1ad636 100644 --- a/arbor/mc_cell_group.cpp +++ b/arbor/cable_cell_group.cpp @@ -15,7 +15,7 @@ #include "cell_group.hpp" #include "fvm_lowered_cell.hpp" #include "label_resolution.hpp" -#include "mc_cell_group.hpp" +#include "cable_cell_group.hpp" #include "profile/profiler_macro.hpp" #include "sampler_map.hpp" #include "util/filter.hpp" @@ -26,7 +26,7 @@ namespace arb { -mc_cell_group::mc_cell_group(const std::vector& gids, +cable_cell_group::cable_cell_group(const std::vector& gids, const recipe& rec, cell_label_range& cg_sources, cell_label_range& cg_targets, @@ -68,7 +68,7 @@ mc_cell_group::mc_cell_group(const std::vector& gids, spike_sources_.shrink_to_fit(); } -void mc_cell_group::reset() { +void cable_cell_group::reset() { spikes_.clear(); for (auto &entry: sampler_map_) { @@ -92,9 +92,9 @@ struct sampler_call_info { sample_size_type end_offset; }; -void mc_cell_group::t_serialize(serializer& ser, +void cable_cell_group::t_serialize(serializer& ser, const std::string& k) const { serialize(ser, k, *this); } -void mc_cell_group::t_deserialize(serializer& ser, +void cable_cell_group::t_deserialize(serializer& ser, const std::string& k) { deserialize(ser, k, *this); } // Working space for computing and collating data for samplers. @@ -382,7 +382,7 @@ void run_samples( std::visit([&](auto& x) {run_samples(x, sc, raw_times, raw_samples, sample_records, scratch); }, sc.pdata_ptr->info); } -void mc_cell_group::advance(epoch ep, time_type dt, const event_lane_subrange& event_lanes) { +void cable_cell_group::advance(epoch ep, time_type dt, const event_lane_subrange& event_lanes) { time_type tstart = lowered_->time(); // Bin and collate deliverable events from event lanes. @@ -510,7 +510,7 @@ void mc_cell_group::advance(epoch ep, time_type dt, const event_lane_subrange& e } } -void mc_cell_group::add_sampler(sampler_association_handle h, cell_member_predicate probeset_ids, +void cable_cell_group::add_sampler(sampler_association_handle h, cell_member_predicate probeset_ids, schedule sched, sampler_function fn) { std::lock_guard guard(sampler_mex_); @@ -524,17 +524,17 @@ void mc_cell_group::add_sampler(sampler_association_handle h, cell_member_predic } } -void mc_cell_group::remove_sampler(sampler_association_handle h) { +void cable_cell_group::remove_sampler(sampler_association_handle h) { std::lock_guard guard(sampler_mex_); sampler_map_.erase(h); } -void mc_cell_group::remove_all_samplers() { +void cable_cell_group::remove_all_samplers() { std::lock_guard guard(sampler_mex_); sampler_map_.clear(); } -std::vector mc_cell_group::get_probe_metadata(cell_member_type probeset_id) const { +std::vector cable_cell_group::get_probe_metadata(cell_member_type probeset_id) const { // Probe associations are fixed after construction, so we do not need to grab the mutex. std::optional maybe_tag = util::value_by_key(probe_map_.tag, probeset_id); diff --git a/arbor/mc_cell_group.hpp b/arbor/cable_cell_group.hpp similarity index 92% rename from arbor/mc_cell_group.hpp rename to arbor/cable_cell_group.hpp index bab48c4294..ede7019984 100644 --- a/arbor/mc_cell_group.hpp +++ b/arbor/cable_cell_group.hpp @@ -22,11 +22,11 @@ namespace arb { -class ARB_ARBOR_API mc_cell_group: public cell_group { +class ARB_ARBOR_API cable_cell_group: public cell_group { public: - mc_cell_group() = default; + cable_cell_group() = default; - mc_cell_group(const std::vector& gids, + cable_cell_group(const std::vector& gids, const recipe& rec, cell_label_range& cg_sources, cell_label_range& cg_targets, @@ -57,7 +57,7 @@ class ARB_ARBOR_API mc_cell_group: public cell_group { std::vector get_probe_metadata(cell_member_type probeset_id) const override; - ARB_SERDES_ENABLE(mc_cell_group, gids_, spikes_, lowered_); + ARB_SERDES_ENABLE(cable_cell_group, gids_, spikes_, lowered_); virtual void t_serialize(serializer& ser, const std::string& k) const override; virtual void t_deserialize(serializer& ser, const std::string& k) override; diff --git a/arbor/cell_group_factory.cpp b/arbor/cell_group_factory.cpp index e7fb7006a9..d6ced713da 100644 --- a/arbor/cell_group_factory.cpp +++ b/arbor/cell_group_factory.cpp @@ -9,7 +9,7 @@ #include "execution_context.hpp" #include "fvm_lowered_cell.hpp" #include "lif_cell_group.hpp" -#include "mc_cell_group.hpp" +#include "cable_cell_group.hpp" #include "spike_source_cell_group.hpp" namespace arb { @@ -27,7 +27,7 @@ ARB_ARBOR_API cell_group_factory cell_kind_implementation( switch (ck) { case cell_kind::cable: return [bk, ctx, seed](const gid_vector& gids, const recipe& rec, cell_label_range& cg_sources, cell_label_range& cg_targets) { - return make_cell_group(gids, rec, cg_sources, cg_targets, make_fvm_lowered_cell(bk, ctx, seed)); + return make_cell_group(gids, rec, cg_sources, cg_targets, make_fvm_lowered_cell(bk, ctx, seed)); }; case cell_kind::spike_source: diff --git a/arbor/fvm_lowered_cell.hpp b/arbor/fvm_lowered_cell.hpp index 179020a0cc..1361033e02 100644 --- a/arbor/fvm_lowered_cell.hpp +++ b/arbor/fvm_lowered_cell.hpp @@ -172,7 +172,7 @@ struct fvm_probe_data { }; // Samplers are tied to probe ids, but one probe id may -// map to multiple probe representations within the mc_cell_group. +// map to multiple probe representations within the cable_cell_group. struct probe_association_map { // Keys are probe id. diff --git a/doc/concepts/decor.rst b/doc/concepts/decor.rst index bc7a2f79ca..89e5ee7d4a 100644 --- a/doc/concepts/decor.rst +++ b/doc/concepts/decor.rst @@ -176,7 +176,7 @@ Take for example the built-in mechanism for passive leaky dynamics: .. _cablecell-scaled-mechs: 4. Scaling Mechanism and Membrane Parameters -~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Mechanism parameters are usually homogeneous along a cell. However, sometimes it is useful to scale parameters based on inhomogeneous properties. diff --git a/doc/concepts/labels.rst b/doc/concepts/labels.rst index 8b879431d0..5b7a0e2a16 100644 --- a/doc/concepts/labels.rst +++ b/doc/concepts/labels.rst @@ -273,6 +273,16 @@ Locset expressions The set of locations at the midpoint of every branch, expressed as ``(on-branches 0.5)``. +.. label:: (on-components pos:double) + + Points on each component of the region proportional to ``pos``. + + .. figure:: ../gen-images/on_components_label.svg + :width: 300 + :align: center + + This shows the component centers of the dendrite, i.e. ``(on-components 0.5 (region "dend"))``. + .. label:: (distal reg:region) The set of the most distal locations of a region. @@ -297,6 +307,15 @@ Locset expressions On the left is the region with radius between 0.3 μm and 0.5 μm. The right shows the proximal set of this region. +.. label:: (boundary reg:region), (cboundary reg:region), and (segment-boundaries) + + Boundary of (completed) region and those of all segments. The examples show + ``(boundary (segment 2))``, ``(cboundary (segment 2))``, and ``(segment-boundaries)``. + + .. figure:: ../gen-images/boundaries_label.svg + :width: 600 + :align: center + .. label:: (proximal-translate ls:locset distance:real) The set of locations that correspond to moving each location in the ``ls`` in the proximal direction @@ -387,6 +406,10 @@ Locset expressions (join (location 1 0.5) (location 2 0.1) (location 1 0.2) (location 1 0.5) (location 4 0)) +.. label:: (support ls:locset) + + Support of the multiset ``ls``, i.e. set of all points in the locset such that each appears once. + .. _labels-region-expr: Region expressions @@ -612,6 +635,42 @@ Region expressions Two regions (left and middle) and their intersection (right). +.. label:: (difference lhs:region rhs:region) + + The intersection of two regions. + + .. figure:: ../gen-images/difference_label.svg + :width: 900 + :align: center + + Two regions (left and middle) and their difference (right). + +.. label:: (complement reg:region) + + The complement of a region. + + .. figure:: ../gen-images/complement_label.svg + :width: 900 + :align: center + + A region (left) and its complement (right). + +.. label:: (complete reg:region) + + Complete a region, i.e. add all covers of all included forks. + + .. figure:: ../gen-images/completion_label.svg + :width: 900 + :align: center + + A region (left) and its completion (right). + +.. label:: (z-dist-from-root-lt dist:real), (z-dist-from-root-le dist:real), (z-dist-from-root-gt dist:real) and (z-dist-from-root-ge dist:real) + + All points ``p`` of the morphology such that ``p``'s z-coordinate is less + than, less than or equal, greater than, or greater than or equal to + ``dist``. + .. _labels-iexpr: diff --git a/doc/contrib/dependency-management.rst b/doc/contrib/dependency-management.rst index ad783e2692..6f66f278d3 100644 --- a/doc/contrib/dependency-management.rst +++ b/doc/contrib/dependency-management.rst @@ -59,7 +59,8 @@ Dependency update rules #. Dependencies shall be set to a (commit hash corresponding to a) specific version tag. (All current dependencies use semver.) #. The version shall be compatible with the user platforms (see above). #. The version shall be compatible with the requirements in ``doc/dependencies.csv``. -#. The version shall be the lowest possible. More recent versions of submodules are automatically tested through ``.github/workflows/check-submodules.yml``, to catch merge problems early. +#. The version shall be the lowest possible, to facilitate building of complex environments. +#. The submodule shall be set to the highest version provided by the latest Spack release ("Spack stable"). Spack CI tests both Spack stable and develop. #. Moreover, dependencies shall not be updated past the most recent version of the dependency in Spack. * This prevents Spack builds from pulling in ``master``, when a more recent version than available is required. `See here `_. diff --git a/doc/contrib/release.rst b/doc/contrib/release.rst index 5213bb50d8..833df12f09 100644 --- a/doc/contrib/release.rst +++ b/doc/contrib/release.rst @@ -93,7 +93,7 @@ Release #. Upload to pypi & verify - Get the wheels from test PyPI or the Github Action that produced the release artifacts. + Get the wheels from test PyPI or the Github Action that produced the release artifacts. Make sure you have pip installed ``twine`` and have your ``~/.pypirc`` file setup with the right token (see `docs `_). .. code-block:: bash @@ -106,7 +106,9 @@ Release #. Create Github Release: https://github.com/arbor-sim/arbor/releases - The Github action that produced the release artifacts should have prepared a draft Release. - - If not: + - Update body text with ``CHANGELOG.md`` + - (Probably: delete the Github draft release for the ``-rc``) + - If no Github Release was automatically drafted: - Go to `GH tags`_ and click “…” and “Create release” - Categorize/edit Github's autogenerated release notes (alternatively go through merged PRs to come up with a changelog). - Manually build full tarball: @@ -118,7 +120,7 @@ Release Post Release ------------ -#. Start a new release on Zenodo, this allocated a DOI, but you don't have to finish it right away. Add new Zenodo badge/link to docs/README. +#. Start a new release on Zenodo, this allocated a DOI, but you don't have to finish it right away. Add new Zenodo DOI badge/link to ``CITATION.bib`` and ``docs/index.rst``. #. Update Zenodo with authors and changelog created in previous step and submit. @@ -138,7 +140,7 @@ Post Release - Make sure that `Notebooks `_ work on the version that their image is built with. #. Announce on our website -#. Announce on HBP newsletter newsletter@humanbrainproject.eu, HBP Twitter/socials evan.hancock@ebrains.eu +#. Announce on HBP newsletter newsletter@humanbrainproject.eu, communications@ebrains.eu, HBP Twitter/socials evan.hancock@ebrains.eu #. [AUTOMATED] Add tagged version of docs on ReadTheDocs #. HBP internal admin @@ -152,8 +154,6 @@ Post Release - ContentTypes: https://humanbrainproject.github.io/openMINDS/v3/core/v4/data/contentType.html - details: https://github.com/HumanBrainProject/openMINDS_core/tree/v3/instances/data/contentTypes - - - Send an update to the folk in charge of HBP Twitter if we want to shout about it #. FZJ admin diff --git a/doc/cpp/probe_sample.rst b/doc/cpp/probe_sample.rst index c1d19067ac..e00979173c 100644 --- a/doc/cpp/probe_sample.rst +++ b/doc/cpp/probe_sample.rst @@ -635,7 +635,7 @@ The ``schedule`` class and its implementations are found in ``schedule.hpp``. Helper classes for probe/sampler management ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The ``simulation`` and ``mc_cell_group`` classes use classes defined in +The ``simulation`` and ``cable_cell_group`` classes use classes defined in ``scheduler_map.hpp`` to simplify the management of sampler--probe associations and probe metadata. @@ -644,7 +644,7 @@ handles and tuples (*schedule*, *sampler*, *probe set*), with thread-safe accessors. -Batched sampling in ``mc_cell_group`` +Batched sampling in ``cable_cell_group`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The ``fvm_multicell`` implementations for CPU and GPU simulation of multi-compartment @@ -657,11 +657,11 @@ When an integration step for a cell covers a sample event on that cell, the samp is satisfied with the value from the cell state at the beginning of the time step, after any postsynaptic spike events have been delivered. -It is the responsibility of the ``mc_cell_group::advance()`` method to create the sample +It is the responsibility of the ``cable_cell_group::advance()`` method to create the sample events from the entries of its ``sampler_association_map``, and to dispatch the sampled values to the sampler callbacks after the integration is complete. Given an association tuple (*schedule*, *sampler*, *probe set*) where the *schedule* -has (non-zero) *n* sample times in the current integration interval, the ``mc_cell_group`` will +has (non-zero) *n* sample times in the current integration interval, the ``cable_cell_group`` will call the *sampler* callback once for probe in *probe set*, with *n* sample values. .. note:: diff --git a/doc/dependencies.csv b/doc/dependencies.csv index 5a7fe77167..2c0bcbef2a 100644 --- a/doc/dependencies.csv +++ b/doc/dependencies.csv @@ -11,15 +11,15 @@ ARB_GPU,CUDA,11.0,,"* It is available on all of the target HPC systems (Piz Dain ARB_WITH_MPI,MPI,,Many MPI implementations are supported., "ARB_WITH_MPI, ARB_WITH_PYTHON ",mpi4py,3.1.0,Minimum version depends on compatiblity with your Python and MPI versions. 3.1.0 is the first release to support Python > 3.8., html, .. literalinclude:: ../requirements.txt,,See ``doc/requirements.txt``, -unit,googletest,,submodule ``ext/gtest.*``, +unit,googletest,1.12.1,submodule ``ext/gtest.*``, bench,Google-benchmark,,submodule ``ext/google-benchmark``, --,json,3.11.2,submodule ``ext/json``, ---,pugi,,submodule ``ext/pugixml``, ---,random123,,submodule ``ext/random123``, ---,fmt,,submodule ``ext/fmt``, +--,pugi,1.13,submodule ``ext/pugixml``, +--,random123,1.14.0,submodule ``ext/random123``, +--,fmt,10.0.0,submodule ``ext/fmt``, --,tinyopt,,source copy ``ext/tinyopt``, -ARB_WITH_PYTHON,pybind11,,submodule ``ext/pybind11``, -ARB_WITH_PYTHON,Python,3.7,Python compatiblity is the range between the latest officially released point version and the minimum here specified.,"* it is not more advanced than the version specified by NEP 29. +ARB_WITH_PYTHON,pybind11,2.10.1,submodule ``ext/pybind11``, +ARB_WITH_PYTHON,Python,3.8,Python compatiblity is the range between the latest officially released point version and the minimum here specified.,"* it is not more advanced than the version specified by NEP 29. * it is available as a cray-python version on Piz Daint * it is available on labs.ebrains.eu diff --git a/doc/dev/cable_cell.rst b/doc/dev/cable_cell.rst index 84b397ad4a..ff70c545d5 100644 --- a/doc/dev/cable_cell.rst +++ b/doc/dev/cable_cell.rst @@ -21,7 +21,7 @@ In Arbor's codebase some prefixes are used as a low-key namespacing - ``fvm_``:: Concerning use by the Finite Volume Method (FVM), eg ``fvm_lowered_cell``. - ``mc_``:: Related to Multi-Compartment (Cells), identical to cable cells the - difference is purely historical, eg ``mc_cell_group``. + difference is purely historical, eg ``cable_cell_group``. Setting up a Cable Cell simulation ---------------------------------- @@ -71,7 +71,7 @@ Lowered Cells, Shared State, and the Discretisation To obtain a simulation we need to turn the ``cable_cell`` description object into a ``fvm_lowered_cell``. However, multiple cells are collected into a -``mc_cell_group`` and ``fvm_lowered_cell`` is the lowered representation of a +``cable_cell_group`` and ``fvm_lowered_cell`` is the lowered representation of a full cell group. The ``fvm_lowered_cell`` is responsible for holding the backend-specific data of a cell group, managing sampling and stimuli, facilitate event processing, and driving time integration. diff --git a/doc/dev/cell_groups.rst b/doc/dev/cell_groups.rst index abcdc61b71..8b29a02c6a 100644 --- a/doc/dev/cell_groups.rst +++ b/doc/dev/cell_groups.rst @@ -6,7 +6,7 @@ Cell groups Cell groups represent a union of cells of a single *kind* simulated in lockstep. In a sense, their existence is an optimisation, since parts of the internal state and computations can be shared between cell in single group. The currently -most complicated cell group is the one for cable cells, called ``mc_cell_group`` +most complicated cell group is the one for cable cells, called ``cable_cell_group`` (``mc`` stands for multi-compartment, used in older parts of Arbor), so we will focus on this type here. @@ -14,7 +14,7 @@ Cell groups are created by domain decomposition methods on consideration of soft (like performance optimisation) and hard (cells connected by gap junctions must be in the same group) constraints. -Cable Cell group ``mc_cell_group`` +Cable Cell group ``cable_cell_group`` ---------------------------------- Cable cell groups have backing store in ``shared_state`` (given the diff --git a/doc/index.rst b/doc/index.rst index 1e054f8e1d..be701d974e 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -54,6 +54,9 @@ The Arbor software can be cited by version via Zenodo or via Arbors introductory Latest version |zlatest| +Version 0.9.0 + |z090| + Version 0.8.1 |z081| @@ -92,6 +95,9 @@ Cite (Bibtex format) .. |zlatest| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1459678.svg :target: https://doi.org/10.5281/zenodo.1459678 +.. |z090| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.8233847.svg + :target: https://doi.org/10.5281/zenodo.8233847 + .. |z081| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.7473671.svg :target: https://doi.org/10.5281/zenodo.7473671 diff --git a/doc/scripts/divio_docs_theme/layout.html b/doc/scripts/divio_docs_theme/layout.html index 056f8c71fd..a51218d5f3 100755 --- a/doc/scripts/divio_docs_theme/layout.html +++ b/doc/scripts/divio_docs_theme/layout.html @@ -21,7 +21,7 @@ {# FAVICON #} {% if favicon %} - + {% endif %} {# CANONICAL URL #} {% if theme_canonical_url %} @@ -125,7 +125,7 @@
{{ project }}{% if READTHEDOCS %} v: {{ current_version }}{% endif %}
- + {% include "breadcrumbs.html" %} diff --git a/doc/scripts/gen-labels.py b/doc/scripts/gen-labels.py index 45c6f67f52..1cd706745a 100644 --- a/doc/scripts/gen-labels.py +++ b/doc/scripts/gen-labels.py @@ -198,6 +198,9 @@ def write_morphology(name, morph): "rhs": "(branch 1)", "and": '(intersect (region "lhs") (region "rhs"))', "or": '(join (region "lhs") (region "rhs"))', + "diff": '(difference (region "lhs") (region "rhs"))', + "complement": '(complement (region "rhs"))', + "completion": '(complete (region "rhs"))', } locsets = { "root": "(root)", @@ -208,6 +211,10 @@ def write_morphology(name, morph): "uniform0": "(uniform (tag 3) 0 9 0)", "uniform1": "(uniform (tag 3) 0 9 1)", "branchmid": "(on-branches 0.5)", + "componentsmid": '(on-components 0.5 (region "dend"))', + "boundary": "(boundary (segment 2))", + "cboundary": "(cboundary (segment 2))", + "sboundary": "(segment-boundaries)", "distal": '(distal (region "rad36"))', "proximal": '(proximal (region "rad36"))', "distint_in": "(sum (location 1 0.5) (location 2 0.7) (location 5 0.1))", @@ -223,7 +230,7 @@ def write_morphology(name, morph): d = arbor.label_dict(labels) # Create a cell to concretise the region and locset definitions -cell = arbor.cable_cell(label_morph, None, d) +cell = arbor.cable_cell(label_morph, arbor.decor(), d) ############################################################################### # Tutorial Example: single_cell_detailed @@ -263,7 +270,7 @@ def write_morphology(name, morph): tutorial_dict = arbor.label_dict(tutorial_labels) # Create a cell to concretise the region and locset definitions -tutorial_cell = arbor.cable_cell(tutorial_morph, None, tutorial_dict) +tutorial_cell = arbor.cable_cell(tutorial_morph, arbor.decor(), tutorial_dict) ############################################################################### # Tutorial Example: network_ring @@ -298,7 +305,7 @@ def write_morphology(name, morph): # Create a cell to concretise the region and locset definitions tutorial_network_ring_cell = arbor.cable_cell( - tutorial_network_ring_morph, None, tutorial_network_ring_dict + tutorial_network_ring_morph, arbor.decor(), tutorial_network_ring_dict ) ################################################################################ @@ -309,6 +316,14 @@ def write_morphology(name, morph): f.write("import representation\n") f.write("from representation import Segment\n") +f.write("############# iexpr (label_morph)\n\n") +f.write('iexpr_directional_loc = {"type": "locset", "value": [(0, 1.0)]}\n') +f.write("iexpr_dist_dis = {\n") +f.write(' "type": "region",\n') +f.write(' "value": [(1, 0.0, 1.0), (2, 0.0, 1.0), (3, 0.0, 1.0), (4, 0.0, 1.0)],\n') +f.write("}\n") +f.write('iexpr_prox_dis = {"type": "region", "value": [(0, 0.0, 1.0)]}\n') + f.write("\n############# morphologies\n\n") f.write(write_morphology("label_morph", label_morph)) f.write(write_morphology("detached_morph", detached_morph)) diff --git a/doc/scripts/inputs.py b/doc/scripts/inputs.py index de2ea3cd6c..f4f19c4b86 100644 --- a/doc/scripts/inputs.py +++ b/doc/scripts/inputs.py @@ -1,586 +1,201 @@ import representation from representation import Segment +############# iexpr (label_morph) + +iexpr_directional_loc = {"type": "locset", "value": [(0, 1.0)]} +iexpr_dist_dis = { + "type": "region", + "value": [(1, 0.0, 1.0), (2, 0.0, 1.0), (3, 0.0, 1.0), (4, 0.0, 1.0)], +} +iexpr_prox_dis = {"type": "region", "value": [(0, 0.0, 1.0)]} ############# morphologies tmp = [ - [ - [ - Segment((0.0, 0.0, 2.0), (4.0, 0.0, 2.0), 1), - Segment((4.0, 0.0, 0.8), (8.0, 0.0, 0.8), 3), - Segment((8.0, 0.0, 0.8), (12.0, -0.5, 0.8), 3), - ] - ], - [ - [ - Segment((12.0, -0.5, 0.8), (20.0, 4.0, 0.4), 3), - Segment((20.0, 4.0, 0.4), (26.0, 6.0, 0.2), 3), - ] - ], + [[Segment((0.0, 0.0, 2.0), (4.0, 0.0, 2.0), 1), Segment((4.0, 0.0, 0.8), (8.0, 0.0, 0.8), 3), Segment((8.0, 0.0, 0.8), (12.0, -0.5, 0.8), 3)]], + [[Segment((12.0, -0.5, 0.8), (20.0, 4.0, 0.4), 3), Segment((20.0, 4.0, 0.4), (26.0, 6.0, 0.2), 3)]], [[Segment((12.0, -0.5, 0.5), (19.0, -3.0, 0.5), 3)]], [[Segment((19.0, -3.0, 0.5), (24.0, -7.0, 0.2), 3)]], - [ - [ - Segment((19.0, -3.0, 0.5), (23.0, -1.0, 0.2), 3), - Segment((23.0, -1.0, 0.2), (26.0, -2.0, 0.2), 3), - ] - ], - [ - [ - Segment((0.0, 0.0, 2.0), (-7.0, 0.0, 0.4), 2), - Segment((-7.0, 0.0, 0.4), (-10.0, 0.0, 0.4), 2), - ] - ], -] + [[Segment((19.0, -3.0, 0.5), (23.0, -1.0, 0.2), 3), Segment((23.0, -1.0, 0.2), (26.0, -2.0, 0.2), 3)]], + [[Segment((0.0, 0.0, 2.0), (-7.0, 0.0, 0.4), 2), Segment((-7.0, 0.0, 0.4), (-10.0, 0.0, 0.4), 2)]],] label_morph = representation.make_morph(tmp) tmp = [ - [ - [Segment((0.0, 0.0, 2.0), (4.0, 0.0, 2.0), 1)], - [ - Segment((5.0, 0.0, 0.8), (8.0, 0.0, 0.8), 3), - Segment((8.0, 0.0, 0.8), (12.0, -0.5, 0.8), 3), - ], - ], - [ - [ - Segment((12.0, -0.5, 0.8), (20.0, 4.0, 0.4), 3), - Segment((20.0, 4.0, 0.4), (26.0, 6.0, 0.2), 3), - ] - ], + [[Segment((0.0, 0.0, 2.0), (4.0, 0.0, 2.0), 1)], [Segment((5.0, 0.0, 0.8), (8.0, 0.0, 0.8), 3), Segment((8.0, 0.0, 0.8), (12.0, -0.5, 0.8), 3)]], + [[Segment((12.0, -0.5, 0.8), (20.0, 4.0, 0.4), 3), Segment((20.0, 4.0, 0.4), (26.0, 6.0, 0.2), 3)]], [[Segment((12.0, -0.5, 0.5), (19.0, -3.0, 0.5), 3)]], [[Segment((19.0, -3.0, 0.5), (24.0, -7.0, 0.2), 3)]], - [ - [ - Segment((19.0, -3.0, 0.5), (23.0, -1.0, 0.2), 3), - Segment((23.0, -1.0, 0.2), (26.0, -2.0, 0.2), 3), - ] - ], - [[Segment((-2.0, 0.0, 0.4), (-10.0, 0.0, 0.4), 2)]], -] + [[Segment((19.0, -3.0, 0.5), (23.0, -1.0, 0.2), 3), Segment((23.0, -1.0, 0.2), (26.0, -2.0, 0.2), 3)]], + [[Segment((-2.0, 0.0, 0.4), (-10.0, 0.0, 0.4), 2)]],] detached_morph = representation.make_morph(tmp) tmp = [ - [ - [ - Segment((0.0, 0.0, 0.5), (1.0, 0.0, 1.5), 1), - Segment((1.0, 0.0, 1.5), (2.0, 0.0, 2.5), 1), - Segment((2.0, 0.0, 2.5), (3.0, 0.0, 2.5), 1), - Segment((3.0, 0.0, 2.5), (4.0, 0.0, 1.2), 1), - Segment((4.0, 0.0, 0.8), (8.0, 0.0, 0.8), 3), - Segment((8.0, 0.0, 0.8), (12.0, -0.5, 0.8), 3), - ] - ], - [ - [ - Segment((12.0, -0.5, 0.8), (20.0, 4.0, 0.4), 3), - Segment((20.0, 4.0, 0.4), (26.0, 6.0, 0.2), 3), - ] - ], + [[Segment((0.0, 0.0, 0.5), (1.0, 0.0, 1.5), 1), Segment((1.0, 0.0, 1.5), (2.0, 0.0, 2.5), 1), Segment((2.0, 0.0, 2.5), (3.0, 0.0, 2.5), 1), Segment((3.0, 0.0, 2.5), (4.0, 0.0, 1.2), 1), Segment((4.0, 0.0, 0.8), (8.0, 0.0, 0.8), 3), Segment((8.0, 0.0, 0.8), (12.0, -0.5, 0.8), 3)]], + [[Segment((12.0, -0.5, 0.8), (20.0, 4.0, 0.4), 3), Segment((20.0, 4.0, 0.4), (26.0, 6.0, 0.2), 3)]], [[Segment((12.0, -0.5, 0.5), (19.0, -3.0, 0.5), 3)]], [[Segment((19.0, -3.0, 0.5), (24.0, -7.0, 0.2), 3)]], - [ - [ - Segment((19.0, -3.0, 0.5), (23.0, -1.0, 0.2), 3), - Segment((23.0, -1.0, 0.2), (26.0, -2.0, 0.2), 3), - ] - ], - [ - [ - Segment((0.0, 0.0, 0.4), (-7.0, 0.0, 0.4), 2), - Segment((-7.0, 0.0, 0.4), (-10.0, 0.0, 0.4), 2), - ] - ], -] + [[Segment((19.0, -3.0, 0.5), (23.0, -1.0, 0.2), 3), Segment((23.0, -1.0, 0.2), (26.0, -2.0, 0.2), 3)]], + [[Segment((0.0, 0.0, 0.4), (-7.0, 0.0, 0.4), 2), Segment((-7.0, 0.0, 0.4), (-10.0, 0.0, 0.4), 2)]],] stacked_morph = representation.make_morph(tmp) tmp = [ - [[Segment((-2.0, 0.0, 2.0), (2.0, 0.0, 2.0), 1)]], -] + [[Segment((-2.0, 0.0, 2.0), (2.0, 0.0, 2.0), 1)]],] sphere_morph = representation.make_morph(tmp) tmp = [ - [[Segment((0.0, 0.0, 1.0), (10.0, 0.0, 0.5), 3)]], -] + [[Segment((0.0, 0.0, 1.0), (10.0, 0.0, 0.5), 3)]],] branch_morph1 = representation.make_morph(tmp) tmp = [ - [ - [ - Segment((0.0, 0.0, 1.0), (3.0, 0.2, 0.8), 1), - Segment((3.0, 0.2, 0.8), (5.0, -0.1, 0.7), 2), - Segment((5.0, -0.1, 0.7), (8.0, 0.0, 0.6), 2), - Segment((8.0, 0.0, 0.6), (10.0, 0.0, 0.5), 3), - ] - ], -] + [[Segment((0.0, 0.0, 1.0), (3.0, 0.2, 0.8), 1), Segment((3.0, 0.2, 0.8), (5.0, -0.1, 0.7), 2), Segment((5.0, -0.1, 0.7), (8.0, 0.0, 0.6), 2), Segment((8.0, 0.0, 0.6), (10.0, 0.0, 0.5), 3)]],] branch_morph2 = representation.make_morph(tmp) tmp = [ - [ - [ - Segment((0.0, 0.0, 1.0), (3.0, 0.2, 0.8), 1), - Segment((3.0, 0.2, 0.8), (5.0, -0.1, 0.7), 2), - ], - [ - Segment((6.0, -0.1, 0.7), (9.0, 0.0, 0.6), 2), - Segment((9.0, 0.0, 0.6), (11.0, 0.0, 0.5), 3), - ], - ], -] + [[Segment((0.0, 0.0, 1.0), (3.0, 0.2, 0.8), 1), Segment((3.0, 0.2, 0.8), (5.0, -0.1, 0.7), 2)], [Segment((6.0, -0.1, 0.7), (9.0, 0.0, 0.6), 2), Segment((9.0, 0.0, 0.6), (11.0, 0.0, 0.5), 3)]],] branch_morph3 = representation.make_morph(tmp) tmp = [ - [ - [ - Segment((0.0, 0.0, 1.0), (3.0, 0.2, 0.8), 1), - Segment((3.0, 0.2, 0.8), (5.0, -0.1, 0.7), 2), - Segment((5.0, -0.1, 0.7), (8.0, 0.0, 0.5), 2), - Segment((8.0, 0.0, 0.3), (10.0, 0.0, 0.5), 3), - ] - ], -] + [[Segment((0.0, 0.0, 1.0), (3.0, 0.2, 0.8), 1), Segment((3.0, 0.2, 0.8), (5.0, -0.1, 0.7), 2), Segment((5.0, -0.1, 0.7), (8.0, 0.0, 0.5), 2), Segment((8.0, 0.0, 0.3), (10.0, 0.0, 0.5), 3)]],] branch_morph4 = representation.make_morph(tmp) tmp = [ [[Segment((0.0, 0.0, 1.0), (10.0, 0.0, 0.5), 3)]], [[Segment((10.0, 0.0, 0.5), (15.0, 3.0, 0.2), 3)]], - [[Segment((10.0, 0.0, 0.5), (15.0, -3.0, 0.2), 3)]], -] + [[Segment((10.0, 0.0, 0.5), (15.0, -3.0, 0.2), 3)]],] yshaped_morph = representation.make_morph(tmp) tmp = [ - [ - [Segment((-3.0, 0.0, 3.0), (3.0, 0.0, 3.0), 1)], - [ - Segment((4.0, -1.0, 0.6), (10.0, -2.0, 0.5), 3), - Segment((10.0, -2.0, 0.5), (15.0, -1.0, 0.5), 3), - ], - ], + [[Segment((-3.0, 0.0, 3.0), (3.0, 0.0, 3.0), 1)], [Segment((4.0, -1.0, 0.6), (10.0, -2.0, 0.5), 3), Segment((10.0, -2.0, 0.5), (15.0, -1.0, 0.5), 3)]], [[Segment((15.0, -1.0, 0.5), (18.0, -5.0, 0.3), 3)]], - [[Segment((15.0, -1.0, 0.5), (20.0, 2.0, 0.3), 3)]], -] + [[Segment((15.0, -1.0, 0.5), (20.0, 2.0, 0.3), 3)]],] ysoma_morph1 = representation.make_morph(tmp) tmp = [ [[Segment((-3.0, 0.0, 3.0), (3.0, 0.0, 3.0), 1)]], - [ - [ - Segment((4.0, -1.0, 0.6), (10.0, -2.0, 0.5), 3), - Segment((10.0, -2.0, 0.5), (15.0, -1.0, 0.5), 3), - ] - ], + [[Segment((4.0, -1.0, 0.6), (10.0, -2.0, 0.5), 3), Segment((10.0, -2.0, 0.5), (15.0, -1.0, 0.5), 3)]], [[Segment((15.0, -1.0, 0.5), (18.0, -5.0, 0.3), 3)]], [[Segment((15.0, -1.0, 0.5), (20.0, 2.0, 0.3), 3)]], [[Segment((2.0, 1.0, 0.6), (12.0, 4.0, 0.5), 3)]], [[Segment((12.0, 4.0, 0.5), (18.0, 4.0, 0.3), 3)]], [[Segment((12.0, 4.0, 0.5), (16.0, 9.0, 0.1), 3)]], - [ - [ - Segment((-3.5, 0.0, 1.5), (-6.0, -0.2, 0.5), 2), - Segment((-6.0, -0.2, 0.5), (-15.0, -0.1, 0.5), 2), - ] - ], -] + [[Segment((-3.5, 0.0, 1.5), (-6.0, -0.2, 0.5), 2), Segment((-6.0, -0.2, 0.5), (-15.0, -0.1, 0.5), 2)]],] ysoma_morph2 = representation.make_morph(tmp) tmp = [ [[Segment((-3.0, 0.0, 3.0), (3.0, 0.0, 3.0), 1)]], - [ - [ - Segment((3.0, 0.0, 0.6), (9.0, -1.0, 0.5), 3), - Segment((9.0, -1.0, 0.5), (14.0, 0.0, 0.5), 3), - ] - ], + [[Segment((3.0, 0.0, 0.6), (9.0, -1.0, 0.5), 3), Segment((9.0, -1.0, 0.5), (14.0, 0.0, 0.5), 3)]], [[Segment((14.0, 0.0, 0.5), (17.0, -4.0, 0.3), 3)]], [[Segment((14.0, 0.0, 0.5), (19.0, 3.0, 0.3), 3)]], [[Segment((3.0, 0.0, 0.6), (13.0, 3.0, 0.5), 3)]], [[Segment((13.0, 3.0, 0.5), (19.0, 3.0, 0.3), 3)]], [[Segment((13.0, 3.0, 0.5), (17.0, 8.0, 0.1), 3)]], - [ - [ - Segment((-3.0, 0.0, 1.5), (-5.5, -0.2, 0.5), 2), - Segment((-5.5, -0.2, 0.5), (-14.5, -0.1, 0.5), 2), - ] - ], -] + [[Segment((-3.0, 0.0, 1.5), (-5.5, -0.2, 0.5), 2), Segment((-5.5, -0.2, 0.5), (-14.5, -0.1, 0.5), 2)]],] ysoma_morph3 = representation.make_morph(tmp) tmp = [ - [ - [ - Segment((0.0, 0.0, 2.0), (4.0, 0.0, 2.0), 1), - Segment((4.0, 0.0, 0.8), (8.0, 0.0, 0.8), 3), - Segment((8.0, 0.0, 0.8), (12.0, -0.5, 0.8), 3), - ] - ], - [ - [ - Segment((12.0, -0.5, 0.8), (20.0, 4.0, 0.4), 3), - Segment((20.0, 4.0, 0.4), (26.0, 6.0, 0.2), 3), - ] - ], + [[Segment((0.0, 0.0, 2.0), (4.0, 0.0, 2.0), 1), Segment((4.0, 0.0, 0.8), (8.0, 0.0, 0.8), 3), Segment((8.0, 0.0, 0.8), (12.0, -0.5, 0.8), 3)]], + [[Segment((12.0, -0.5, 0.8), (20.0, 4.0, 0.4), 3), Segment((20.0, 4.0, 0.4), (26.0, 6.0, 0.2), 3)]], [[Segment((12.0, -0.5, 0.5), (19.0, -3.0, 0.5), 3)]], [[Segment((19.0, -3.0, 0.5), (24.0, -7.0, 0.2), 4)]], - [ - [ - Segment((19.0, -3.0, 0.5), (23.0, -1.0, 0.2), 4), - Segment((23.0, -1.0, 0.2), (36.0, -2.0, 0.2), 4), - ] - ], - [ - [ - Segment((0.0, 0.0, 2.0), (-7.0, 0.0, 0.4), 2), - Segment((-7.0, 0.0, 0.4), (-10.0, 0.0, 0.4), 2), - ] - ], -] + [[Segment((19.0, -3.0, 0.5), (23.0, -1.0, 0.2), 4), Segment((23.0, -1.0, 0.2), (36.0, -2.0, 0.2), 4)]], + [[Segment((0.0, 0.0, 2.0), (-7.0, 0.0, 0.4), 2), Segment((-7.0, 0.0, 0.4), (-10.0, 0.0, 0.4), 2)]],] tutorial_morph = representation.make_morph(tmp) tmp = [ - [ - [ - Segment((0.0, 0.0, 1.0), (2.0, 0.0, 1.0), 1), - Segment((2.0, 0.0, 1.0), (20.0, 0.0, 1.0), 3), - ] - ], - [[Segment((0.0, 0.0, 1.0), (-3.0, 0.0, 0.7), 2)]], -] + [[Segment((0.0, 0.0, 1.0), (2.0, 0.0, 1.0), 1), Segment((2.0, 0.0, 1.0), (20.0, 0.0, 1.0), 3)]], + [[Segment((0.0, 0.0, 1.0), (-3.0, 0.0, 0.7), 2)]],] swc_morph = representation.make_morph(tmp) tmp = [ - [ - [ - Segment((-12.0, 0.0, 6.0), (0.0, 0.0, 6.0), 1), - Segment((0.0, 0.0, 2.0), (50.0, 0.0, 2.0), 3), - ] - ], + [[Segment((-12.0, 0.0, 6.0), (0.0, 0.0, 6.0), 1), Segment((0.0, 0.0, 2.0), (50.0, 0.0, 2.0), 3)]], [[Segment((50.0, 0.0, 2.0), (85.35533905932738, 35.35533905932737, 0.5), 3)]], - [[Segment((50.0, 0.0, 1.0), (85.35533905932738, -35.35533905932737, 1.0), 3)]], -] + [[Segment((50.0, 0.0, 1.0), (85.35533905932738, -35.35533905932737, 1.0), 3)]],] tutorial_network_ring_morph = representation.make_morph(tmp) ############# locsets (label_morph) -ls_root = {"type": "locset", "value": [(0, 0.0)]} -ls_term = {"type": "locset", "value": [(1, 1.0), (3, 1.0), (4, 1.0), (5, 1.0)]} -ls_rand_dend = { - "type": "locset", - "value": [ - (0, 0.5547193370156588), - (0, 0.5841758202819731), - (0, 0.607192003545501), - (0, 0.6181091003428546), - (0, 0.6190845627201184), - (0, 0.7027325639263277), - (0, 0.7616129092226993), - (0, 0.9645150497869694), - (1, 0.15382287505908834), - (1, 0.2594719824047551), - (1, 0.28087652335178354), - (1, 0.3729681478609085), - (1, 0.3959560134241004), - (1, 0.4629424550242548), - (1, 0.47346867377446744), - (1, 0.5493486883630476), - (1, 0.6227685370674116), - (1, 0.6362196581003494), - (1, 0.6646511214508091), - (1, 0.7157318936458146), - (1, 0.7464198558822775), - (1, 0.77074507802833), - (1, 0.7860238136304932), - (1, 0.8988928261704698), - (1, 0.9581259332943499), - (2, 0.12773985425987294), - (2, 0.3365926476076694), - (2, 0.44454300804769703), - (2, 0.5409466695719178), - (2, 0.5767511435223905), - (2, 0.6340206909931745), - (2, 0.6354772583375223), - (2, 0.6807941995943213), - (2, 0.774655947503608), - (3, 0.05020708596877571), - (3, 0.25581431877212274), - (3, 0.2958305460715556), - (3, 0.296698184761692), - (3, 0.509669134988683), - (3, 0.7662305637426007), - (3, 0.8565839889923518), - (3, 0.8889077221517746), - (4, 0.24311286693286885), - (4, 0.4354361205546333), - (4, 0.4467752481260171), - (4, 0.5308169153994543), - (4, 0.5701465671464049), - (4, 0.670081739879954), - (4, 0.6995486862583797), - (4, 0.8186709628604206), - (4, 0.9141224600171143), - ], -} -ls_loc15 = {"type": "locset", "value": [(1, 0.5)]} -ls_loc05 = {"type": "locset", "value": [(0, 0.5)]} -ls_uniform0 = { - "type": "locset", - "value": [ - (0, 0.5841758202819731), - (1, 0.6362196581003494), - (1, 0.7157318936458146), - (1, 0.7464198558822775), - (2, 0.6340206909931745), - (2, 0.6807941995943213), - (3, 0.296698184761692), - (3, 0.509669134988683), - (3, 0.7662305637426007), - (4, 0.5701465671464049), - ], -} -ls_uniform1 = { - "type": "locset", - "value": [ - (0, 0.9778060763285382), - (1, 0.19973428495790843), - (1, 0.8310607916260988), - (2, 0.9210229159315735), - (2, 0.9244292525837472), - (2, 0.9899772550845479), - (3, 0.9924233395972087), - (4, 0.3641426305909531), - (4, 0.4787812247064867), - (4, 0.5138656268861914), - ], -} -ls_branchmid = { - "type": "locset", - "value": [(0, 0.5), (1, 0.5), (2, 0.5), (3, 0.5), (4, 0.5), (5, 0.5)], -} -ls_distal = { - "type": "locset", - "value": [ - (1, 0.796025976329944), - (3, 0.6666666666666667), - (4, 0.39052429175127), - (5, 1.0), - ], -} -ls_proximal = { - "type": "locset", - "value": [(1, 0.29602597632994393), (2, 0.0), (5, 0.6124999999999999)], -} -ls_distint_in = {"type": "locset", "value": [(1, 0.5), (2, 0.7), (5, 0.1)]} -ls_proxint_in = {"type": "locset", "value": [(1, 0.8), (2, 0.3)]} -ls_loctest = {"type": "locset", "value": [(1, 1.0), (2, 0.0), (5, 0.0)]} -ls_restrict = {"type": "locset", "value": [(1, 1.0), (3, 1.0), (4, 1.0)]} -ls_proximal_translate = { - "type": "locset", - "value": [ - (1, 0.35497750169352515), - (2, 0.5160959062272675), - (2, 0.6817468794150789), - (5, 0.0), - ], -} -ls_distal_translate_single = {"type": "locset", "value": [(0, 0.915588599565521)]} -ls_distal_translate_multi = { - "type": "locset", - "value": [ - (1, 0.5795163072671657), - (3, 0.24228815992614555), - (4, 0.20321157163712014), - ], -} +ls_root = {'type': 'locset', 'value': [(0, 0.0)]} +ls_term = {'type': 'locset', 'value': [(1, 1.0), (3, 1.0), (4, 1.0), (5, 1.0)]} +ls_rand_dend = {'type': 'locset', 'value': [(0, 0.5547193370156588), (0, 0.5841758202819731), (0, 0.607192003545501), (0, 0.6181091003428546), (0, 0.6190845627201184), (0, 0.7027325639263277), (0, 0.7616129092226993), (0, 0.9645150497869694), (1, 0.15382287505908834), (1, 0.2594719824047551), (1, 0.28087652335178354), (1, 0.3729681478609085), (1, 0.3959560134241004), (1, 0.4629424550242548), (1, 0.47346867377446744), (1, 0.5493486883630476), (1, 0.6227685370674116), (1, 0.6362196581003494), (1, 0.6646511214508091), (1, 0.7157318936458146), (1, 0.7464198558822775), (1, 0.77074507802833), (1, 0.7860238136304932), (1, 0.8988928261704698), (1, 0.9581259332943499), (2, 0.12773985425987294), (2, 0.3365926476076694), (2, 0.44454300804769703), (2, 0.5409466695719178), (2, 0.5767511435223905), (2, 0.6340206909931745), (2, 0.6354772583375223), (2, 0.6807941995943213), (2, 0.774655947503608), (3, 0.05020708596877571), (3, 0.25581431877212274), (3, 0.2958305460715556), (3, 0.296698184761692), (3, 0.509669134988683), (3, 0.7662305637426007), (3, 0.8565839889923518), (3, 0.8889077221517746), (4, 0.24311286693286885), (4, 0.4354361205546333), (4, 0.4467752481260171), (4, 0.5308169153994543), (4, 0.5701465671464049), (4, 0.670081739879954), (4, 0.6995486862583797), (4, 0.8186709628604206), (4, 0.9141224600171143)]} +ls_loc15 = {'type': 'locset', 'value': [(1, 0.5)]} +ls_loc05 = {'type': 'locset', 'value': [(0, 0.5)]} +ls_uniform0 = {'type': 'locset', 'value': [(0, 0.5841758202819731), (1, 0.6362196581003494), (1, 0.7157318936458146), (1, 0.7464198558822775), (2, 0.6340206909931745), (2, 0.6807941995943213), (3, 0.296698184761692), (3, 0.509669134988683), (3, 0.7662305637426007), (4, 0.5701465671464049)]} +ls_uniform1 = {'type': 'locset', 'value': [(0, 0.9778060763285382), (1, 0.19973428495790843), (1, 0.8310607916260988), (2, 0.9210229159315735), (2, 0.9244292525837472), (2, 0.9899772550845479), (3, 0.9924233395972087), (4, 0.3641426305909531), (4, 0.4787812247064867), (4, 0.5138656268861914)]} +ls_branchmid = {'type': 'locset', 'value': [(0, 0.5), (1, 0.5), (2, 0.5), (3, 0.5), (4, 0.5), (5, 0.5)]} +ls_componentsmid = {'type': 'locset', 'value': [(1, 0.24098705946874843), (2, 0.5026349903620757)]} +ls_boundary = {'type': 'locset', 'value': [(0, 0.6649417593048336), (0, 1.0)]} +ls_cboundary = {'type': 'locset', 'value': [(0, 0.6649417593048336), (1, 0.0), (2, 0.0)]} +ls_sboundary = {'type': 'locset', 'value': [(0, 0.0), (0, 0.3324708796524168), (0, 0.6649417593048336), (0, 1.0), (1, 0.0), (1, 0.5920519526598877), (1, 1.0), (2, 0.0), (2, 1.0), (3, 0.0), (3, 1.0), (4, 0.0), (4, 0.585786437626905), (4, 1.0), (5, 0.0), (5, 0.7), (5, 1.0)]} +ls_distal = {'type': 'locset', 'value': [(1, 0.796025976329944), (3, 0.6666666666666667), (4, 0.39052429175127), (5, 1.0)]} +ls_proximal = {'type': 'locset', 'value': [(1, 0.29602597632994393), (2, 0.0), (5, 0.6124999999999999)]} +ls_distint_in = {'type': 'locset', 'value': [(1, 0.5), (2, 0.7), (5, 0.1)]} +ls_proxint_in = {'type': 'locset', 'value': [(1, 0.8), (2, 0.3)]} +ls_loctest = {'type': 'locset', 'value': [(1, 1.0), (2, 0.0), (5, 0.0)]} +ls_restrict = {'type': 'locset', 'value': [(1, 1.0), (3, 1.0), (4, 1.0)]} +ls_proximal_translate = {'type': 'locset', 'value': [(1, 0.35497750169352515), (2, 0.5160959062272675), (2, 0.6817468794150789), (5, 0.0)]} +ls_distal_translate_single = {'type': 'locset', 'value': [(0, 0.915588599565521)]} +ls_distal_translate_multi = {'type': 'locset', 'value': [(1, 0.5795163072671657), (3, 0.24228815992614555), (4, 0.20321157163712014)]} ############# regions (label_morph) -reg_empty = {"type": "region", "value": []} -reg_all = { - "type": "region", - "value": [ - (0, 0.0, 1.0), - (1, 0.0, 1.0), - (2, 0.0, 1.0), - (3, 0.0, 1.0), - (4, 0.0, 1.0), - (5, 0.0, 1.0), - ], -} -reg_tag1 = {"type": "region", "value": [(0, 0.0, 0.3324708796524168)]} -reg_tag2 = {"type": "region", "value": [(5, 0.0, 1.0)]} -reg_tag3 = { - "type": "region", - "value": [ - (0, 0.3324708796524168, 1.0), - (1, 0.0, 1.0), - (2, 0.0, 1.0), - (3, 0.0, 1.0), - (4, 0.0, 1.0), - ], -} -reg_tag4 = {"type": "region", "value": []} -reg_soma = {"type": "region", "value": [(0, 0.0, 0.3324708796524168)]} -reg_axon = {"type": "region", "value": [(5, 0.0, 1.0)]} -reg_dend = { - "type": "region", - "value": [ - (0, 0.3324708796524168, 1.0), - (1, 0.0, 1.0), - (2, 0.0, 1.0), - (3, 0.0, 1.0), - (4, 0.0, 1.0), - ], -} -reg_radlt5 = { - "type": "region", - "value": [ - (1, 0.44403896449491587, 1.0), - (3, 0.0, 1.0), - (4, 0.0, 1.0), - (5, 0.65625, 1.0), - ], -} -reg_radle5 = { - "type": "region", - "value": [ - (1, 0.44403896449491587, 1.0), - (2, 0.0, 1.0), - (3, 0.0, 1.0), - (4, 0.0, 1.0), - (5, 0.65625, 1.0), - ], -} -reg_radgt5 = { - "type": "region", - "value": [(0, 0.0, 1.0), (1, 0.0, 0.44403896449491587), (5, 0.0, 0.65625)], -} -reg_radge5 = { - "type": "region", - "value": [ - (0, 0.0, 1.0), - (1, 0.0, 0.44403896449491587), - (2, 0.0, 1.0), - (3, 0.0, 0.0), - (4, 0.0, 0.0), - (5, 0.0, 0.65625), - ], -} -reg_rad36 = { - "type": "region", - "value": [ - (1, 0.29602597632994393, 0.796025976329944), - (2, 0.0, 1.0), - (3, 0.0, 0.6666666666666667), - (4, 0.0, 0.39052429175127), - (5, 0.6124999999999999, 1.0), - ], -} -reg_branch0 = {"type": "region", "value": [(0, 0.0, 1.0)]} -reg_branch3 = {"type": "region", "value": [(3, 0.0, 1.0)]} -reg_segment0 = {"type": "region", "value": [(0, 0.0, 0.3324708796524168)]} -reg_segment3 = {"type": "region", "value": [(1, 0.0, 0.5920519526598877)]} -reg_cable_0_28 = {"type": "region", "value": [(0, 0.2, 0.8)]} -reg_cable_1_01 = {"type": "region", "value": [(1, 0.0, 1.0)]} -reg_cable_1_31 = {"type": "region", "value": [(1, 0.3, 1.0)]} -reg_cable_1_37 = {"type": "region", "value": [(1, 0.3, 0.7)]} -reg_proxint = { - "type": "region", - "value": [ - (0, 0.7697564611867647, 1.0), - (1, 0.4774887508467626, 0.8), - (2, 0.0, 0.3), - ], -} -reg_proxintinf = { - "type": "region", - "value": [(0, 0.0, 1.0), (1, 0.0, 0.8), (2, 0.0, 0.3)], -} -reg_distint = { - "type": "region", - "value": [ - (1, 0.5, 0.8225112491532374), - (2, 0.7, 1.0), - (3, 0.0, 0.432615327328525), - (4, 0.0, 0.3628424955125098), - (5, 0.1, 0.6), - ], -} -reg_distintinf = { - "type": "region", - "value": [ - (1, 0.5, 1.0), - (2, 0.7, 1.0), - (3, 0.0, 1.0), - (4, 0.0, 1.0), - (5, 0.1, 1.0), - ], -} -reg_lhs = {"type": "region", "value": [(0, 0.5, 1.0), (1, 0.0, 0.5)]} -reg_rhs = {"type": "region", "value": [(1, 0.0, 1.0)]} -reg_and = {"type": "region", "value": [(1, 0.0, 0.5)]} -reg_or = {"type": "region", "value": [(0, 0.5, 1.0), (1, 0.0, 1.0)]} - - -############# iexpr (label_morph) - -iexpr_directional_loc = {"type": "locset", "value": [(0, 1.0)]} -iexpr_dist_dis = { - "type": "region", - "value": [(1, 0.0, 1.0), (2, 0.0, 1.0), (3, 0.0, 1.0), (4, 0.0, 1.0)], -} -iexpr_prox_dis = {"type": "region", "value": [(0, 0.0, 1.0)]} +reg_empty = {'type': 'region', 'value': []} +reg_all = {'type': 'region', 'value': [(0, 0.0, 1.0), (1, 0.0, 1.0), (2, 0.0, 1.0), (3, 0.0, 1.0), (4, 0.0, 1.0), (5, 0.0, 1.0)]} +reg_tag1 = {'type': 'region', 'value': [(0, 0.0, 0.3324708796524168)]} +reg_tag2 = {'type': 'region', 'value': [(5, 0.0, 1.0)]} +reg_tag3 = {'type': 'region', 'value': [(0, 0.3324708796524168, 1.0), (1, 0.0, 1.0), (2, 0.0, 1.0), (3, 0.0, 1.0), (4, 0.0, 1.0)]} +reg_tag4 = {'type': 'region', 'value': []} +reg_soma = {'type': 'region', 'value': [(0, 0.0, 0.3324708796524168)]} +reg_axon = {'type': 'region', 'value': [(5, 0.0, 1.0)]} +reg_dend = {'type': 'region', 'value': [(0, 0.3324708796524168, 1.0), (1, 0.0, 1.0), (2, 0.0, 1.0), (3, 0.0, 1.0), (4, 0.0, 1.0)]} +reg_radlt5 = {'type': 'region', 'value': [(1, 0.44403896449491587, 1.0), (3, 0.0, 1.0), (4, 0.0, 1.0), (5, 0.65625, 1.0)]} +reg_radle5 = {'type': 'region', 'value': [(1, 0.44403896449491587, 1.0), (2, 0.0, 1.0), (3, 0.0, 1.0), (4, 0.0, 1.0), (5, 0.65625, 1.0)]} +reg_radgt5 = {'type': 'region', 'value': [(0, 0.0, 1.0), (1, 0.0, 0.44403896449491587), (5, 0.0, 0.65625)]} +reg_radge5 = {'type': 'region', 'value': [(0, 0.0, 1.0), (1, 0.0, 0.44403896449491587), (2, 0.0, 1.0), (3, 0.0, 0.0), (4, 0.0, 0.0), (5, 0.0, 0.65625)]} +reg_rad36 = {'type': 'region', 'value': [(1, 0.29602597632994393, 0.796025976329944), (2, 0.0, 1.0), (3, 0.0, 0.6666666666666667), (4, 0.0, 0.39052429175127), (5, 0.6124999999999999, 1.0)]} +reg_branch0 = {'type': 'region', 'value': [(0, 0.0, 1.0)]} +reg_branch3 = {'type': 'region', 'value': [(3, 0.0, 1.0)]} +reg_segment0 = {'type': 'region', 'value': [(0, 0.0, 0.3324708796524168)]} +reg_segment3 = {'type': 'region', 'value': [(1, 0.0, 0.5920519526598877)]} +reg_cable_0_28 = {'type': 'region', 'value': [(0, 0.2, 0.8)]} +reg_cable_1_01 = {'type': 'region', 'value': [(1, 0.0, 1.0)]} +reg_cable_1_31 = {'type': 'region', 'value': [(1, 0.3, 1.0)]} +reg_cable_1_37 = {'type': 'region', 'value': [(1, 0.3, 0.7)]} +reg_proxint = {'type': 'region', 'value': [(0, 0.7697564611867647, 1.0), (1, 0.4774887508467626, 0.8), (2, 0.0, 0.3)]} +reg_proxintinf = {'type': 'region', 'value': [(0, 0.0, 1.0), (1, 0.0, 0.8), (2, 0.0, 0.3)]} +reg_distint = {'type': 'region', 'value': [(1, 0.5, 0.8225112491532374), (2, 0.7, 1.0), (3, 0.0, 0.432615327328525), (4, 0.0, 0.3628424955125098), (5, 0.1, 0.6)]} +reg_distintinf = {'type': 'region', 'value': [(1, 0.5, 1.0), (2, 0.7, 1.0), (3, 0.0, 1.0), (4, 0.0, 1.0), (5, 0.1, 1.0)]} +reg_lhs = {'type': 'region', 'value': [(0, 0.5, 1.0), (1, 0.0, 0.5)]} +reg_rhs = {'type': 'region', 'value': [(1, 0.0, 1.0)]} +reg_and = {'type': 'region', 'value': [(1, 0.0, 0.5)]} +reg_or = {'type': 'region', 'value': [(0, 0.5, 1.0), (1, 0.0, 1.0)]} +reg_diff = {'type': 'region', 'value': [(0, 0.5, 1.0)]} +reg_complement = {'type': 'region', 'value': [(0, 0.0, 1.0), (2, 0.0, 1.0), (3, 0.0, 1.0), (4, 0.0, 1.0), (5, 0.0, 1.0)]} +reg_completion = {'type': 'region', 'value': [(0, 1.0, 1.0), (1, 0.0, 1.0), (2, 0.0, 0.0)]} ############# locsets (tutorial_morph) -tut_ls_root = {"type": "locset", "value": [(0, 0.0)]} -tut_ls_terminal = {"type": "locset", "value": [(1, 1.0), (3, 1.0), (4, 1.0), (5, 1.0)]} -tut_ls_custom_terminal = {"type": "locset", "value": [(3, 1.0), (4, 1.0)]} -tut_ls_axon_terminal = {"type": "locset", "value": [(5, 1.0)]} +tut_ls_root = {'type': 'locset', 'value': [(0, 0.0)]} +tut_ls_terminal = {'type': 'locset', 'value': [(1, 1.0), (3, 1.0), (4, 1.0), (5, 1.0)]} +tut_ls_custom_terminal = {'type': 'locset', 'value': [(3, 1.0), (4, 1.0)]} +tut_ls_axon_terminal = {'type': 'locset', 'value': [(5, 1.0)]} ############# regions (tutorial_morph) -tut_reg_all = { - "type": "region", - "value": [ - (0, 0.0, 1.0), - (1, 0.0, 1.0), - (2, 0.0, 1.0), - (3, 0.0, 1.0), - (4, 0.0, 1.0), - (5, 0.0, 1.0), - ], -} -tut_reg_soma = {"type": "region", "value": [(0, 0.0, 0.3324708796524168)]} -tut_reg_axon = {"type": "region", "value": [(5, 0.0, 1.0)]} -tut_reg_dend = { - "type": "region", - "value": [(0, 0.3324708796524168, 1.0), (1, 0.0, 1.0), (2, 0.0, 1.0)], -} -tut_reg_last = {"type": "region", "value": [(3, 0.0, 1.0), (4, 0.0, 1.0)]} -tut_reg_rad_gt = { - "type": "region", - "value": [(0, 0.0, 0.3324708796524168), (5, 0.0, 0.21875)], -} -tut_reg_custom = { - "type": "region", - "value": [ - (0, 0.0, 0.3324708796524168), - (3, 0.0, 1.0), - (4, 0.0, 1.0), - (5, 0.0, 0.21875), - ], -} +tut_reg_all = {'type': 'region', 'value': [(0, 0.0, 1.0), (1, 0.0, 1.0), (2, 0.0, 1.0), (3, 0.0, 1.0), (4, 0.0, 1.0), (5, 0.0, 1.0)]} +tut_reg_soma = {'type': 'region', 'value': [(0, 0.0, 0.3324708796524168)]} +tut_reg_axon = {'type': 'region', 'value': [(5, 0.0, 1.0)]} +tut_reg_dend = {'type': 'region', 'value': [(0, 0.3324708796524168, 1.0), (1, 0.0, 1.0), (2, 0.0, 1.0)]} +tut_reg_last = {'type': 'region', 'value': [(3, 0.0, 1.0), (4, 0.0, 1.0)]} +tut_reg_rad_gt = {'type': 'region', 'value': [(0, 0.0, 0.3324708796524168), (5, 0.0, 0.21875)]} +tut_reg_custom = {'type': 'region', 'value': [(0, 0.0, 0.3324708796524168), (3, 0.0, 1.0), (4, 0.0, 1.0), (5, 0.0, 0.21875)]} ############# locsets (tutorial_network_ring_morph) -tut_network_ring_ls_synapse_site = {"type": "locset", "value": [(1, 0.5)]} -tut_network_ring_ls_root = {"type": "locset", "value": [(0, 0.0)]} +tut_network_ring_ls_synapse_site = {'type': 'locset', 'value': [(1, 0.5)]} +tut_network_ring_ls_root = {'type': 'locset', 'value': [(0, 0.0)]} ############# regions (tutorial_network_ring_morph) -tut_network_ring_reg_soma = {"type": "region", "value": [(0, 0.0, 0.1935483870967742)]} -tut_network_ring_reg_dend = { - "type": "region", - "value": [(0, 0.1935483870967742, 1.0), (1, 0.0, 1.0), (2, 0.0, 1.0)], -} +tut_network_ring_reg_soma = {'type': 'region', 'value': [(0, 0.0, 0.1935483870967742)]} +tut_network_ring_reg_dend = {'type': 'region', 'value': [(0, 0.1935483870967742, 1.0), (1, 0.0, 1.0), (2, 0.0, 1.0)]} diff --git a/doc/scripts/make_images.py b/doc/scripts/make_images.py index af9f4cfef6..6d7f4bb8b7 100644 --- a/doc/scripts/make_images.py +++ b/doc/scripts/make_images.py @@ -424,6 +424,20 @@ def generate(path=""): label_image( inputs.label_morph, [inputs.ls_branchmid], path + "/on_branches_label.svg" ) + label_image(inputs.label_morph, [], path + "/boundary_label.svg") + label_image( + inputs.label_morph, + [ + inputs.ls_boundary, + inputs.ls_cboundary, + inputs.ls_sboundary, + ], + path + "/boundaries_label.svg", + ) + + label_image( + inputs.label_morph, [inputs.ls_componentsmid], path + "/on_components_label.svg" + ) label_image( inputs.label_morph, [inputs.ls_term, inputs.reg_tag3, inputs.ls_restrict], @@ -504,6 +518,21 @@ def generate(path=""): [inputs.reg_lhs, inputs.reg_rhs, inputs.reg_and], path + "/intersect_label.svg", ) + label_image( + inputs.label_morph, + [inputs.reg_lhs, inputs.reg_rhs, inputs.reg_diff], + path + "/difference_label.svg", + ) + label_image( + inputs.label_morph, + [inputs.reg_rhs, inputs.reg_complement], + path + "/complement_label.svg", + ) + label_image( + inputs.label_morph, + [inputs.reg_rhs, inputs.reg_completion], + path + "/completion_label.svg", + ) label_image(inputs.label_morph, [inputs.reg_radlt5], path + "/radiuslt_label.svg") label_image(inputs.label_morph, [inputs.reg_radle5], path + "/radiusle_label.svg") label_image(inputs.label_morph, [inputs.reg_radgt5], path + "/radiusgt_label.svg") diff --git a/ext/fmt b/ext/fmt index a33701196a..a0b8a92e3d 160000 --- a/ext/fmt +++ b/ext/fmt @@ -1 +1 @@ -Subproject commit a33701196adfad74917046096bf5a2aa0ab0bb50 +Subproject commit a0b8a92e3d1532361c2f7feb63babc5c18d00ef2 diff --git a/ext/pugixml b/ext/pugixml index 08b3433180..a0e0643363 160000 --- a/ext/pugixml +++ b/ext/pugixml @@ -1 +1 @@ -Subproject commit 08b3433180727ea2f78fe02e860a08471db1e03c +Subproject commit a0e064336317c9347a91224112af9933598714e9 diff --git a/pyproject.toml b/pyproject.toml index 7194cd2e81..7c9b340d1f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,10 @@ [project] name = "arbor" -version = "0.9.0" # TODO: make dependent on VERSION file. Blocked by https://github.com/scikit-build/scikit-build-core/issues/230 +version = "0.9.1-dev" # TODO: make dependent on VERSION file. Blocked by https://github.com/scikit-build/scikit-build-core/issues/230 readme = {file = "README.md", content-type = "text/markdown"} license = {file = "LICENSE"} description = "High performance simulation of networks of multicompartment neurons." -requires-python = ">=3.7" +requires-python = ">=3.8" keywords = ["simulator", "neuroscience", "morphological detail", "HPC", "GPU", "C++"] authors = [ {name = "Arbor Dev Team", email = "contact@arbor-sim.org"} @@ -17,7 +17,6 @@ classifiers = [ "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Programming Language :: Python", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", @@ -43,7 +42,7 @@ wheel.packages = [] [tool.black] line-length = 88 -target-version = ['py37', 'py38', 'py39', 'py310', 'py311', 'py312'] +target-version = ['py38', 'py39', 'py310', 'py311', 'py312'] include = '\.pyi?$' extend-exclude='^/(ext|doc/scripts/.*_theme|doc/scripts/inputs.py)' @@ -62,16 +61,14 @@ build-backend = "scikit_build_core.build" [tool.cibuildwheel] build-frontend = "build" build = ["*linux*","*macosx*"] -skip = ["cp36*", "*musllinux*"] +skip = ["cp36*", "cp37*", "*musllinux*"] test-command = "python -m unittest discover -v -s {project}/python" test-skip = "cp312*" dependency-versions = "latest" [tool.cibuildwheel.macos] archs = ["universal2"] - -[tool.cibuildwheel.macos.environment] -MACOSX_DEPLOYMENT_TARGET = "10.15" +environment = { MACOSX_DEPLOYMENT_TARGET = "10.15" } [tool.cibuildwheel.linux] archs = ["x86_64"] diff --git a/scripts/check-all-tags.sh b/scripts/check-all-tags.sh index 57e9553aae..9a27d8fbfd 100755 --- a/scripts/check-all-tags.sh +++ b/scripts/check-all-tags.sh @@ -13,7 +13,7 @@ PREFIX="${1:-} `pwd`/build/bin" cxx=/usr/local/opt/llvm/bin/clang++ cc=/usr/local/opt/llvm/bin/clang -for tag in v0.4 v0.5.2 v0.6 v0.7 v0.8 v0.8.1 +for tag in v0.4 v0.5.2 v0.6 v0.7 v0.8 v0.8.1 v0.9.0 do echo "Version=$tag" rm -rf ext/* @@ -54,7 +54,7 @@ check () { fi } -for tag in "v0.4-79855b66" "v0.5.2-51e35898" "v0.6-930c23eb" "v0.7-d0e424b4" "v0.8-8e82ec1" "v0.8.1-c683a1f" +for tag in "v0.4-79855b66" "v0.5.2-51e35898" "v0.6-930c23eb" "v0.7-d0e424b4" "v0.8-8e82ec1" "v0.8.1-c683a1f" "v0.9.0-217c776" do echo "Version=$tag" for simd in ON OFF diff --git a/spack/package.py b/spack/package.py index 5bfc2df590..50c1c5ea2b 100644 --- a/spack/package.py +++ b/spack/package.py @@ -1,4 +1,4 @@ -# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) @@ -12,11 +12,16 @@ class Arbor(CMakePackage, CudaPackage): homepage = "https://arbor-sim.org" git = "https://github.com/arbor-sim/arbor.git" - url = "https://github.com/arbor-sim/arbor/releases/download/v0.8.1/arbor-v0.8.1-full.tar.gz" - maintainers = ["thorstenhater", "brenthuisman", "haampie"] + url = "https://github.com/arbor-sim/arbor/releases/download/v0.8.1/arbor-v0.9.0-full.tar.gz" + maintainers = ("thorstenhater", "brenthuisman", "haampie") version("master", branch="master") version("develop") + version( + "0.9.0", + sha256="5f9740955c821aca81e23298c17ad64f33f635756ad9b4a0c1444710f564306a", + url="https://github.com/arbor-sim/arbor/releases/download/v0.9.0/arbor-v0.9.0-full.tar.gz", + ) version( "0.8.1", sha256="caebf96676ace6a9c50436541c420ca4bb53f0639dcab825de6fa370aacf6baa", @@ -75,10 +80,12 @@ class Arbor(CMakePackage, CudaPackage): # misc dependencies depends_on("fmt@7.1:", when="@0.5.3:") # required by the modcc compiler depends_on("fmt@9.1:", when="@0.7.1:") - depends_on("googletest@1.12.1", when="@0.7.1:") + depends_on("fmt@10.0:", when="@0.9.1:") + depends_on("googletest@1.12.1:", when="@0.7.1:") depends_on("pugixml@1.11:", when="@0.7.1:") - depends_on("nlohmann-json@3.11.2") - depends_on("random123") + depends_on("pugixml@1.13:", when="@0.9.1:") + depends_on("nlohmann-json@3.11.2:") + depends_on("random123@1.14.0:") with when("+cuda"): depends_on("cuda@10:") depends_on("cuda@11:", when="@0.7.1:") @@ -88,18 +95,20 @@ class Arbor(CMakePackage, CudaPackage): depends_on("py-mpi4py", when="+mpi+python", type=("build", "run")) # python (bindings) - extends("python", when="+python") - depends_on("python@3.7:", when="+python", type=("build", "run")) - depends_on("py-numpy", when="+python", type=("build", "run")) with when("+python"): + extends("python") + depends_on("python@3.7:", type=("build", "run")) + depends_on("python@3.8:", when="@0.9.1:", type=("build", "run")) + depends_on("py-numpy", type=("build", "run")) depends_on("py-pybind11@2.6:", type="build") depends_on("py-pybind11@2.8.1:", when="@0.5.3:", type="build") depends_on("py-pybind11@2.10.1:", when="@0.7.1:", type="build") # sphinx based documentation - depends_on("python@3.7:", when="+doc", type="build") - depends_on("py-sphinx", when="+doc", type="build") - depends_on("py-svgwrite", when="+doc", type="build") + with when("+doc"): + depends_on("python@3.8:", type="build") + depends_on("py-sphinx", type="build") + depends_on("py-svgwrite", type="build") @property def build_targets(self): diff --git a/test/ubench/event_setup.cpp b/test/ubench/event_setup.cpp index 33f8a97d3e..1b5ff57ced 100644 --- a/test/ubench/event_setup.cpp +++ b/test/ubench/event_setup.cpp @@ -2,10 +2,10 @@ // The key concern is how to take an unsorted set of events // // TODO: We assume that the cells in a cell group are numbered contiguously, -// i.e. 0:ncells-1. The cells in an mc_cell_group are not typically thus, +// i.e. 0:ncells-1. The cells in an cable_cell_group are not typically thus, // instead a hash table is used to look up the cell_group local index from the // gid. A similar lookup should be added to theses tests, to more accurately -// reflect the mc_cell_group implementation. +// reflect the cable_cell_group implementation. // // TODO: The staged_events output is a vector of spike_event, not // a deliverable event. diff --git a/test/unit-distributed/test_communicator.cpp b/test/unit-distributed/test_communicator.cpp index 6a097febb6..be048acb16 100644 --- a/test/unit-distributed/test_communicator.cpp +++ b/test/unit-distributed/test_communicator.cpp @@ -14,7 +14,7 @@ #include "execution_context.hpp" #include "fvm_lowered_cell.hpp" #include "lif_cell_group.hpp" -#include "mc_cell_group.hpp" +#include "cable_cell_group.hpp" #include "util/filter.hpp" #include "util/rangeutil.hpp" #include "util/span.hpp" @@ -514,7 +514,7 @@ TEST(communicator, ring) const auto D = partition_load_balance(R, g_context); // set up source and target label->lid resolvers - // from mc_cell_group and lif_cell_group + // from cable_cell_group and lif_cell_group std::vector mc_gids, lif_gids; for (auto g: D.groups()) { if (g.kind == cell_kind::cable) { @@ -525,7 +525,7 @@ TEST(communicator, ring) } } cell_label_range mc_srcs, mc_tgts, lif_srcs, lif_tgts; - auto mc_group = mc_cell_group(mc_gids, R, mc_srcs, mc_tgts, make_fvm_lowered_cell(backend_kind::multicore, *g_context)); + auto mc_group = cable_cell_group(mc_gids, R, mc_srcs, mc_tgts, make_fvm_lowered_cell(backend_kind::multicore, *g_context)); auto lif_group = lif_cell_group(lif_gids, R, lif_srcs, lif_tgts); auto local_sources = cell_labels_and_gids(mc_srcs, mc_gids); @@ -633,13 +633,13 @@ TEST(communicator, all2all) const auto D = partition_load_balance(R, g_context); // set up source and target label->lid resolvers - // from mc_cell_group + // from cable_cell_group std::vector mc_gids; for (auto g: D.groups()) { mc_gids.insert(mc_gids.end(), g.gids.begin(), g.gids.end()); } cell_label_range local_sources, local_targets; - auto mc_group = mc_cell_group(mc_gids, R, local_sources, local_targets, make_fvm_lowered_cell(backend_kind::multicore, *g_context)); + auto mc_group = cable_cell_group(mc_gids, R, local_sources, local_targets, make_fvm_lowered_cell(backend_kind::multicore, *g_context)); auto global_sources = g_context->distributed->gather_cell_labels_and_gids({local_sources, mc_gids}); // construct the communicator @@ -680,13 +680,13 @@ TEST(communicator, mini_network) const auto D = partition_load_balance(R, g_context); // set up source and target label->lid resolvers - // from mc_cell_group + // from cable_cell_group std::vector gids; for (auto g: D.groups()) { gids.insert(gids.end(), g.gids.begin(), g.gids.end()); } cell_label_range local_sources, local_targets; - auto mc_group = mc_cell_group(gids, R, local_sources, local_targets, make_fvm_lowered_cell(backend_kind::multicore, *g_context)); + auto mc_group = cable_cell_group(gids, R, local_sources, local_targets, make_fvm_lowered_cell(backend_kind::multicore, *g_context)); auto global_sources = g_context->distributed->gather_cell_labels_and_gids({local_sources, gids}); // construct the communicator diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt index ac0f00f32d..1a85d77360 100644 --- a/test/unit/CMakeLists.txt +++ b/test/unit/CMakeLists.txt @@ -93,7 +93,7 @@ set(unit_sources test_math.cpp test_matrix.cpp test_mcable_map.cpp - test_mc_cell_group.cpp + test_cable_cell_group.cpp test_mechanisms.cpp test_mech_temp_diam.cpp test_mechcat.cpp @@ -164,7 +164,7 @@ if(ARB_WITH_GPU) test_intrin.cu test_gpu_stack.cu test_reduce_by_key.cu - test_mc_cell_group_gpu.cpp + test_cable_cell_group_gpu.cpp test_spikes_gpu.cpp test_vector_gpu.cpp ) diff --git a/test/unit/test_mc_cell_group.cpp b/test/unit/test_cable_cell_group.cpp similarity index 86% rename from test/unit/test_mc_cell_group.cpp rename to test/unit/test_cable_cell_group.cpp index 69bbb15ffe..f143df0a25 100644 --- a/test/unit/test_mc_cell_group.cpp +++ b/test/unit/test_cable_cell_group.cpp @@ -6,7 +6,7 @@ #include "epoch.hpp" #include "fvm_lowered_cell.hpp" -#include "mc_cell_group.hpp" +#include "cable_cell_group.hpp" #include "util/rangeutil.hpp" #include "common.hpp" @@ -36,19 +36,19 @@ namespace { } ACCESS_BIND( - std::vector mc_cell_group::*, + std::vector cable_cell_group::*, private_spike_sources_ptr, - &mc_cell_group::spike_sources_) + &cable_cell_group::spike_sources_) -TEST(mc_cell_group, get_kind) { +TEST(cable_cell_group, get_kind) { cable_cell cell = make_cell(); cell_label_range srcs, tgts; - mc_cell_group group{{0}, cable1d_recipe({cell}), srcs, tgts, lowered_cell()}; + cable_cell_group group{{0}, cable1d_recipe({cell}), srcs, tgts, lowered_cell()}; EXPECT_EQ(cell_kind::cable, group.get_cell_kind()); } -TEST(mc_cell_group, test) { +TEST(cable_cell_group, test) { cable_cell cell = make_cell(); auto rec = cable1d_recipe({cell}); rec.nernst_ion("na"); @@ -56,7 +56,7 @@ TEST(mc_cell_group, test) { rec.nernst_ion("k"); cell_label_range srcs, tgts; - mc_cell_group group{{0}, rec, srcs, tgts, lowered_cell()}; + cable_cell_group group{{0}, rec, srcs, tgts, lowered_cell()}; group.advance(epoch(0, 0., 50.), 0.01, {}); // Model is expected to generate 4 spikes as a result of the @@ -64,7 +64,7 @@ TEST(mc_cell_group, test) { EXPECT_EQ(4u, group.spikes().size()); } -TEST(mc_cell_group, sources) { +TEST(cable_cell_group, sources) { // Make twenty cells, with an extra detector on gids 0, 3 and 17 // to make things more interesting. std::vector cells; @@ -86,7 +86,7 @@ TEST(mc_cell_group, sources) { rec.nernst_ion("k"); cell_label_range srcs, tgts; - mc_cell_group group{gids, rec, srcs, tgts, lowered_cell()}; + cable_cell_group group{gids, rec, srcs, tgts, lowered_cell()}; // Expect group sources to be lexicographically sorted by source id // with gids in cell group's range and indices starting from zero. diff --git a/test/unit/test_mc_cell_group_gpu.cpp b/test/unit/test_cable_cell_group_gpu.cpp similarity index 88% rename from test/unit/test_mc_cell_group_gpu.cpp rename to test/unit/test_cable_cell_group_gpu.cpp index 3597fe449f..3f5fbfdaad 100644 --- a/test/unit/test_mc_cell_group_gpu.cpp +++ b/test/unit/test_cable_cell_group_gpu.cpp @@ -7,7 +7,7 @@ #include "epoch.hpp" #include "execution_context.hpp" #include "fvm_lowered_cell.hpp" -#include "mc_cell_group.hpp" +#include "cable_cell_group.hpp" #include "../common_cells.hpp" #include "../simple_recipes.hpp" @@ -28,7 +28,7 @@ namespace { } } -TEST(mc_cell_group, gpu_test) +TEST(cable_cell_group, gpu_test) { auto context = make_context({1, arbenv::default_gpu()}); @@ -39,7 +39,7 @@ TEST(mc_cell_group, gpu_test) rec.nernst_ion("k"); cell_label_range srcs, tgts; - mc_cell_group group{{0}, rec, srcs, tgts, make_fvm_lowered_cell(backend_kind::gpu, *context)}; + cable_cell_group group{{0}, rec, srcs, tgts, make_fvm_lowered_cell(backend_kind::gpu, *context)}; group.advance(epoch(0, 0., 50.), 0.01, {}); // The model is expected to generate 4 spikes as a result of the