Skip to content
Snippets Groups Projects
  1. Oct 09, 2020
  2. Oct 07, 2020
  3. Oct 05, 2020
    • Brent Huisman's avatar
      Update Python examples (#1166) · d3e99c23
      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()
      d3e99c23
  4. Sep 29, 2020
    • Nora Abi Akar's avatar
      fix examples (#1164) · 42acdda8
      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`.
      42acdda8
  5. Sep 22, 2020
    • Benjamin Cumming's avatar
      Move region/locset S-expr evaluation from python lib to Arbor lib. (#1157) · 3ba5f437
      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.
      3ba5f437
  6. Jul 23, 2020
  7. Jul 13, 2020
    • Benjamin Cumming's avatar
      flexible cable-based cable_cell representation (#1083) · 9dc8969c
      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.
      9dc8969c
  8. Feb 19, 2020
    • Benjamin Cumming's avatar
      ability to query cable_cell for cable segments that define a region (#961) · f12f934f
      Benjamin Cumming authored
      Add `cable_cell::concrete_region(region)` method that returns a the cable segments in a region.
      
      This is required by the Arbor GUI #953 so that it can illustrate regions (and locsets) defined by users on a concrete cell morphology.
      
      Note that the `concrete_region` and `concrete_locset` interfaces will need to be extended with random number seed information when we add full support for that, but shouldn't need to be replaced or changed otherwise.
      
      Fixes #960.
      f12f934f
  9. Feb 11, 2020
    • Benjamin Cumming's avatar
      enable locset names for probe sites in single cell model. (#955) · ec1f7520
      Benjamin Cumming authored
      Use locset names to set probe sites in single cell model.
      
      1. Extend C++ cable_cell interface to provide a concrete list of locations associated with a locset on the cell.
      2. Extend Python single_cell_model to allow placement of probes on locsets.
      3. Remove "debug" output in Python ring example.
      
      The single cell model maintains a trace callback for each probe location, and needs to know the explicit locations before starting the simulation. The first step is required to enumerate and record the locations associated with a locset when attaching probes.
      
      Open issues: 
      
      1. The extension to `cable_cell` won't sufficiently support locsets that rely on random number generators with global seeds (it would require passing additional meta data required to fully instantiate the locset)
      2. Enhancing the probe recipe interface to be able to associate one `probe_id` with all locations in a locset (the number of which is not specified at the time the `probe_id` is created) would support the interface implemented for the `single_cell_model`.
      
      Note: The richer interface on the C++ side will be implemented in time (see #957).
      ec1f7520
  10. Feb 04, 2020
    • Benjamin Cumming's avatar
      Python Interface (#948) · cfad427a
      Benjamin Cumming authored
      A big update that wraps over 90% of the public C++ API, with enough functionality to let Python users to perform useful modelling.
      
      Key features
      - wrapping of cable cell functionality
        - user-defined explicit compartmentalisation not supported
      - `single_cell_model` abstraction unique to the Python wrapper that simplifies developing and testing single cell models
      - one-dimensional cell builder for Python wrapper that simplfies building cells that 
        - in and of itself limited in scope, but a very useful example of mapping a richer morphology builder onto `sample_tree`s.
      - parsing of region and location expressions from strings
        - implements a generic s-expression parser that we can use for other purposes later
      cfad427a
  11. Sep 25, 2019
    • akuesters's avatar
      Python feature probes and samples (#872) · 8e985d40
      akuesters authored
      Adds
      
      * to `recipe.cpp`: 
      `num_probes` and `get_probe` with helper function `cable_probe(kind, id, location)`
      * `sample.cpp`: 
      `sample` type with attributes `time` and `value`; a `sampler` with `samples()` and `clear()` and helper functions `attach_sampler(sim, dt)` for adding all probes as well as `attach_sampler(sim, dt, probe_id)` for adding one probe
      * `morphology.cpp`: 
      `location` as `arb::mlocation` with `branch` and `position` 
      * corresponding docs and example
      * update to new cable cell semantics in c++ validation test
      
      fixes #762
      8e985d40
  12. Aug 16, 2019
    • akuesters's avatar
      Python wrapper: add hint_map to domain decomposition (#827) · 953d5007
      akuesters authored and Benjamin Cumming's avatar Benjamin Cumming committed
      - wraps `partition_hint` struct for python
      - `partition_hint`struct in `load_balance.hpp` is adjusted in a way that in case of zero unsigned int `cpu_group_size`/`gpu_group_size` it is set to the default value (via setter/getter)
      - adds documentation for `partition_hint`  
      - adds testing for `domain_decomposition` including `partition_hint` (in unit and unit_distributed)
      - adds `partition_hint` in example `ring.py`
      - corrects `config.cpp` (and doc) to test for `ARB_GPU_ENABLED` instead of `ARB_WITH_GPU`
      
      Fixes #776 
      Addresses #799, #769
      953d5007
  13. Jul 03, 2019
    • akuesters's avatar
      Python wrapper: profiler (#796) · 92620aa3
      akuesters authored and Benjamin Cumming's avatar Benjamin Cumming committed
      Wraps the `meter_manager` with
      - the constructor
      - `start(ctx)`
      - `checkpoint(name, ctx)`
      - `checkpoint_names`
      - `times`
      
      and the `meter_report` with
      - `make_meter_report(meter_manager, ctx)`
      
      Fixes #765
      92620aa3
  14. Jul 02, 2019
    • akuesters's avatar
      Python wrapper: documentation (#799) · 1f4eacd2
      akuesters authored and Benjamin Cumming's avatar Benjamin Cumming committed
      Add docs for Python wrapper to ReadTheDocs:
      
      - Overview, Common Types, Hardware Management, Recipes, Domain Decomposition, Simulations, Metering
      - Installing Arbor: Optional Requirements (Python), Buidling and Installing (Python Frontend), and Installation (Python Module)
      
      Missing (, since not implemented yet): 
      
      - probes
      - arbor-sup 
      - hint maps in domain_decomposition
      - reset, events, empty schedule in event_generator
      Also does not cover unit testing (since doc is user-centric).
      
      Makes also defaults and units in wrapper consistent.
      
      Fixes  #766
      1f4eacd2
  15. Jun 24, 2019
    • Benjamin Cumming's avatar
      Python spikes (#788) · 726328c4
      Benjamin Cumming authored
      Support for recording spikes generated by a simulation in the Python wrapper
      * Implement a `spike_recorder` that holds a shared pointer to a `std::vector` of spikes, and a callback for the `arb::simulation` spike recording API.
      * Add `python/example/ring.py` that creates a ring network, then records and prints spikes.
      * Some fixes to get the full `recipe` -> `domain_decomposition` -> `simulation` -> `spikes` workflow to work
        * always use default `global_parameters`: user customization of global parameters for cable cells can wait until the ion species interface is finished.
        * change the Python recipe interface for `recipe::connections_on` to use `pybind11::objects` because of shim.
      * Some small improvements to error and help messages.
      
      Fixes #764 
      726328c4