## O2 conversion

The molar volume of an ideal gas is ~22.4 liters per mole (we’ll  consider O2 to be an ideal gas for these purposes, and 22.4 is an approximation that varies with temperature, it’s 22.414 at 0C). Convert from 22.4 liters to milliliters ( = 22400 ml per mol). So if you have 1 milliliter of an ideal gas, there is 1 ml / 22400 ml per mol = 0.00004464 mol of that gas, which is 44.64 µmol of the gas. Thus, if you have a volume of a gas in ml, you can calculate the µmols of that gas simply … Continue Reading

## Removing security features from a pdf

Whoops, I totally made my own pdf and accidentally included a bunch of security features, so now I can’t use my highlighter or type notes on the document. It sure would be handy to take off those security features that I put there myself when I made the pdf, myself.

With a full copy of Adobe Acrobat and the associated Acrobat Distiller software, the process is as follows:

1. Open the secured pdf in Acrobat.

2. Go to File>Export>Postscript>Postscript and save a .ps version of the pdf file.

3. Open the .ps postscript file in a text editor (WordPad on Windows works fine).

## More tide prediction with R

Edit: There is now a full-fledged R package, rtide, to accomplish the same basic task of generating time series of tide predictions that is outlined here. See this more recent post for information.

In the previous post I outlined how to query the XTide software with R and parse the results into a handy-dandy data frame. The biggest hurdle with that method is getting XTide up and running on your computer. The code outlined here works entirely within R, so you don’t need XTide installed on your computer. The trade-off is that it provides substantially … Continue Reading

## Interfacing XTide and R

Edit: There is now a full-fledged R package, rtide, to accomplish the same basic task of generating time series of tide predictions that is outlined here. See this more recent post for information.

XTide is an open-source program that predicts tide heights and current speeds for hundreds of tide and current stations around the United States. It can be used to produce tide predictions in the past and future for a site at your chosen interval (down to the minute), as well as producing sunrise and sunset times, moon phases, and times when the tide level … Continue Reading

## Book Review: The R Book, Second Edition (2013)

The first edition of The R Book by Michael J. Crawley was an ambitious work, but managed to be slightly rubbish due to the atrocious typographical layout of the original book. The good news is that the new 2nd edition, released in 2013, has a substantially improved layout that makes the book far more useful as a general reference. This is important, since the book is meant as an accessible reference for non-statisticians to many of the powerful data manipulation and statistical techniques available in R, particularly for biologists and researchers in similar fields. With this new edition you’re no … Continue Reading

## ImageJ StartupMacros

Before I lose this file again: StartupMacros.txt This is a text file, based on the original StartupMacros.txt file that came with ImageJ, that can be dropped in the ImageJ/macros folder that is created when you install ImageJ. Start up ImageJ, and if this macro doesn’t automatically run, go to Plugins>Macros>Startup Macros to load it. It installs a few more drawing tools on the ImageJ toolbar and creates some keyboard shortcuts for the following tools:

• Line tool – press ‘l’
• Brush tool – press ‘b’
• Eraser tool – press ‘e’
• Wand tool – press ‘w’

I either found or created some code … Continue Reading

## Analyzing western blots with Image Studio Lite

Image Studio Lite is a free software package from LI-COR Biosciences aimed at life scientists that want to analyze gels, western blots, dot blots, and other similar lab outputs. Although the Lite version is free, there is a more comprehensive paid version of the software that aims to easily integrate with the apparatus that Licor also sells. However, the free Image Studio Lite is more than sufficient for basic analysis of western blots, as I’ll show below.

## Generating polygon boundaries for plotting simple time series data with missing data

Every so often I want to plot some data with pretty upper and lower error bounds, such as temperature data through time, perhaps with the maximum and minimum temperature range or standard error bounds for averaged data. The polygon( ) function can make those sorts of pretty plots. However, I’ll often have chunks of missing data for periods of time, so I have to break up the polygons that go with the plotted data. I could swear I wrote a function to do this several months ago, but it’s lost in a pile of other scripts, so I re-wrote a … Continue Reading

## Adventures in kludgy software – Diving PAM edition

As a general rule, expensive pieces of lab equipment must come with software of questionable quality. In this case, I just want the raw data off a \$20,000 submersible DIVING-PAM fluorometer, which can be used for measuring the photosynthetic yield of algae and plants out in the field, away from a computer. But downloading the data requires a mini-odyssey through some needlessly confusing software that comes with the unit.

To start with, the packaged instruction manual for our DIVING-PAM still references a DOS-era utility for downloading the data, because the (brand new, delivered in 2012) instruction manual was printed in 1998. … Continue Reading

## Waterproofing iButtons, and reading waterproofed iButtons

iButton temperature dataloggers are tiny, long-lived temperature sensors that are great for all kinds of environmental and biological monitoring, but they’re a long ways from waterproof. Old farts will regale you with tales of a bygone era when you could leave a bare iButton submerged in seawater for months at a time without problems, but those days are long gone, due to a re-design in the early 2000’s. Nowadays you can’t even get away with leaving them in moist soil without eventual water intrusion, component failure, and data loss. But given their tiny size and relatively low price … Continue Reading