Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add show functionality for synapses #403

Closed
alec-hoyland opened this issue Apr 25, 2019 · 9 comments
Closed

Add show functionality for synapses #403

alec-hoyland opened this issue Apr 25, 2019 · 9 comments

Comments

@alec-hoyland
Copy link
Collaborator

New feature proposal

Add functionality to show so that it works for synapses as well as conductances.

Implementation

Most synapse models have a s_inf function, which should be plotted the same way that m_inf is plotted. Time constants can vary -- some models don't have tau_s functions, but use a sum of exponentials with constant decay rates. Usually, these are called tau_r and tau_d.

At the very least, plotting the s_inf function over where the m_inf function should be doable, and then plotting the tau_s function (if any) over the tau_m plots.

Alternatively, there could be (yet another) method of xolotl that explicitly handles the synapse case.

@sg-s
Copy link
Owner

sg-s commented Apr 25, 2019

  • Does every synapse have a s_inf function?
  • What happens when a synapse doesn't implement a s_inf function?
  • What happens when a synapse implements something that basically is a s_inf function, but it is called something else?

@alec-hoyland
Copy link
Collaborator Author

I think this is doomed because I can't get the function handles when I construct a synapse as a standalone cpplab object.

@alec-hoyland
Copy link
Collaborator Author

>> C = cpplab('prinz/Cholinergic')

C = 

 Cholinergic object (dcc022a) with:

          gmax : 0
             s : 0

>> {C.cpp_child_functions.fun_name}

ans =

  1×10 cell array

    {0×0 double}    {'getFullStateSize'}    {'s_inf'}    {'tau_s'}    {'sdot'}    {'integrate'}    {'integrateMS'}    {'checkSolvers'}    {'getFullState'}    {'connect'}

>> C.cpp_child_functions(3)

ans = 

  struct with fields:

           fun_name: 's_inf'
         fun_handle: []
    fun_return_type: 'double'
     fun_input_type: {'double'}
    fun_input_names: {'V_pre'}

>> C = cpplab('liu/NaV')

C = 

 NaV object (54891d4) with:

             m : 0
             h : 1
          gbar : NaN
             E : 30
>> C.cpp_child_functions(3)

ans = 

  struct with fields:

           fun_name: 'm_inf'
         fun_handle: @(V,Ca)1.0/(1.0+exp((V+25.5)/-5.29))
    fun_return_type: 'double'
     fun_input_type: {'double'  'double'}
    fun_input_names: {'V'  'Ca'}

>> 

@alec-hoyland
Copy link
Collaborator Author

* Does every synapse have a `s_inf` function?

Currently, yes. That's not something that has to happen though.

* What happens when a synapse doesn't implement a `s_inf` function?

Then it doesn't get plotted. Currently show reads from getGatingFunctions, which returns a function mapping to NaN if it can't find a matching function.

* What happens when a synapse implements something that basically is a `s_inf` function, but it is called something else?

Then it doesn't find it, and nothing is plotted. If I named my function s_variable_steady_state then the strcmp() function in getGatingFunctions would return false, and the function s_inf = @(V) NaN is returned instead.

@sg-s
Copy link
Owner

sg-s commented Apr 25, 2019

fair enough. not getting the function handles from synapses is a bug in cpplab. See also: this bug in cpplab

@sg-s
Copy link
Owner

sg-s commented Apr 26, 2019

OK, the function handles are now populated. But it's pretty useless because the parameters are not set. (e.g. Vth)

@sg-s
Copy link
Owner

sg-s commented Apr 26, 2019

this is very complicated to implement.

@github-actions
Copy link

Stale issue message

@sg-s
Copy link
Owner

sg-s commented Aug 14, 2019

wontfix

@sg-s sg-s closed this as completed Aug 14, 2019
@sg-s sg-s added the wontfix label Aug 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants