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

Steps towards integration of touch sensation #144

Open
1 of 6 tasks
pgleeson opened this issue May 8, 2018 · 6 comments
Open
1 of 6 tasks

Steps towards integration of touch sensation #144

pgleeson opened this issue May 8, 2018 · 6 comments
Assignees

Comments

@pgleeson
Copy link
Member

pgleeson commented May 8, 2018

  • Incorporate recording of pressure in worm body
  • (Sibernetic) Transform this information to signal for 10 sections of body (head, 8 in midbody (2 on each of: left/dorsal; left/ventral; right/dorsal; right/ventral), tail) to signal when pressure of any point in there has passed a threshold signalling a 'touch' on that section. This information is saved to a separate file (sectiontouch.txt).
  • Create configuration with static obstacle (3d block) in front of worm which will cause spike in pressure in location on head when worm bumps into it after a short period of time (e.g. based on this config)
  • Make python class to manage interface between sibernetic generated info and inputs for specific neurons, e.g. SensoryManager.py (also relevant for Steps towards proprioceptive feedback #141). This will run in real time when sibernetic is executed.
  • Allow this class to save traces for individual inputs to give to cells (e.g. ADAL.dat) & generate plot of this at end of sibernetic_c302.py run.
  • Work out how to feed output of this into c302 generated Neuron simulation in real time so neurons change behaviour based on environmental input (also related to Steps towards proprioceptive feedback #141)...
@slarson
Copy link
Member

slarson commented Sep 14, 2018

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?

@a-palyanov
Copy link
Member

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

@lungd
Copy link
Contributor

lungd commented Feb 1, 2019

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 (Pressure buffer file issue #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!

@lungd
Copy link
Contributor

lungd commented Feb 7, 2019

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.

@lungd
Copy link
Contributor

lungd commented Feb 8, 2019

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)?

@ido4848
Copy link

ido4848 commented May 18, 2021

What's the status of this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants