Code Monkey home page Code Monkey logo

Comments (6)

slarson avatar slarson commented on August 11, 2024

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.

a-palyanov avatar a-palyanov commented on August 11, 2024

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.

lungd avatar lungd commented on August 11, 2024

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.

lungd avatar lungd commented on August 11, 2024

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.

lungd avatar lungd commented on August 11, 2024

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.

ido4848 avatar ido4848 commented on August 11, 2024

What's the status of this?

from sibernetic.

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.