02/19/2020 at 21:06 •
from there move to R/python, arduinos and version control
@Dan Maloney OK!
@Andre Maia Chagas yes; we cover rpy2, oct2py, Arduinos, and Git
@Mark Laubach do you have material available to share? it would be good to have a starting point, and a place to contribute with things we develop
@Lex Kravitz i am recently pretty deeply involved with 3d printing by SLA, from liquid resins. not only you get high precision, but also you can easily add things to the resins to modify their properties. i saw some tests with crystal violet in latex paints to make them self-disinfecting at light, and it dissolves well in acrylate resins too; no resources here to test the self-sterilization though.
@Lex Kravitz 20 micrometer thin layers are easy to achieve.
@Andre Maia Chagas sort of... the course has changed over the years and its been a goal to get the content out; challenge is I am on sabbatical next year, so maybe I will finally find time to get that together and shared; I am open to sharing messy stuff any time though :-)
So that was a super-fast hour, and we'll have to let Mark and Lex get back to work. Feel free to continue the discussion, though - this was really fascinating stuff. I really want to thank both Lex and Mark for the time and the great discussion.
@Dan Maloney and everyone: Thank so much! This was a blast.
@Thomas Shaddack That's awesome! We have an SLA printer but I'm afraid to mess with it too much because it was expensive and I don't want to void the warranty - the resins all come with RFID tags to stop us from playing with other resins... basically the opposite of open source. I want to get another one for playing around with
@Mark Laubach cool, thanks! I'll shoot you a message later about this...
I've been sharing things a bit "aggressively" on github.com/sussex-neuroscience
It was drinking from a firehose! Thanks!
I'll put some stuff for the bootcamp there too
@Andre Maia Chagas lets stay in touch about this
@Dan Maloney Thanks for inviting us!! This was a blast - I have to get back to work but anyone please feel free to reach out via messaging on here if you have other questions!
And don't forget that a transcript is forthcoming. I'll post the link here when it's done.
@Lex Kravitz my level of involvement is mixing the resins from precursors. working with the cheapest kind of printer, the anycubic photon class.
@Dan Maloney Thanks!
02/19/2020 at 21:05 •
what about electromyography? could it be more useful for some uses than the notoriously fickle eeg?
@Thomas here is an example paper where OSH does better than commercial tools https://www.nature.com/articles/s41598-017-02301-2
@Thomas reproducible results have started to come out of some shared projects, especially ones like DeepLabCut and the Open Miniscope. Many labs are using.
I'm thinking openbci could augment this work.
...random thought for communication. eyeblink sensing, one for each eye. left-eye blink is dash, right-eye dot, both is end of symbol or ignored.
could be a faster alternative to gaze-controlled keyboards.
Hi guys, I'm Leonardo Gomes from Brazil and, only to give an example of BCI application, I'm working with EEG for controlling sex toys and helping people with disabilities
https://www.mdpi.com/2218-6581/7/3/46 in this first version I used an Emotiv EPOC, but now I'm developing my own BCI based on the OPENBCI project.
Simply tracking an animals behavior is only one part of the problem. It's like tracking the movement of a steering wheel of a car without knowing if the car is traveling down a road under the control of a driver, or is it a 3 year old child playing with the wheel as it is parked in the garage? Context is everything. Measuring the EEG of a rat in a box is not that hard. However that alone is not useful. Tracking movement AND the EEG, now that is something valuable.
There is a contract mechanism for NSF where they are asking for people to come up with sensor to monitor ANY indication of the state of the patient. Any data stream is possibly and indicator. They do not classify "behavior" but treat it as sensor fusion and looking for patterns.
thought. can optogenetics be leveraged? something that can be injected to the neurons and make them sensitive to light, or emit light? could work around the issue with electrode stability.
@Mark Laubach I agree. Peer review like approaches also work for lab equipment
@Thomas Shaddack For many situations it may be! The important thing is to measure a good signal, which is where EEG is challenging, to record it well requires a controlled environment, gel electrode contacts, etc. So if EKG can give you what you want then it can definitely be better. And yes, EMG of eyeblink sensing is great! I remember an EEG headband device that incorporated that as well, imo that part probably worked much better than the EEG sensing.
@Leonardo Gomes Welcome Leonardo!
are there major differences between emg and eeg amplifiers/electrodes?
OpenAI.com to process the raw signals. They seem to be commercial, but they do share their tools on GitHubYou can probably use the methods at
. o O ( Python evaluating the behavior of mice... )
Just use a kalman filter it should do the job
@Chuck Glasser Great way to cue-up my next project I wanted to highlight! https://bonsai-rx.org/ Bonsai is an open-source visual programming language made by Goncalo Lopes - it's a bit of a steep learning curve but it allows you to pretty easily capture data from a webcam, perform processing steps (like identifying a mouse in the image and tracking her position), and also record ongoing electrical activity like EEG signals. All open-source and they have a great user forum for help.
@Thomas Shaddack Are you talking about the reptile or the programming language?
Hackaday.IO more thirty five years ago. I am partial to noncontact method like MagnetoEncephalogram, and looked deep into SQUID and other magnetometer methods. Hard working alone.I tracked this sort of thing since high school and later in more detail because my brother broke his neck and was quadraplegic before he died. Wish there had been a
Screenshot of Bonsai:
@Lex Kravitz both, that's the pun. :P
Very interesting this bonsai!
https://open-ephys.org/. The provide open systems for recording brain activity using electrodes or calcium imaging (miniscopes) and other tools for behavioral studies such as pyControl. Preassembled items can be purchased for low cost or you can download the designs and parts lists yourself and make stuff on your own.Another great resource for tools is
@Leonardo Gomes I love Bonsai - our lab uses it for many things :) It can also interface with Arduino really easily for controlling hardware.
random thought. some sort of nanoparticle that could be embedded in the neuron membrane and mediate the signal. nanoelectronics that could emit an electromagnetic signature a nearby receiver can catch. something small enough with polar sides and nonpolar ring, mimicking the transmembrane protein structure.
@Lex Kravitz this may be very useful for my projects!
can the calcium imaging trick be used in vivo?
@Thomas Shaddack YES!
The miniature fluorescence microscope described here is based on a design pioneered by Mark Schnitzer's Lab at Stanford and published in a paper in Nature Methods in 2011. It uses wide-field fluorescence imaging to record neural activity in awake, freely moving mice.
@Thomas Shaddack it can! A group at UCLA made a miniature microscope that can ride on the head of a mouse and image calcium activity in the brain:
Magnetic Resonance Imaging Microscopy is a rich area
This video shows a mouse running down a 25 foot long track, along with the calcium activity of ~500 neurons being recorded from an area of the brain called the hippocampus
@Mark Laubach oohhhh! could this be done with motor neurons? possibly even without optics, leveraging the minuscule size of sensor pixels (0.8 to 2.5 micron side squares)?
...raman microscopy? chemical imaging?
What's the signal? IOW, how is calcium flux being measured?
Neuralink Corporation is an American neurotechnology company founded by Elon Musk and others, developing implantable brain-machine interfaces (BMIs).
@Thomas Shaddack My lab does not use the miniscope, but it works well in the cortex, and does single photon imaging
GCaMP is a genetically encoded calcium indicator, or GECI initially developed by Junichi Nakai. GCaMP is created from a fusion of green fluorescent protein (GFP), calmodulin, and M13, a peptide sequence from myosin light chain kinase.
Cool. Not toxic to the mice I guess?
for high sensitivity single-pixel sensing, i saw some pretty nice SiPM, silicon photomultipliers. 1x1mm or 3x3mm chips, often paired with scintillator crystals for gamma sensing but could work with fluorescence or other light emission too.
just add 30volt bias and you have pulses going out.
@Dan Maloney delivered by viral methods used for many neuro applications
They've been really generous about sharing these sensors with the scientific community which has enabled many labs (including ours!) to do this type of recording
Janelia has been awesome to the community
Ca++ indicators should be great for glia research
@Thomas yes and there are viruses that selectively target glia
Oh, OK - it's not a tracer but a transgenic mouse whose brain lights up when neurons fire.
transgenic or virally delivered
Did I really just write that sentence?
@Mark Laubach Do you collaborate with the Psych folks at AU?
@Thomas Shaddack I found a group that was attaching molecules to a nano structure. They could tell by the change in conductance the forces on the attached molecule. Using molecular modeling they followed the binding and chemical events. Definitely possible. It all uses the same signal amplifiers, ADCs, data storage, high speed local signal characterization and monitoring, shared datastreams, open communities working out algorithms and interpretations. Global communities working together.
I read the photometry paper. quite interesting.
@Dan Maloney Yes you did, and isn't all of this so freaking amazing!
@DrG I am in that building at AU
no one could have imagined this stuff 100 years ago
@Dan Maloney Shhhhhhhh! Don't ask about toxicity!!! :) Honestly this is a big concern - virally expressing any foreign protein carries the risk of toxicity or immune responses. The short answer is to do experimental controls for toxicity, the longer answer is about deciding what controls are best for the specific experiment, testing how much toxicity is too much toxicity...
love this when teaching
can these tricks be used on transgenic organoids?
@Mark Laubach does attempting to discuss consciousness still self-assign one the title of "whack job" in the neuro community? asking after having watched Jeff Hawkins talk about this about a decade ago.
@Thomas Shaddack honesty, I don't know
... o O ( diybio with gene hacking and at-home growing of miniature brains, now that'd be sexy hacking! )
@mumi It might depend on what you mean by consciousness. I am involved in a project with an epilepsy group that takes the issue really seriously. They mean being conscious.
interesting. would be cool to read up on their meaning.
The group is headed by Dr Hal Blumenfeld at Yale, and is about finding a way to stop frontal seizures.
Bye for now, wish I could stick around.
@Mark Laubach do you know where this research led? https://www.newscientist.com/article/mg22329762-700-consciousness-on-off-switch-discovered-deep-in-brain/
@Charlie Lindahl - I'll post a full transcript after the chat so you can catch up on what you missed
@mrdale1958 Sorry but I don't. I will dig into it after we are done
https://backyardbrains.com/ They make amplifiers that are pretty cheap and very capable - they also have great documentation and projects.Another resource for diy bio and neuroscience is backyard brains
@Charlie Lindahl Thanks for stopping in!
Backyard Brains is awesome for teaching. I use it for an undergrad class. Students build a rig for measuring reaction times, using Arduinos and simple components. This past fall, we incorporated low cost EMG amps from BB into the project. And then we analyze data in Jupyter notebooks and Python.
what's the cost per channel? how many channels are required?
@Mark Laubach do they have previous experience with python and Jupyter notebooks?
We are thinking about having a "digital bootcamp" for grad students that are starting, and out here they start with very little programming experience
the amps are under $300
we teach them the basics of hacking and how to use jupyter and python
the bootcamp must start with how to install programs
@Thomas I think this would depend on the application and how many channels of data you want. I bought a few of the backyard brains shields for doing electrical recordings from plants (another Hackchat topic??) They cost me between $100 and $200 per channel depending on which one you buy,
sadly, this basic skills seems to have been lost due to smart phones and Macs
intriguing, that wasn't with venus fly traps was it per chance?
@Lex Kravitz thanks!
@Lex Kravitz - Yes, definitely a Hack Chat topic. I'll email you on that
yes, we are really thinking about starting from zero and also basic tools for privacy/safety online like password managers, good data backup practices
yep.... those skills are crucial, and no one teaches them
What is the discussion?
Lex Kravitz and Mark Laubach will host the Hack Chat on Wednesday, February 19, 2020 at noon Pacific Time. Time zones got you down? Here's a handy time converter! Unless, of course, you look inward to the most wonderfully complex structure ever found: the brain.
Open source tools and neuroscience, and the OpenBehavior project
Can everyone introduce themselves please
Openbehavior.org, in 2016, to further open-source methods in behavioral research. In the intervening years, it seems that many people in the scientific community have started using and publishing open-source methods, so we’re here to share a few interesting projects with this community, and also answer any questions about neuroscience, research, life, etc!Sure, are we good to get started? I'll kick off with a bit of an intro: My name is Lex Kravitz and I am a professor in the Psychiatry department at Washington University in St Louis. With our co-host, Mark Laubach, we started a website,
Im A Essa (discontinued Phd in AI) and software engineering bsc
I'm Mark Laubach. I am a neurobiologist, with lab at American University in DC. We study how decisions are made in the brain, and use a lot of custom made tech in our research.
Yes, please, let's start. And welcome Mark and Lex!
Thanks! I thought we'd start by sharing our website and highlight some of the more interesting projects that we've covered on it
Camera Control is an open-source software package written by postdoctoral fellow Gary Kane that allows video to be recorded in sync with behavior. The python GUI and scripts allows investigators to record from multiple imaging source camera feeds with associated timestamps for each frame.
openbehavior.org, with the goal of promoting open-source methods in neuroscience. It's something Mark and I do for fun, along with the students in his lab, mainly Sam White and Linda Amarante. Maybe we can start with some youtube videos to demo some cool recent advances in open source neuroscience?We made a website,
One of my favorite open-source tools (that has been hugely influential in behavioral neuroscience over the last year) is DeepLabCut:
This is a markerless pose-tracking package, that has been used to improve video tracking of mice, flies, and *many* other laboratory applications
That's pretty cool
Wow, that's exactly what I tried to design in my old job 20+ years ago! We wanted to track where a rat was pointing his nose. Machine vision just wasn't up to the task at the time
@Dan Maloney That was my Master's project in 1990! Did not work so well.
Cool! yeah most methods before this used "markers" - a piece of tape or something like that
Perhaps you can define the difference between random movement, purposeful movement and a behavior?
how did you solve that? training etc?
Intro for me (Charlie L aka CyberchuckTX)
: lifelong geek/nerd/programmer interested in these topics.
openbehavior.org" times out when I try to access it ...BTW, "
http://www.mousemotorlab.org/team) put a lot of effort into making this tool accessible - notebooks, demos, etc. As a result they are one of the best known solutions for this and have gained a large user base - open source at work :)Beyond being an amazing application, the team that made this (
Chuck that sounds like a philosophy hackchat :)
All this is all good, but what are you trying to achieve with all of this?
I'll bite though - no behavior is random, and all behavior is "behavior". Even blinking or breathing. With animals it's very hard to ascribe purpose, so I tend to try to just quantify the behavior and leave it at that - was there more running, less running, more pellet eating, etc.
so happy to see open source tools for neuroscience being highlighted here!
intro: I work at the university of Sussex and have been advocating for the use of open source tools for neurosciences for almost a decade now (almost as long as Iṽe been in neurosciences :P )
Hi there! Thanks Lex and Mark for sharing your time with us. I've been checking out your projects, and find your field of work incredibly interesting. I was wondering... How different is electronic equipment used to analyze the spikes of different electrode interfaces? (EEG vs ECG vs EMG... be it through implants, skin contact...) Do they all use similar combinations of amplifiers+filters+DAC, and differ only at the physical connection with the body? Or do they require different designs/methodologies for data adquisition and processing?
Hi Andre!!! Yes I know your work thanks for stopping in!!!
@Essaamar and others: Maybe this will help...
As a consequence of making tools and running OpenBehavior, we also wrote an article about open source tools and the need to make it easy to publish them and track their use. Check it out:
here is some work some communities are doing tthat is related to neuro/openhardware
Open source hardware project from the department of Neurosciences at Sussex University
@Lex Kravitz Thanks! also thanks for putting together open behavior!
@Mark Laubach ! Thanks to you too for putting these things out there :)hi
Let's just say that I have a goat that I want to motivate to eat this and not that.
@Andre Maia Chagas. Special thanks is also due to Samantha White and Linda Amarante, who have written most of the posts and posted the Tweets.Thanks
@Juan Carlos Jimenez The electrical interface can be very different on different tissues, so the electrodes themselves are very specialized - the wires we use for recording single neurons are much smaller and higher impedance than leads for recording EEG for instance. Often the amplifiers are also specialized to get the best signal:noise from the specific application. As one concrete example, recording single neurons requires sampling rates of ~40kHz, while for recording brain waves via EEG it can be <1kHz. But after the data is stored on a computer it's a lot of the same approaches you might use to analyze any electrical signal - filtering, identifying waveforms, looking at the frequency or amplitude of different events
Do you guys get a lot of projects on open behavior that is not from people in universities?
@Andre Maia Chagas almost none actually... I think it would be a huge benefit to find ways to build bridges between academic scientists and non-academic scientists or citizen scientists
ok, I wish we could come up with a way to make this academic barrier smaller/non-existent. There is so much knowledge in non-academic communities, I think everyone ends up losing by not having closer collaborations.
I'm hoping to be able to do some DIY work for a dear friend of mine who recently had a terrible accident that rendered him (mostly) paraplegic. He's an engineer by trade so he's vitally interested in anything that could help him interface to the outside world.
For us, the challenge is to get researchers to live by this principle: Don't let tools drive your research questions. Make your own tools to solve the problems that you are interested in. This applies to research labs as well as teaching and many other endeavors.
@Charlie Lindahl I'm really sorry to hear that
@Charlie Lindahl sorry to hear that... Don't know if it was already mentioned, but look into openbci and openbionics ()
@Charlie Lindahl Sorry also. There is a field called Brain-Computer Interfaces that is intended to address those kinds of issues. Unfortunately, most of it is not open source.
@Andre Maia Chagas is spot on with those projects.And
I left research on what was called BMIs at the time due to closed thinking in the early research community. Closed and competitive.
Brain Machine Interface
Brain machine interface?
Yes some scientist has already hacked the brain
Closed and competitive? What does that mean?
idea was to hook up neurons to control devices
@Mark Laubach do I guess correcty that most of the magic is in the signal evaluation, while the collection of signals for control of the mechatronics is rather routine?
no sharing of results, methods, code; venture firms offering lunch
@Thomas Shaddack Signal processing and algorithms for decoding and control were/are not so easy given noisy neurons; biggest problem then, and maybe still now, was keeping electrodes viable long term
Brain machine interface sounds a bit over the top if you have the nervus vagus
@Thomas Yes. The older work was targeting motor cortex.
well, I wouldn't go higher than the brain stem
@Thomas and the fact that EEG can be used
hmmm... that's rather difficult, right?
@Thomas Brain stem is hard because a lot of critical circuits pass through there; surgeries is a serious challenge
I think implants would be best
@Mark Laubach where is the main set of problems with the electrodes? the metal-neuron interface?
true. the motor cortex would actually be safer
There was a group at IBM that was using EEG successfully to control simple circuits like light switches and toilets; simple problems that need to be addressed for independent living
@Mark Laubach i heard about some tricks with conductive polymers, forming around the cells.
@Thomas Shaddack Glia growth limiting isolation of neurons
Getting back to tracking the movement of a rat in a box, is that a behavior? Drinking water from the water tube certainly might be classified as a behavior. how is that useful?
Anyway... we don't really cover BCI/BMI on OpenBehavior
hackaday.io, no?I think there are a couple of eeg/bci projects here on
Yes, I worked on some of the NeuroSky stuff, controlling fursuits. It was very unsuccessful.
It's nowhere near precise enough and everything on the market uses more interpolation than actual data.
@Chuck Glasser : how is that useful in what sense?
@Chuck Glasser Yes, drinking from a tube is a behavior, and understanding the decisions that lead to drinking now or later, or one fluid or another, are a major topic of work in the field
@Chuck Glasser Glad you asked! Yup a rat in a box is a behavior. Our lab uses that to measure activity in obese rodents (our lab studies obesity for anyone who missed the intro). A big question in obesity research is why people with obesity are less active than lean people. We're using movement in a box as one read-out of activity, so we can identify what it is about obesity (or junk food diets) that leads to inactivity.
I worked on an eeg to helicopter before in university, its very noisy
what is your experience with reproducibility of results with OSH compared to quality controlled commercial products? Any feedback from the scientific community on that?
@Lex Kravitz YES! Obesity, decision making, sensorimotor control.... all studied using simple behaviors like drinking fluid from a tube; and one of the most covered topics on OB
@Thomas The nice thing about OSH is that the papers that come out describing tools normally come with calibration protocols and specify equipment working limits, etc
I wish that EEs and technologists in general would come to appreciate the complecity of even the "simplest" of behaviors
so you know quite well what you get/what you can do with it.
https://en.wikipedia.org/wiki/Terminal_nerve (if it is a vetigial element) with an analog opto stimulator. You could have the light receptor just under the skin with a inductor to power the circuit... You could even embebed it in your glasses...why not reuse the terminal nerve
@Thomas not being snarky at all, but are there really quality controlled products in the neuroscience field? My dad did quality control for Ford Motor Co back in the day, and there is nothing in science vendor world like what auto companies did on the assembly line
@riley.august Interesting! Yeah my feeling on the consumer grade EEG products has always been that they are not useful for measuring what they claim (or at least not with the EEG signal, perhaps with other sensors like motion). One reason I'm negative on this is that neuroscientists don't know how to measure these things with research-grade equipment....