Sunday, September 10, 2017

Labophot Microscope

I noticed a long time ago that the fact I am an engineer shows in my iNaturalist submissions. I have always managed to make it an excuse to play with some gadget or another. So of course, I have wanted a phase contrast microscope since I first learned it was needed to identify many aphids.

Reading up a bit on the topic it was clear that there are two reasonable routes there. First is the low end modern microscopes. Trinocular phase contrast microscopes from Omax, Amscope, or National Optical are available and probably good for any purpose I am likely to use them. The other option is 1980s era entry level research microscopes. Of those the Olympus BH2 and Nikon Labophot seem the most popular. Both these routes seem similarly priced and at least on paper give similar function.

After giving it some thought, going the old microscope route makes a lot more sense to me. Having an above average ability to tinker, it just seems like I can squeeze more out of them than the average user. Also, the microscope has survived thirty plus years and has a large market for used parts so it seems like I should be able to keep one running indefinitely.

After shopping around, I picked up a Nikon Labophot a condenser, and a 10x objective off of ebay. This seemed to be the cheapest way possible to phase contrast. While the Olympus BH2 is similar price, it seemed that condensers with phase contrast, bright field, and dark field as well as trinocular heads are half the price on the Labophot system. Also, the better objectives on the Nikon system can be directly mounted to a camera and used with my stackshot setup.

I was too cheap to get a trinocular head initially. I figured I would just get one a few months in the future. That quickly drove me nuts. I work by creating photos which are identifiable. Having a device which could identify species but could not share that information just wouldn't work.

First I tried using my camera by looking into the eyepiece with my macro lens. This was a horrible disaster, completely unsharp images. Then I tried using my cell phone to take images. A step up, but still frustrating:
That image showed some details correctly, but compared poorly to the Miutoyo 5X and stackshot setup I was using previously. That setup gave somewhat less detail than the cell phone in the objective, but certainly produced cleaner pictures:

After a few days of thinking about the problem, I realized it was possible to take the head off the microscope and project an image above it. Then, if I held the camera there without a lens I could see something. The first try was a failure, but then I realized that a stack of extension tubes allowed me to hold the camera still:
This did the trick! Now I can take reasonably good photos on the microscope. It even allowed me to make focus stacks by taking a couple photos of an area I am interested in. Even for dark field images it appears to be stable enough to work with the 10X objective:

With phase contrast and a little focus stacking though, it is pretty clear I finally have the magnification to identify most aphids or similar size arthropods. This is a lot more detail on hairs and other small features than I previously had. Eventually I will get a 20X, 40X, and 100X objective to go with the 10X, but this setup does appear to work well as is:

Now I am questioning whether I even want to bother with the trinocular head. A cheap adapter or two could get me from the 48.5mm dovetail connector on the microscope to the setup I am holding on the microscope right now.

Thursday, May 25, 2017

Scale Bars

I have long wanted to put scale bars on pictures. They just make them seem more scientific. When it comes to more difficult species to ID they can even be pretty important in being able to get an ID from a photo. With a scale bar it is even possible to put the picture in photoshop, set the scale, and measure out lengths of various details such as antenna length in the photos.

Getting them on images with a macro lens is a bit of a pain though. The scale changes as the image focus changes. In theory it should be possible to take the information in the photo about the lens focus at the time of the photo and convert it to a scale, in practice it is difficult though. At a minimum it takes a bit of scripting, and from what I have read the accuracy of the lenses is not good enough to get particularly accurate.

With a microscope objective it is comparatively easy. As I have it set up my Mitutoyo 5X Objective is either at 3X or 5X magnification. So, all I need do is figure out the dimensions of one pixel in each scenario and make Photoshop add a scale bar. To that end I bought a microscope calibration slide and imaged it at 3X and 5X.

After doing this, I realized that I take a majority of my photos of insects with 1X magnification by putting the macro lens at minimum focus. By taking a photo of the calibration slide at 1X magnification, it is possible to add a scale bar to any photo which was taken at minimum focus distance. Technically this would be possible at any magnification, but 1X magnification is the only magnification I can quickly and accurately reproduce since it is the minimum focus distance.

That was the easy part. Even once I figured out the overall idea, turning this into a practical method took some time. First, I needed to measure the scale bar in Photoshop by going to Image > Analysis > Ruler Tool . That gave me the width of the scale bar in pixels. With the length of the 1 mm scale in pixels I was able to calculate the width of a single pixel in microns.

