In this brief tutorial, I’ll show you how to plot the positions of your tracked particles on top of your experimental movies using Pimsviewer, a Python image viewer that uses PIMS as it’s backend and can open various (scientific) image formats.
Pimsviewer should work with all the formats that can be handled by PIMS, this includes TIFF images or stacks and Nikon ND2 microscopy files. Start the viewer by running the following command:
You should be presented with a GUI similar to the images below. Open your video file via the ‘File’ menu.
The annotation is available as a plugin via ‘Plugins -> Annotate plugin’. Also included is a dummy processing plugin (it simply adds noise to the images). It serves as an example of how to write your own plugins to extend the functionality of Pimsviewer. For more details on how to write your own plugins, see the README on Github.
Trajectories can then be loaded from a CSV file, which contains a column with the frame number, the x and y coordinates and optionally the radius (for example, as generated with TrackPy). As of now, the plugin only draws circles, but it could be easily extended to draw other particle shapes. By setting a custom scaling factor, you can convert the units of the x, y, r columns to pixels.
Now a circle is drawn on each frame of your video, corresponding to the data in the CSV file. You can then play the video to ensure your particles are properly tracked.
I hope you’ll find Pimsviewer useful, any bug reports or pull request are very welcome via our Github page. Please leave a comment to let me know how you use Pimsviewer and how it could be improved.
In order to keep everything aligned properly, you’ll need something that resembles a copy stand. Some people have success with using a tripod mounted in reverse, however there are two problems with this approach: 1) you have to carefully align the legs and 2) you can’t keep it as a permanent setup on your desk. The Reprostativ V5 kit solves this problem. It is a kit which contains all the parts to make your own copy stand (except for the quick release plate and some felt pads to put underneath the arms, as stated in the manual).
The Reprostativ is sold by a German company and as such, the manual is also written in German. However, even if you don’t speak German, it should be easy to follow because of the very clear pictures. The end product feels very solid and sturdy. The only thing that was strange, is that the plastic end caps have to be forced into the openings, essentially removing part of the plastic in the process. However, once they are in (use a hammer) they are locked tight.
To complete the copy stand, you need a tripod quick release to hold the camera in place. Any Arca-Swiss compatible release plate will do, however the manufacturer recommends the Andoer DM-55 Clamp and Quick Release Plate which I have also used here. You attach the plate in the approximate position that is needed to get a sharp image of the negative. Then, you can fine-tune the position of the camera by slightly loosening the clamp and moving the camera up and down. Although a more elaborate system is probably even more convenient, after some practice it is actually quite a fast way to focus on the negative. And if you want to photograph a series of negatives using the same magnification, you only have to set it once and make micro-adjustments using the QR plate when necessary.
The light source
The second important part is the light source. The best advice on this front that I have found, was the very detailed post written by Nate over at the Negative Lab Pro forums. To restate his main points: 1) you want a high color rendering index (CRI), 2) good separation of color channels in spectral sensitivity curves, 3) an even illumination and finally 4) consider how “collimated” or diffused the light source is in your setup. Based on his recommendations, I went for the “Kaiser Slimlite Plano (CRI = 95, very even)” but I recommend you read the original post and the discussion over at the forum thread. The nice thing is that the Slimlite panel I’ve bought (29×20 cm) precisely fits on the legs of the Reprostativ.
The film holder
For a film holder, you can use anything that keeps your negatives flat and far away enough from the light source to prevent both Newton’s rings (where the film comes in contact with a smooth surface) and ensure an even lighting. I’ve used the Digitaliza 120 film holder because it is sturdy and I already had one available.
Optics: the lens and camera
The final but also very important part of the setup is the device that actually captures the information: the digital camera (with the appropriate lens). I have used a Pentax K20D (14.6 megapixel) but of course the higher resolution and the larger your sensor is, the better the final result is (potentially).
For 120 format negatives, a 50mm lens works nicely. You want to use a macro lens (or an enlarger lens) because these are (generally) sharp across the whole image plane. In my setup, I use a Pentax K mount Sigma 50mm 1:2.8 DG Macro, which can reach a 1:1 reproduction ratio. To fill the sensor with a 120 negative on my Pentax K20D, I use a reproduction ratio of roughly 1:4, if you want to make multiple captures and stitch them (more on that later), you can use something like 1:1.5 for approximately four captures (including some overlap) or you can go all the way up to 1:1 to extract the most detail.
My setup and first results
Now we have discussed all the parts that are needed to digitize negatives using your digital camera, I’ll show you my workflow! On the right you can see the actual setup, which fits nicely on my (somewhat messy) desk. The Pentax K20D is tethered to my PC via a USB cable so that I can conveniently control the camera from my laptop with the open-source program pkTriggerCord. Then, I edit the RAW files inRawTherapeeand make some final adjustments in Gimp. When using a 1:4 magnification (so that the whole 120 negative fills the frame) this whole process takes only a few minutes. Dust is of course always a problem: however, just before shooting the image, you can use a Rocket air blower to remove dust at the last minute.
Before the camera scanning setup, I was using a trusty Epson v550 to scan my negatives. However, I could never quite get along with it. The scanner is quite a dust magnet and the holders that come with it are quite flimsy (hence I bought the Digitaliza holder). Additionally, while there is a Linux driver for the Epson v550 available, it never played nice in my experience: sometimes the scanner was only recognized when plugged into a certain USB port and sometimes not at all. The automatic cropping of the 120 negatives never properly worked and the whole process felt slow.
Also, I had the feeling I could never get scans that were quite sharp. Enter the comparison image on the left: the same negative scanned on the Epson using the best settings I’ve found and using the camera setup (at 1:1 magnification). To me, the results from the camera are spectacular: they are decidedly sharper than the scanner results.
Perhaps the same result could be obtained by carefully tweaking the height of the film holder on the scanner, but focusing using the camera setup is much easier in my opinion. Additionally, the camera image was scaled down and the scanner image was scaled up to have the same number of pixels for the comparison, so in reality the camera images can have a much higher resolution than the Epson scans, which enables larger or more detailed digital prints, or pleasing digital crops.
Caveats or where to go next
There are a few things to note about the setup: first, the comparison above was done at a 1:1 magnification. This implies that for a single negative, you have to take multiple shots and stitch them together afterwards. This is something I have not tested yet, but plan to try soon. However, looking at the image below, there is not much difference in quality when taking just a single shot at 1:4 or using the Epson scanner for sharing photos online. But to me, the process is much more enjoyable and also a lot quicker.
Additionally, a setup that uses a camera for digitizing negatives offers numerous other possibilities that are not always possible with a scanner. For example, when using 35mm negatives, one could include the sprocket holes and more generally, larger (panoramic) formats can be digitized by stitching multiple shots. Stitching is something I’ll try next, as well as color negatives and the combination of shots of different exposure times to increase the dynamic range that can be extracted from the negative (à la HDR). Any feedback or tips are very much appreciated!
I hope you enjoyed this article. It contains Amazon affiliate links to the products I’ve discussed, if you decide to purchase any of them, a small portion of the proceedings will help to support this blog.
All microscopic objects, from enzymes to paint particles, are jittering constantly, bombarded by solvent particles: this is called Brownian motion. How does this motion change when the object is flexible instead of rigid? Together with Pepijn Moerman and colleagues, we have published the first measurements in Physical Review Research as part of my PhD research.
The paper studies the diffusive motion of a segmentally flexible colloidal model system through experiments and numerical calculations. We observed hydrodynamic couplings between conformational changes and displacements, which may have implications for the transport and function of synthetic and biological flexible objects at the microscale.
A short summary of the work can be found on the Leiden University website: “How microscopic scallops wander“. To see the colloidal scallops in action, see the video below: