- Dec 14, 2020
-
-
thorstenhater authored
Fix a latent bug in the Python wrapper that was triggered in pybind11 v2.6.1 These changes ensure that the GIL is acquired before calling functions in C++ that may consume a Python object with reference count 1 as an argument, in which case the object's destructor is called at the end of the function, after any GIL acquired inside the function would have been released. Fixes #1271.
-
- Dec 09, 2020
-
-
thorstenhater authored
* Fix pybind11 issues. * Retract suspicious fix. * Address comments.
-
- Dec 08, 2020
-
-
Brent Huisman authored
Replace CMAKE_SOURCE_DIR with PROJECT_SOURCE_DIR to pick up the correct paths when used as a sub-module. Fixes #1266.
-
- Nov 18, 2020
-
-
Sam Yates authored
Major changes in Python library and documentation: * Add global state (immutable after initialization) for the Python module that manages the mapping between probe metadata types and the method by which the corresponding [sample data can be collected and presented as Python objects. This is necessary for decoupling the implementation of the simulation wrapper from that of the various cable cell probe types. * Wrap each of the C++ cable cell probe types with a Python function that returns a `probe_info` object. * Add code for converting and accumulating C++ probe metadata and sample data, registered in the module global state against the metadata type info. * Make the `arbor.simulator` object responsible for recording all spike and sample data, with corresponding new methods. * Use NumPy arrays and structured datatypes for returning spike and sample data. * Place Python schedule proxies under an abstract interface so that consumers of the proxies can be made generic over schedule types. * Add unit tests for the `arbor.simulator` class and its new functionality, including distributed spike collection. * Rework all Python API documentation concerning probes, sampling, and spike recording; add information on newly exposed cable cell probe addresses. * Add new python example `single_cell_recipe.py` which is a generic recipe version of `single_cell_model.py`. * Adjust other code in the wrapper and examples to accommodate these changes. Minor changes in Python library: * Add equality tests for `arbor.location` and `arbor.cable` Python classes. * Use the `py::` namespace shorthand more often in the Python wrapping sources. * Add an implicit conversion for a pair of numbers to `arbor.cell_member`, so that e.g. probe ids can be specified simply as `(gid, index)`. * Add an implicit conversion from a tuple to `arbor.mpoint` so that a morphological point can be specified simply as `(x, y, z, radius)`. * Modify the interface to `arbor.regular_schedule` so that the overloads correspond more closely to the C++ API. In particular, `arbor.regular_schedule(dt)` now describes a schedule with times 0, dt, 2*dt, etc. Minor changes in C++ library: * Change test in FVM lowered cell implementation and exception message for `bad_source_description`: assert number of detectors is exactly the number of sources promised by the recipe. * Add comment describing `probe_metadata` object in `sampling.hpp` which asserts that the type and value of probe-specific metadata completely determines the correct interpretation of sampled data provided to a callback.
-
- Nov 17, 2020
-
-
Nora Abi Akar authored
* Return `arb::morphology` from `load_swc_xxx` methods for consistency with the NeuroML interface. * Fix unit tests. * Fix documentation
-
- Nov 10, 2020
-
-
Sebastian Schmitt authored
-
Sebastian Schmitt authored
Speed up plotting in seaborn.relplot by disabling calculation of confidence intervals
-
- Nov 06, 2020
-
-
Nora Abi Akar authored
* Remove blank line from `ball_and_stick.swc` * Mention that blank lines in SWC files indicate end of data. * Check for trailing data after parsing in the python interface. * Leave stream in good state if `parse_swc` encounters an empty line indicating end of data.
-
- Nov 05, 2020
-
-
Nora Abi Akar authored
* Rename `as_segment_tree` to `load_swc_arbor`. * Remove `swc_mode`: `sort_and_validate_swc` now performs the `relaxed` checks by default, `load_swc_arbor` performs the `strict` checks. * Change `load_swc_xxx` to only accept `swc_data` as an argument * Remove default constructor for `swc_data` and enforce validation of SWC records via `sort_and_validate_swc` at construction. * Add fixes for docs and unit tests.
-
- Nov 02, 2020
-
-
thorstenhater authored
* Add interface for querying names. * Add derived mechanisms to list, clean-up. * Add unit tests. * Add python bindings and docs.
-
- Nov 01, 2020
-
-
Nora Abi Akar authored
-
- Oct 09, 2020
-
-
Nora Abi Akar authored
Add a catalogue of mechanisms used by the BBP models.
-
Nora Abi Akar authored
* Add some log messages in python examples * Add python examples to CI
-
Brent Huisman authored
-
- Oct 07, 2020
-
-
Brent Huisman authored
-
- Oct 06, 2020
-
-
Benjamin Cumming authored
-
- Oct 05, 2020
-
-
Brent Huisman authored
* Python examples: Updated to use region expressions (quotes) * Python examples: Uniform plotting * Python examples: Removed tutorial directory (example roughly matches python/example/single_cell_model.py) * Python examples: Rewrote flat_cell_builder() to segment_tree()
-
Brent Huisman authored
* Synced pages between Concepts, Python API and C++ API wherever possible * Recipe pages conform between the three section (concepts, python, c++) * Cell, Cable Cell and Cell * pages are rearranged and provided with some copy explaining the relationship between them. * Moved Python API out of Concepts * Renamed Concepts "How does Arbor work?" * Added Python Module Index plus mock import of Arbor for RTD build (unfortunately won't show there) * Broke out Interconnectivity (synapses) page. * Reworked Single Cell Model page into a quick start, with lots of cross referencing. * Tweaked logo. * Added Spack to install options. * Updated blurb. * Documentation now follows EU capitalization rules. * Assorted typofixes
-
Benjamin Cumming authored
-
- Oct 01, 2020
-
-
Brent Huisman authored
-
- Sep 30, 2020
-
-
Sam Yates authored
* Minor output formatting fix for `swc_record`. * Modify the Python `load_swc_allen` implementation to cope with SWC record ids not necessarily being contiguous, and with SWC record parent ids corresponding to record ids, not 0-based indices.
-
- Sep 29, 2020
-
-
Sam Yates authored
-
Nora Abi Akar authored
* Update `dryrun` to generate some spikes again, add a voltage printer. * Fix `ring.py` recipe. * Fix labels in `single_cell_builder.py` and `single_cell_swc.py`.
-
- Sep 28, 2020
-
-
Sam Yates authored
* Simplify scanning of SWC records. * `parse_swc` now retains metadata read from SWC comments. * `parse_swc` is given two modes, relaxed and strict. Strict mode enforces contiguous record numbering and rejects SWC that looks like it has a single-point soma. * Subtype `swc_error` according to error mode. * Remove `point` class and corresponding unit tests. * Add a RAII stream formatting flag saver, used in SWC record output operator. * Replace included 1-point soma SWC example with a regular SWC from NeuroMorpho.
-
- Sep 25, 2020
-
-
Sam Yates authored
* Substitute `std::optional<T>` for `arb::util::optional<T>` for non-reference types T. * Remove reference-deducing `util::value_by_key`; replace usages with new function `util::ptr_by_key`. * Add some missing header includes that were required but included only transitively. * Remove `operator<<` overload for optional in python/strprintf.hpp; replace with utility wrapper class that catches `std::optional<T>`. * Wrap some `std::optional` values with `to_string` in ostream output in python lib. Fixes #1154.
-
- Sep 22, 2020
-
-
Benjamin Cumming authored
* Move label and s-expr parsing code and unit tests from Python to arbor C++ library. * Update `locset` and `region` constructors that take string arguments to parse strings as s-expressions or "quoted" labels. * Modify the input stream modifier used to parse asc files to use a lookup table for substitutions, renamed it transmogrifier. * Replace `hopefully` type implemented in python headers with an `arb::util::expected`. * Add `ARBDEV_COLOR` CMake option that forces gcc and clang to always output color output. * Allow arbitrary strings in labels in region and locset expressions. * Add `parse_region_expression` and `parse_locset_expression` functions alongside the existing `parse_label_expression` function for use when a region or locset is expected. These calls will promote a quoted string `"label"` to `(region "label")` or `(locset "label")` respectively. * Add user-defined string literals for labels so that the C++ interface can use `"soma"_lab` instead of awkward escaping `"\"soma\""`. * Simplify Python wrapper code.
-
- Sep 18, 2020
-
-
Sam Yates authored
* Replace usages of `util::any` with `std::any`. * Modify `util::any_cast` so that it forwards `std::any` arguments to `std::any_cast`; move into own header. * Prevent `std::unique_any` from implicitly encapsulating `std::any` objects. * Replace `test_any.cpp` unit tests with `test_any_cast.cpp` unit tests. * Replace some usages of `std::is_same<X, Y>::value` with `std::is_same_v<X, Y>` as part of general C++17ification. * Remove `util/variant.hpp`, `test_variant.cpp`. * Replace occurrences of `util::variant` with `std::variant`. * Replace `util::variant::get<N>` with `std::get<N>`. * Replace `util::get_if<N>` with `std::get_if<N>`, passing a pointer to variant instead of a ref or value. * Add some standard #includes where they were required in the source, but only included transitively. * Some minor comment tidying and fix-ups. * Update C++ API docs. Fixes #1144.
-
- Sep 17, 2020
-
-
Nora Abi Akar authored
* Make the members of `cable_cell_ion_data` optional. * Add separate methods for painting `init_int_concentration` , `init_ext_concentration` and `init_reversal_potential` on the cell.
-
- Sep 14, 2020
-
-
Sam Yates authored
* Implement a workalike for the proposed `std::expected` class: see http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0323r9.html . * Replace use of `either` with `expected` in `mprovider`, `mechanism_catalogue`, `util::partition_range`, and `pyarb::hopefully`. * Replace use of `either` with `variant` in `util::sentinel_iterator`. * Add `in_place_t` constructor for `util::optional`. * Fix move assignment bug in `util::variant`. * Remove `util/either.hpp` and associated tests. Fixes #1135.
-
Benjamin Cumming authored
* Update CMake CXX version. * Make CUDA 10 a minimum requirement and remove CUDA 9 support code. * Set up g++ Travis tests to use g++ 8. * Explicitly set C++14 version for nvcc. * Properly split cuda compilation, including in unit tests. * Remove unnecessary modcc `SOLVE` warning. * Update pybind11 module to tag v2.5.0 * Replace `util::size` and `util::data` with `std::` equivalents.
-
- Sep 08, 2020
-
-
Benjamin Cumming authored
Switch `arb::util::either` to `arb::util::variant` in the Python wrapper. Fixes #1133
-
- Aug 27, 2020
-
-
Benjamin Cumming authored
This PR adds a bunch of high-level docs for concepts related to single cell models. * morphologies * labels (region and locset expressions) * mechanisms * cable cells It adds some python scripts to the `doc` path, which are called during documentation building to generate images of cell morphologies, regions and locsets that are generated in a separate script that uses the Arbor Python API. The docs are not complete: the cable cell and mechanism docs are unfinished, and the tutorial section needs to build on these concepts to give more detailed step by step examples.
-
- Jul 24, 2020
-
-
thorstenhater authored
Rename import method to avoid Python keyword collision.
-
- Jul 23, 2020
-
-
Nora Abi Akar authored
Fix a Python example that was out of date.
-
- Jul 21, 2020
-
-
Benjamin Cumming authored
* add parse_swc_allen method * small fixes and clean up * add test for incomplete branches and make error messages more consistent * add extra swc assertion, and remove single sample special case
-
- Jul 13, 2020
-
-
Benjamin Cumming authored
* Remove spherical root/soma from morphology representations and logic. * Replace `sample_tree` with `segment_tree`, which represents sample points in pairs and allows the representation of detached branches and cable segments. * Remove sample point properties and predicates. * Remove `cv_policy_flag::single_root_cv` as somata with a single attached dendrite will have a representation in the morphology of a single branch. * Remove `arb::math::{volume/area}_sphere`, which are no longer being used. * Remove spherical root special cases from `embed_pwlin` and `place_pwlin` objects. * Add textual representation of `mnpos` in morphology exception text. * Rename `sample_tree_from_swc` to `segement_tree_from_swc` and remove any special casing for one point somata. * Remove `msample` and `mbranch` types. * Update unit tests and python wrapper to reflect the changes.
-
thorstenhater authored
* Add import method for mechanism catalogues, allowing mechanisms from a second catalogue to be incorporated with a prefix, together with Python interface. * Expose `global_allen_catalogue`. * Extend unit tests to cover mechanism catalogue import and check for name collision error cases.
-
- Jul 02, 2020
-
-
Sam Yates authored
* Move `cv_policy` classes to new source files. * Remove `cv_policy_flag::single_root_cv`. * Allow all supplied `cv_policy` makers to be restricted a domain specified by a region: the policy is then applied per component, with the boundary points of the completion of the components included. * Expose `cv_policy` domain in public interface. * Add `components` function for splitting an extent into disconnected components. Add comment describing what is meant by connected in this context. * Rename `super` region function to `complete`. * Add region expression functions `complement` and `difference`. * Add new locset expression function `boundary` which returns the extrmal points of each component of a region. * Add new locset expression `cboundary` which returns the extremal points of the completion of each component of the region, which is what we need to close off CVs generated by region-restricted CV policies. * Add locset expression `supp...
-
- Jun 24, 2020
-
-
Benjamin Cumming authored
Update core library: * support derivation of named mechanisms in catalogue from a string description of the parent. * fix bug in radois_ge region expression that was finding region_lt. * fix test for radius_ge region expression Add support for mechanism, global properties and catalogue shenanigans to python wrapper
-
- Jun 16, 2020
-
-
thorstenhater authored
-