Using Matlab to Find an Optimal Filter

I ran into a problem today – I’m putting together a quote for a new spinning disk confocal, and I want to find optimal emission filters for the dyes I want to image. For example, my confocal will have a 647 nm excitation laser that I want to use to excite both Alexa 647 and the infrared proteins iFP1.4 and iRFP. So, I need to find an appropriate emission filter. If I go to Semrock, I can look up the filter they recommend for Alexa 647, but not the infrared proteins. If you do this, you will find a large number of filter sets recommended for Alexa 647, of which this one seems to be the most appropriate for laser excitation.  It uses a 676/29 emission filter, which seems pretty narrow for Alexa 647, and certainly doesn’t extend far enough to the infrared to collect fluorescence from the infrared proteins.

I can look through Semrock for a better filter, but what I’d really like to do is automate this process. Ideally, I’d check each filter to see that it blocked the 647 nm laser excitation, and then find the one that has maximal transmission of the dyes I want to image. It turns out that with some computer tricks, this is not that hard to do.

The first step is to get spectra for every filter Semrock sells. You can use standard mirroring tools, like wget, to download the text file with the transmission spectrum for each of their filters. If you do this, please be polite and put a delay between requests so you don’t hammer their website by trying to download all of it at once. I would be really nice if the filter vendors had a zip file with all the spectra for download so you didn’t have to do this.

Once I had the spectra downloaded, my next step was to load them into Matlab. I did some pre-filtering of the spectra here, by eliminating dichroic mirrors, notch filters, and any filters which didn’t transmit between 400 – 800 nm. I then saved a Matlab structure with the name and spectrum for each filter.  Here’s the code to do this pre-filtering: parseSemrockFilters

With the filters parsed the final step is very easy – just find filters with OD6 or greater at 647 nm (so they block the laser line) and calculate the fractional transmission of each filter for Alexa 647.  You can download the Alexa 647 spectrum from Invitrogen. I could add the infrared fluorescent proteins, but I don’t happen to have those spectra on hand. Then I sort the data by Alexa 647 transmission, and evaluate the results by hand.  Here’s the code: FindFilter

Not surprisingly, the highest transmission filters are some long pass filters. I probably don’t want those for my scope. There’s also a lot of multiband filters with high transmission; I don’t want those either.  Looking at just the bandpass filters, here are the results:

FilterAlexa 647 TransmissionComments
731/13783%Maybe a bit too broad?
708/7565%Similar to what we use now.
736/12864%Broad, too long wavelength
676/2954%Semrock's recommendation
 A647 filters

There are a number of broader filters that are probably better for my application, where I want to detect both Alexa 647 and infrared fluorescent proteins. This doesn’t mean that Semrock’s recommendation is bad; there are a number of other properties you’d want to check before purchasing one of these. Chiefly, you’d want to verify that the blocking at other wavelengths is good enough to block any stray light or autofluorescence you’re likely to encounter. In many cases, if autofluorescence or crosstalk is a problem (say if I wanted to multiplex Alexa 647 with an infrared dye) the narrower bandpass would be better. But for what I’m doing, I want one of the wider bandpasses.

As you might expect, being able to calculate properties of all Semrock filters is pretty powerful – if I had the iRFP spectrum I could calculate that transmission percentage as well, or if I wanted to separate two dyes I could look for two filters that maximized transmission of one while blocking the other.