Week 3 report (June 10 to June 16)

Sections Summary
Minutes of Meeting
(Meeting date:
10 June,2020)
- Adding export device for standard representation

- Dealing with NeuronGroup
and its types (PoissonGroup and SpikegeneratorGroup)
Tasks - Implement collectors for NeuronGroup and its types
- Add device to export standard representation
Work done - Implemented collectors for NeuronGroup and its types
(PoissonGroup and SpikegeneratorGroup)
- Implemented export device to generate the standard representation
- Connect with collectors using device
Problems or doubts
faced
- Dealing with representing identifiers from each BrianObjects
- Dealing with multiple BrianObjects like multiple neurongroups (currently put in list)
- Dimension vs units usage
Issue associated brian-team/brian2tools/issues/25
brian-team/brian2tools/issues/29
Pull Request
associated
brian-team/brian2tools/pull/30

After some significant commits, I created my first Pull Request and the output looked really cool. I also created test cases to validate the work and check the integrity when new changes are made. The PR brought a structure for the package and gave a rough idea on, how the final package would look in brian2tools library. The new structure looked like,

    - brian2tools
        - baseexport
            - __init__.py
            - collector.py
        - tests
            - test_baseexport.py

The PR closed issue #25 and issue #29

Sample usecase example after merge:

eqs = ''' dv/dt = (v_rest - v) / tau :volt '''
v_rest = -70 * mV
v_th = 0.8 * volt
tau = 10 * ms
grp = NeuronGroup(1, eqs, threshold = 'v > v_th',
                  reset = 'v = v_rest', refractory = 2 * ms,
                  method = 'euler')
neuron_dict = collect_NeuronGroup(grp)
{
    "name": "neurongroup",
    "N": 1,
    "method": "euler",
    "equations": {
        "v": {
            "expr": "(v_rest - v) / tau",
            "unit": "V",
            "type": "differential equation",
            "dtype": "float"
        }
    },
    "identifiers": {
        "tau": {
            "value": "10. ms",
            "unit": "s"
        },
        "v_rest": {
            "value": "-70. mV",
            "unit": "V"
        },
        "v_th": {
            "value": "0.8 V",
            "unit": "V"
        }
    },
    "events": {
        "spike": {
            "threshold": "v > v_th",
            "reset": "v = v_rest",
            "refractory": "2. ms"
        }
    },
    "clock": {
        "dt": "100. us",
        "name": "defaultclock"
    }
}

And that is the end of Week 3

Written on June 11, 2020