BhallaLab / moose

MOOSE simulator.
http://moose.ncbs.res.in
GNU General Public License v3.0
25 stars 19 forks source link

rdesigneur documentation example errors #268

Closed ishanseth18 closed 3 years ago

ishanseth18 commented 3 years ago

most recent documentation at https://moose.ncbs.res.in/readthedocs/user/py/rdesigneur/rdes.html#bare-rdesigneur-single-passive-compartment does not support example methods for redesigneur.

Through some of my own changes to the code given I was able to get expected results up to ex2.0_currentPulse.py, however past that point I am not able to get the results that are shown in the documentation. This is because fields "vclamp" and "current" are coming up as unknown.

Below is the code I am having trouble with.

import moose import rdesigneur as rd rdes = rd.rdesigneur( stimList = [['soma', '1', '.', 'vclamp', '-0.065 + (t>0.1 && t<0.2) * 0.02' ]], plotList = [ ['soma', '1', '.', 'Vm', 'Soma membrane potential'], ['soma', '1', 'vclamp', 'current', 'Soma holding current'], ] ) rdes.buildModel() moose.reinit() moose.start( 0.3 ) rdes.display()

hrani commented 3 years ago

Hi, Since I am cleanup the documentation I was going through all the examples, with the latest build (I build from source) I am able to run the examples from rdesigneur and I am able to run ex2.0_currentPulse.py and also code which you have sent below is running without complaining of vclamp or current but result shown in the document are rising up to 1000nA and now its rising to 600nA and also example ex3.1_squid_vclamp.py the result are different, I am going through it and get back to you we have changed few base code need to see if that is affecting us. but could you let us know how did you install moose and which version of moose, based on that we can go through it why its complaining of vclamp.

Best HarshaRani

On Sat, Oct 10, 2020 at 12:19 AM ishanseth18 notifications@github.com wrote:

most recent documentation at https://moose.ncbs.res.in/readthedocs/user/py/rdesigneur/rdes.html#bare-rdesigneur-single-passive-compartment does not support example methods for redesigneur.

Through some of my own changes to the code given I was able to get expected results up to ex2.0_currentPulse.py, however past that point I am not able to get the results that are shown in the documentation. This is because fields "vclamp" and "current" are coming up as unknown.

Below is the code I am having trouble with.

import moose import rdesigneur as rd rdes = rd.rdesigneur( stimList = [['soma', '1', '.', 'vclamp', '-0.065 + (t>0.1 && t<0.2) * 0.02' ]], plotList = [ ['soma', '1', '.', 'Vm', 'Soma membrane potential'], ['soma', '1', 'vclamp', 'current', 'Soma holding current'], ] ) rdes.buildModel() moose.reinit() moose.start( 0.3 ) rdes.display()

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/BhallaLab/moose/issues/268, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYWDQ4LP2NNBPM4HP5ZA6LSJ5LKRANCNFSM4SKNJOUA .

ishanseth18 commented 3 years ago

I believe I downloaded moose via the pip install listed on the website. The pymoose version I have installed is 3.1.5. I do not know how to check my moose version, if pymoose and moose versions are separate. Sorry I am a little new to python and programming in general. Any help would be greatly appreciated.

Thank you.

dilawar commented 3 years ago

Try upgrading it to nightly release

$ pip3 install pymoose --upgrade

Run the example again.

To check version, copy paste following in the terminal.

$ python3 -c 'import moose; print(moose.version)'

⁣Sent from a handheld device, please pardon my brevity and tpyos.

Get BlueMail for Android ​

On Oct 10, 2020, 02:03, at 02:03, ishanseth18 notifications@github.com wrote:

I believe I downloaded moose via the pip install listed on the website. The pymoose version I have installed is 3.1.5. I do not know how to check my moose version, if pymoose and moose versions are separate. Sorry I am a little new to python and programming in general. Any help would be greatly appreciated.

Thank you.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/BhallaLab/moose/issues/268#issuecomment-706389960

dilawar commented 3 years ago

@ishanseth18 Made a mistake in instructions above. Correct one are below:

To upgrade to a nightly version

$ pip3 install pymoose --pre --upgrade    # note the --pre flag
ishanseth18 commented 3 years ago