I was then able to set the scale such that I could measure any dimension in correct microns by going to Image > Analysis > Set Measurement Scale > Custom and setting it so one pixel was the correct number of microns. Then by going to Image > Analysis > Place Scale Marker I could make a 1mm scale bar. Unfortunately it gave a scale bar with a ridiculous number of significant digits and units in microns. Luckily with the text edit I was able to set it to 1mm.

Now I had my first scale bar!

After making about ten of these, I realized that this was just way too much work to fit into my workflow. It needed to be automated!

First I read up on Photoshop actions. By making a new action and by pressing record when I made the scale bar I was able to turn the process of making a scale bar into pushing one button. Then I made another action which recorded the process of saving as a jpg. Now I just needed to load the photo into photoshop and hit two buttons and the whole process would just work.

Still too much work.  Then I learned that by going to File > Automate >  Batch I could run the action to add a scale bar to every photo which is open. So now all I do is load all the files to get a scale bar, tell it to put a scale bar on every photo then tell it to save every photo. I will have to turn it all into one action one of these days, but it is finally practical to insert into my workflow.

If you are trying this there are a few traps to watch out for. First, the pixel size must be unchanged since the photo was taken. If the photo was compressed when you exported from Lightroom, or saved in some other software then all your scale bars will be wrong. Also, it is easy to put a photo into Photoshop which was not at 1X magnification. Any of those photos will have a wrong scale bar.

Sunday, April 2, 2017

Attempts at aphid identification

Since getting a focus stacking setup and starting to take on identification of some really obscure species I had some luck and some failure. It really did lower my productivity, as in a typical post is more than an hour work for sample preparation, photography, and stacking in Zerene Stacker.
If you have interest in trying to build a similar focus stacking system, I described it in detail in the amazon review for the Mitutoyo 5X microscope objective:

I was planning to do one big post of everything I learned since taking this on, but it is pretty clear than aphids deserve their own post.

 Aphids are a tough group to identify. In many cases my 5X magnification is not enough, and in extreme cases I was told a 200X phase contrast microscope is absolutely necessary. Still, there are many species which can be identified from a good photo and focus stacking aphids on a slide increases that number substantially.

The first step is collecting some adult aphids, and putting them on a slide. For this I use some combination of the technique described in the USDA video on slide mounting, and the instructions which came with a slide mounting kit I bought to mount the aphids in Euparal
  1. Put the aphids in a ~10% sodium hydroxide solution for 12-24 hours. I am not real scientific here, and just dump some crystals in until it looks like about 10%. Unfortunately this ruined a couple when I got the concentration a bit high but I am getting a good feel for it. For a supply of sodium hydroxide, I found that some drain cleaner works
  2. Squish the aphids as shown in the USDA video
  3. Put the aphids in specimen clearing solution, and heat them to 120-150 degrees F for a few hours until they look clear.
  4. Run them a few minutes each in 70% alcohol, 95% alcohol, and 99% isopropyl alcohol.
  5. Put a drop of Euparal on a slide and place 3-5 aphids on the slide bottom up. After some usually futile attempts to position such that all limbs are visible, put on a cover slip.
It would be best to heat the slides to dry them, but I just let them sit a day or two. It is clear it takes a couple weeks to completely dry them out. If I get really serious about this, I might switch to Canada Balsam, following this procedure. The advantage there is that the slides should last centuries rather than the years to decades Euparal is likely to survive. At the moment that advantage doesn't mean much to me, but if I end up with a big enough collection it might.

After drying the slides I use my microscope setup to photograph with as much magnification as my setup can do.
  1. Full body
  2. Third antenna segment
  1. Full body
  2. Third antenna segment
  3. Head, dorsal and ventral focus
  4. Apex of rostrum
  5.  Hind Tarsus
  6.  Abdomen, including cornicles and cauda, dorsal focus
  7.  Cornicle, especially apical 1/4 or so.
  8. Cauda, especially setae number and placement
Typically with the magnification my 5X objective can produce, I can get all those items into perhaps four to six photos.

Some examples of aphids rarely reported on iNaturalist I have been able to identify since taking this on:
Metopolophium dirhodum
Myzus persicae
Macrosiphum euphorbiae
Hysteroneura setariae
Neotoxoptera formosana
Aphis craccivora
Wahlgreniella nervata
Sitobion fragariae
Eulachnus rileyi

A couple of those are likely to get pushed back to genus when someone points out a look-alike, but most of them are correct.