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

Add Artefact Removal for LED/Point Stimulation/SLM Stimulation? #23

Open
jmdelahanty opened this issue Jun 17, 2022 · 2 comments
Open

Comments

@jmdelahanty
Copy link
Contributor

Experiments using Optogenetic stimulation through the whole field LED on the Bruker Ultima Investigator have artifacts that are introduced in the imaging. These are composed of two types.

LED and PMT Shutter Artifacts

In trials where LED stimulations are activated, the LED pulses according to a specific rate that is documented in the configuration file. At the moment, a rate of 20Hz is used for the pulsing of the LED. Because the photomultiplier tube (or PMT) sensors that detect photons out of the laser's scanning are very sensitive, it is recommended that you protect them by engaging a set of mechanical shutters that close and block the sensor and protect them from the very bright/intense light.

Unfortunately, Bruker has a hard limit of 10Hz for the currently installed shutters. The only way to change this behavior is if you override this limit embedded in the hardware. The manufacturers of the shutters we have state that they are capable of sustained bursts of 20Hz for a couple seconds given that there is a sufficiently long break between them (a couple minutes) to prevent them from being damaged over time by the heat generated in the motors/prevent wearing down the shutters themselves. They do not recommend overriding this setting as it will reduce the lifespan of the shutters. Our stimulations occur over the course of approximately 5 minutes and happen after 15-30 second intervals (the ITIs).

If the LED pulse occurs during a moment the shutters are open, you see bright horizontal sections in the images. In images where the shutter was closed, there are large black horizontal sections. Here's what a (sped up) version of what these images look like:

stim_artifact.mp4

Suite2p recommends excluding these frames from registration/motion correction through the use of a "bad_frames" list. Implementing this would be easy enough, but it has not been done yet as it has not been deemed necessary.

There's other solutions to this that don't exclude the frames. Namely, using interpolation of the frames immediately before and after the these events is what other labs like the Deisseroth lab does. See our fork of their repo here for their method of doing this interpolation.

In the output data, the calcium traces look like this:
stim_artifact_traces

Notice the sudden spikes and drops in the dF/F traces. These are due to the LED and shutter activity, respectively.

@bjnielsen
Copy link

bjnielsen commented Jun 17, 2022 via email

@jmdelahanty
Copy link
Contributor Author

This sounds interesting! So the idea is then you shift the power going through the LED so fast that, while the LED has something running through it, the amount of time the current is put through the LED itself is so low that there's no light produced?

In this case we want to ensure that the LED is definitely not producing light except for these precise moments we're stimulating the brain. Even if I understood things/wrote them out correctly in the question above (which I'm doubtful I did!), we'll still run into the issue of the LED's light hitting the PMT. I'm not sure there's a way of avoiding this exposure other than the shutters closing. We need the light to come out of the microscope's light path and shine onto the brain. So it seems like we're sorta stuck with artifacts of some kind going off.

Also, since I'm not sure I was clear in the issue at the start, we can drive the LED a lot faster than 20Hz with what we have, the Prairie View software allows you to stimulate much faster than we'd need for our experiments. I'm not sure what that speed tops out at, but I think it's quite high.

The 20Hz rate was selected from prior literature searches about how to drive the type of opsin (the protein that activates our neurons when exposed to light) in the types of cells we're looking at. There's a mismatch between what the LED does and what the shutters do, so while we stimulate we only block half of the LED flashes. The issue in the data we collect is that the calcium traces like the blue line above have these unnatural peaks and drops in the time-series.

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

2 participants