Comments (6)
Hi @a-palyanov @skhayrulin -- now that the special issue is out; can we take a look at moving this forward? What do you guys think?
from sibernetic.
I'm not a specialist in Python, but I can do the tasks which require modification of Sibernetic.
By the way, here is a paper "Determining the biomechanics of touch sensation in C. elegans" (2017), which might be useful in the context of this issue:
https://www.researchgate.net/publication/320043028_Determining_the_biomechanics_of_touch_sensation_in_C_elegans
from sibernetic.
There is some progress on https://github.com/lungd/sibernetic/tree/touch_sensation
I unintentionally used the dev branch of my repo as base, instead of the dev branch of Sibernetic.
Have a look at https://github.com/lungd/sibernetic/compare/development...lungd:touch_sensation?expand=1, for commits related to touch sensation only.
Every time data gets written to the pressure file, there is a check whether the pressure to a particle, belonging to the body of the worm, has passed a HARDCODED threshold, set to 1.
Every particle of the worm is 'mapped' to the same HARDCODED section, set to the soma of AVM, which will receive input at the end.
If the pressure to one of the particles has passed the threshold, Sibernetic calls a method for creating an input to the given section, unless an input has already been created due to another particle.
At the end, there is a method 'addStimulus' which creates a new input to an existing section with HARDCODED amplitude, set to 0.2.
loadPressureToFile():
for p in shell_particles:
if p.pressure > threshold
if not received:
simulation.receivePressure(p.id, p.type, p.pressure)
received = True
simulation.receivePressure(id, type, pressure):
-> ... -> LEMS_FILE.addStimulus('a_AVM', p.pressure)
LEMS_FILE.addStimulus(self, sectionName, pressure):
section = loadSection(sectionName)
i = h.IClamp(section)
i.delay = current_time
i.dur = self.dt
i.amp = 0.2
TODOs and thoughts:
-
Fix list of particles (shell_particles):
ATM, the list of particles consists of all particles belonging to the body of the worm. It should contain particles located on the surface of the worm only (#160). -
Create a mapping from particle_ids to a section_names:
We want to divide the body of the worm into different sections (head, tail, ...).
To know which section the particle belongs to, we need to define a mapping from a particle-id to the name of the section.
The positions of the particles are defined inside the config file as well as the type of the particle.
I can imagine to add something to the type, to know which section it belongs to. -
Create a mapping from section_names to lists of (sensory) neurons:
We also need to define a mapping from the section to a list of 'connected' neurons, to know which neurons should receive input.
Could be a hardcoded dict first. ("head": ["AVM", ...], "tail": ["PLML", "PLMR", ...]) -
Set proper threshold
-
Translate pressure into current (amplitude):
ATM, the amplitude of the input is defined in ampere.
I am not sure how to translate pressure into current.
We probably need to implement and fit a proper model for sensory neurons first.
And we need to know the max possible pressure.
Depending on the neuronal model, we maybe need to create a new input class with pascal (or m - displacement) as unit - don't know if that is possible.
Any feedback is welcome!
from sibernetic.
I applied some more changes:
Because the worm is straightened at the beginning of the simulation, I divided the worm into segments, based on the worm's length/width/height.
I defined 5 sections: 3 body sections (each divided into 4 parts) + head + tail.
The generated section file after running master_openworm.py: sectiontouch.txt
I removed the invocations for creating input to AVM for now.
Next, I will create a hardcoded map (sectionName -> neuronList)
If anyone is interested (@slarson), I created a container including my forks (c302, sibernetic; 'touch_sensation' branch) https://github.com/lungd/OpenWorm/tree/touch_sensation.
I didn't create a PR for Sibernetic, because after creating new input for neurons, I will change c302_FW.py for testing purposes.
from sibernetic.
Is pressure alone sufficient for detecting touch?
I think we need to check surrounding particles as well, otherwise, we cannot distinguish between pressure coming from the environment, and pressure coming from a body bend?
What do you guys think (@skhayrulin @a-palyanov @pgleeson)?
from sibernetic.
What's the status of this?
from sibernetic.
Related Issues (20)
- Performance changes in latest development branch HOT 8
- Pressure file format issue HOT 2
- How to expand the liquid particles? HOT 2
- Document the way to access the body position on each step? HOT 1
- Double text in README HOT 4
- Rerun (-l_from) simulation inside openworm container HOT 4
- Pressure buffer file issue HOT 6
- Add more molecular in sibernetic?
- User-defined geometries and muscle models HOT 18
- Asking for simulation HOT 13
- Segmentation fault when pressing 1 or 2 to select demo simulation HOT 5
- Segmentation fault when running Sibernetic built on WSL2 HOT 11
- Header files explicitly links a path to Python.h
- Ubuntu 20.04: free(): double free detected in tchache 2 when replaying simulation HOT 1
- No such file or directory muscles_activity_buffer.txt HOT 1
- Exception: The provided 'key_property' entry does not appear to be a property HOT 4
- Use python-config script for Python libraries in makefile
- Resolve compiler warnings
- Add simulation video recording utility
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sibernetic.