Code Monkey home page Code Monkey logo

Comments (6)

jajcayn avatar jajcayn commented on August 22, 2024 1

that would be possible. Now we are working on so-called Signal object for modelling results / or experimental data which supports all kinds of basic preprocessing (e.g. band-pass filtering) so creating band-specific FC would be a matter of one, two lines

from neurolib.

caglorithm avatar caglorithm commented on August 22, 2024

I think, firstly, it should offer great usability and hackability. The lib should encourage to go into the code and change it and even more define simple rules on how to create your own model. Define your models, set up a Circuit (I love that term btw) and run the simulation.

On top of that (based on my own research experience), I would love to have some exploration (of the model) and optimization (fit to empirical data or predefined features) abilities.

Analysis and plotting would be amazing features. However, when I usually use builtin analysis and plotting tools, I, pretty much every time, reach some kind of limit, and then I either have to go in the code or I just implement my own analysis and plotting. I often end up choosing the latter. I imagine every seasoned scientist to have their own way of doing analysis and plotting, so this might not be as critical as other parts of the lib (at least for now). That being said, I would have to have a simple Fourier analysis just a method away or similar.

Kittens - YES but parallelised please!

from neurolib.

ChristophMetzner avatar ChristophMetzner commented on August 22, 2024

Haven't had a chance to take a proper look, but some suggestions from the top of my hat:

  • more standard models (Wilson&Cowan, Jansen&Rit, Kuramoto oscillator)
  • Extend to modelling FC from MEG data
  • Add stimulation functionality (i.e. you specify tDCS or tACS stimulation parameters and under the hood this is automatically translated to model parameter changes for the specific model the user chose)

Regarding Nikola's suggestions, I think for the network algorithms, Mayanks implementation could relatively easily be integrated.

from neurolib.

jajcayn avatar jajcayn commented on August 22, 2024

Haven't had a chance to take a proper look, but some suggestions from the top of my hat:

  • more standard models (Wilson&Cowan, Jansen&Rit, Kuramoto oscillator)

this will definitely be included

  • Extend to modelling FC from MEG data

not sure how you mean, but you can extract SC and fiber lengths from MEG data (not with neurolib, there are other tools for that) and model using those... as for FC from raw data, that'd problematic, because usually, you want to do source reconstruction (LORETA, beamformer, etc) and adding these would be 1. an overkill, 2. reinventing a wheel since mne has wonderful support for MEG and lot of their examples are actually creating FC from MEG data (you have whole paper about that :) ).. using neurolib you can try to model FC and then match to mne estimates for MEG FC

  • Add stimulation functionality (i.e. you specify tDCS or tACS stimulation parameters and under the hood this is automatically translated to model parameter changes for the specific model the user chose)

this would be beautiful!

Regarding Nikola's suggestions, I think for the network algorithms, Mayanks implementation could relatively easily be integrated.

actually we were thinking of including networkx under the hood, so all graph-theoretical attributes could be computed with a breeze.. we'll see

from neurolib.

ChristophMetzner avatar ChristophMetzner commented on August 22, 2024

Haven't had a chance to take a proper look, but some suggestions from the top of my hat:

  • more standard models (Wilson&Cowan, Jansen&Rit, Kuramoto oscillator)

this will definitely be included

  • Extend to modelling FC from MEG data

not sure how you mean, but you can extract SC and fiber lengths from MEG data (not with neurolib, there are other tools for that) and model using those... as for FC from raw data, that'd problematic, because usually, you want to do source reconstruction (LORETA, beamformer, etc) and adding these would be 1. an overkill, 2. reinventing a wheel since mne has wonderful support for MEG and lot of their examples are actually creating FC from MEG data (you have whole [paper]
(https://www.frontiersin.org/articles/10.3389/fnins.2018.00586/full) about that :) ).. using neurolib you can try to model FC and then match to mne estimates for MEG FC

So what I meant is, that you need methods to process the 'raw' model output to an FC matrix. If you're interested in MEG FC you often want to look at specific frequency bands and it would be nice if neurolib would automatically give you the FC matrices for each frequency band.

  • Add stimulation functionality (i.e. you specify tDCS or tACS stimulation parameters and under the hood this is automatically translated to model parameter changes for the specific model the user chose)

this would be beautiful!

Regarding Nikola's suggestions, I think for the network algorithms, Mayanks implementation could relatively easily be integrated.

actually we were thinking of including networkx under the hood, so all graph-theoretical attributes could be computed with a breeze.. we'll see

Ok, that also makes sense.

from neurolib.

caglorithm avatar caglorithm commented on August 22, 2024
  • Add stimulation functionality (i.e. you specify tDCS or tACS stimulation parameters and under the hood this is automatically translated to model parameter changes for the specific model the user chose)

This is actually already possible! At least with the aln model, you can set the external input parameters for stimulation before each run and they will be integrated over time.

They are called

  • ext_exc_current / ext_inh_current for current input in nA, and
  • ext_exc_rate / ext_inh_rate from other spike rate sources in kHz.

I actually wanted to know how fast and easy I could implement this with neurolib! Let's see what happens if we ramp up a current from 0 to 0.1 nA:

from neurolib.models.aln import ALNModel
import matplotlib.pyplot as plt
import numpy as np
aln = ALNModel() # comes with default parameters
aln.run()
plt.plot(aln.t, aln.rates_exc.T, c='k', label='no stim', lw=3)
aln.params['ext_exc_current'] = np.linspace(0, 0.1, aln.params['duration']/aln.params['dt'])
aln.run()
plt.plot(aln.t, aln.rates_exc.T, c='r', alpha=0.5, label='ramp stim', lw=2)
plt.legend()

image

🤯

PS: I'm gonna add this to the examples!

from neurolib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.