Hi, I have just updated per your instructions but the output is still the same and both vclamp and current are still not being recognized. I will attempt deleting and re installing moose to see if that fixes the issue. The most current version is available on this github and not the website, correct?

dilawar commented 3 years ago

For me, following instructions worked. Instead of pip, I am using the python3 -m pip to make sure that pip is used with the correct version of python (I know its a mess with python these days).

$ python3 -m pip uninstall pymoose    # remove old
# Clean up your PYTHONPATH if you have set one
$ python3 -m pip install pymoose --user --pre --upgrade 

Now lets see what is where

$ python3 -c "import moose; print(moose.__version__); print(moose.__file__)"
3.2.1.dev20200602
/home/dilawars/Scripts/pyenv/versions/3.8.6/lib/python3.8/site-packages/moose/__init__.py

Note that I am using something called virtualenv.

ishanseth18 commented 3 years ago

Sorry for the late reply!

Your suggestion worked perfectly! I am no longer getting any errors with the code I have tried so far. I did have one discrepancy between the expected results from the example code and the results I got, but other than that everything is perfect. Thank you so much for your help.

hrani commented 3 years ago

Thank you for your email, yes there is discrepancies in the result of what is excepted to what we are getting from the examples. Their are changes in the moose-core which is causing this but we have identified those and are working on it. Soon will update the files and documents too. HarshaRani On Sat, 24 Oct 2020 at 1:33 AM, ishanseth18 notifications@github.com wrote:

Sorry for the late reply!

Your suggestion worked perfectly! I am no longer getting any errors with the code I have tried so far. I did have one discrepancy between the expected results from the example code and the results I got, but other than that everything is perfect. Thank you so much for your help.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/BhallaLab/moose/issues/268#issuecomment-715564337, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYWDQYIBFHJJ5QJJKAJXCLSMHOSNANCNFSM4SKNJOUA .

dilawar commented 3 years ago

If results are 'very' different then open an issue. Small difference are caused by changes in expression parser and ode solvers. The error should not be more than a few percent MSE.

⁣Sent from a handheld device, please pardon my brevity and tpyos.

Get BlueMail for Android ​

On Oct 24, 2020, 01:33, at 01:33, ishanseth18 notifications@github.com wrote:

Sorry for the late reply!

Your suggestion worked perfectly! I am no longer getting any errors with the code I have tried so far. I did have one discrepancy between the expected results from the example code and the results I got, but other than that everything is perfect. Thank you so much for your help.

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/BhallaLab/moose/issues/268#issuecomment-715564337

ishanseth18 commented 3 years ago

Thank You so much.

No, the results are not very different at all. The shape of the graph I received was similar to that on the website, except that the actual values were somewhat different.

Specifically, this occurred with ex3.1_squid_vclamp.py. It has not caused an issue since, besides the small discrepancy.

hrani commented 3 years ago

Thank you for your email, I have updated the doc recently in moose.ncbs.res.in. Their might be some small difference that is because moose-core has updated for the betterment. Ex3.1_squid_vclamp result from the script is correct, as compared to doc in the website.

On Sat, 31 Oct 2020 at 2:03 AM, ishanseth18 notifications@github.com wrote:

Thank You so much.

No, the results are not very different at all. The shape of the graph I received was similar to that on the website, except that the actual values were somewhat different.

Specifically, this occurred with ex3.1_squid_vclamp.py. It has not caused an issue since, besides the small discrepancy.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/BhallaLab/moose/issues/268#issuecomment-719783458, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYWDQYTEBPITO3ZFFUHWNDSNMPI5ANCNFSM4SKNJOUA .

ishanseth18 commented 3 years ago

Sounds Good!

I also have a quick question, though I'm not sure if I should put in in this issue. I am trying to learn how to make a model neuron with both axons and dendrites, however when I try to use cellProto to incorporate both, it seems that the model that is made is only showing either or, but not both.

cellProto = [['ballAndStick', 'soma', 20e-6, 20e-6, 4e-6, 500e-6, 10], ['elec','axon'] ],

The above is the code I am using to try to incorporate both the axon model used previously in the examples and the dendrite model. If I leave both 'elec' and 'ballAndStick', then the model shown to me only shows the spiral axons from the previous examples, but does not show to any of the dendrites.

How can I incorporate both dendrites and axons in a single model?