Archivos de diario de agosto 2023

17 de agosto de 2023

Scale bars

I recently wrote a Python script that reads EXIF data for camera, lens, and focus position and adds a scale bar to the photos:

Here's an example of the result:

How it works

It's written with prime lenses in mind, though other lenses could be adapted to work for it. I didn't attempt a general formula, with my limited understanding of optics. Additionally, most people online say focus distance is not reported accurately from EXIF data at all, so a general formula wouldn't probably work. Even with perfect EXIF data, I'm not sure a general solution is actually possible; real life lenses are complicated.

Instead I manually recorded pixels/mm at various focus distances with the camera, and interpolate between them linearly. (Therefore, it doesn't matter if the EXIF focus distance is actually accurate, just that it's internally consistent.) It's a crude solution but it does seem to work; with test photos of rulers at random focus distances it seems to be reasonably accurate.

Right now it only works with known combinations of lenses and cameras (really just the one I use most often now, my OM-5 with the M.Zuiko 60mm macro lens). It feels like a safe assumption to just go off sensor size for the camera, rather than rely on an individual model, but without more cameras and lenses to try out I'm not confident about any assumptions.

Making this useful for other people

I don't think a Python script is the best way to do this part. I want a sort of webpage that people can quickly add scale bars onto. The automatic derivation from EXIF data part will be hard to get support for without people contributing their own measurements (cameras are pretty expensive!); most likely I'll add an input field for manually specifying pixels/mm at various focus distances, and give people instructions on how to figure that out on their own.


  • Rotating the scale bar
  • Changing scale bar style (color)
  • Changing the unit (cm, mm, etc)
  • Non-macro or even telephoto distances (issues with focus distance inaccuracy might make this unreasonable: TBD)
  • Microscopes: supporting photos taken through a dissecting microscope eyepiece would probably also be useful; these focus by physically moving the microscope up and down, so they'd work a little different (you'd specify the zoom factor). The camera sensor size and resolution would be the only other factors in this situation. Light microscopes would work similarly. Neither are going to be as luxurious as the camera solution, as no information about the microscope would be in the EXIFs
  • Resizing: A limitation that might not be reasonable to work around is that you can't resize images before using this tool, as pixels/mm is the magic factor that'd be ruined by resizing (so cropping is ok). I'm not sure resizing is recorded in EXIF data; if it were, it'd be easy to adapt. If not then we're hosed!
Publicado el agosto 17, 2023 12:24 MAÑANA por wweellll wweellll | 1 observación | 0 comentarios | Deja un comentario

30 de agosto de 2023

Usnea in the PNW

These are my notes for Usnea in the area, compiled from a few sources in an abbreviated form for quick identification. I wrote some tips below the tables as well.


cma cortex medulla axis; a measurement of the relative lengths of each of these sections
m/c medulla / cortex; ratio
a/m axis / medulla; ratio
b. base
sor soralia
isid isidia
>1/2 bw “more than half the branch width”, in reference to the size of soralia
tub tuberculate (slightly raised)
a.d. anisotomic dichotomous (branching unevenly)
i.d. isotomic dichotomous (branching evenly)

Saxicolous, subalpine-alpine, black stripes on branches: lambii

Apotheciate, no isidia or soredia

These are distinguished by chemistry typically, but in our area location is normally all you need:

  • K+Y, P+O, UV- (thamnolic acid, accessory alectorialic acid): florida (probably not in the PNW)
  • K+Y-O, P+O, salacinic acid; in California: intermedia
  • K-, P-, UV+ (squamatic acid, accessory alectorialic acid): florida (probably not in the PNW)
  • K-, P+R, UV- (protocetraric acid); in n. WA, BC: quasirigida

Unusual thallus or axis color:

  • axis yellow, cortex with red spots: flavocardia
  • axis brown, lacking isidia and soredia: trichodea
  • axis red, pinkish brown, rose, cortex with isidia and coarse soredia: ceratina
  • cortex red, or red spots, axis white, coastal: rubicunda


sp cma m/c a/m size cm branching fibrils branches pitted base annular cracks papillae soralia/isidia UV
cavernosa 7/28/32 4.0 1.1 60 not often few-none very   some none none -
chaetophora 10/19/42 1.9 2.2 30 few few-no no black >6/cm sparse, low-none none -
dasopoga 16/9/49 0.6 5.4 30+ often often no   few, small tall <1/2 bw, isid on sor, tub -
pacificana 19/16 (compact)/33 0.8 2.1 20 yes few-no no   conspicuous near b. common, near b. <1/2 bw, isid on sor, tub +
scabrata 8/17/49 2.1 2.9 70 often many weakly   few, small sparse, low usually -
silesiaca 19/9/50 0.5 5.5 25 many many no   6-15/cm yes >1/2 bw, isid on sor -
subgracilis 15/10 (<C)/38 0.6 3.8 50+ some variable no never black >6/cm none few-none -

Cigar shaped branches (all have CMA about 7/31/25 with a very loose medulla):

sp size cm fibrils base papillae soralia/isidia UV
cornuta 5-15 many not black yes <1/2 bw, isid on sor -
fragilescens 20 few black yes, low >1/2 bw, isid on sor +/-
flavocardia <7     yes encircling, cortex peels back, isid or not -
esperantiana 8 many not black many >1/2 bw, no isid -
glabrata       no encircling, cortex peels back, no isid  

Tufted with soralia which are strongly concave, wrapping around branches with age, with a recurved cortex:

Photos of this type of soralia

sp cma m/c a/m size cm branching isidia papillae
fulvoreagens 10/22/27 2.2 1.2 20 tips long+straight none yes/no
lapponica 9/28/30 3.1 1.1 8 tips contorted by sor few-none  
wasmuthii 11/13/53 1.2 4.1 10 tips contorted by sor few, on young sor yes

Tufted otherwise:

sp cma m/c a/m size cm branching fibrils annular cracks papillae soralia/sidia UV
diplotypus 9/23/37 2.6 1.6 10 tips sinuose   inconspicuous short-tall <1/2 bw, isid on sor, some oval -
hirta 9/24/35 2.7 1.5 10 main foveolate many   none only isid, dense -
nidulans 9 glossy/15/55 1.7 3.7 10   groups of 2-4 often, small low when sor tub w/ isid -
subfloridana 10/20/40 2.0 2.0 15 i.d. some yes, obvious common near b. small-large, tub, isid on young sor +/-
pacificana 19/16 (compact)/33 0.8 2.1 20 a.d. few-no yes, obvious common near b. small, tub, isid on young sor +

Tips for good Usnea observations

  • Try to find a healthy thallus that is not immature. Necrotic thalli often have colored axes or thalli which might be mistaken for flavocardia or other specially colored species.
  • Identify the overall morphology: is it pendant or tufted? Does it have cigar-shaped branches? Is the thallus foveolate or not? Are there many fibrils or is it barely branched like an alectoria?
  • Get a good photo of the base: the area above the base might have annular rings, possibly many, or be papillate. Most bases are black or darkening, but a few species never have darkening bases
  • Look for soralia; sometimes these are only on smaller branches. Find several; species with soralia which are large will also have smaller, young soralia. Smaller soralia may be the only ones with isidia. Whether or not there are any isidia is often useful.
  • Make a cut near but not at the base into the interior and take a CMA measurement (I made a tool for measuring CMA quickly here: Recently papers have been referring to M/C and A/M ratios as well, which are just calculated from the CMA measurement (it captures the notion of “medulla thinner than cortex” as a M/C<1 and is apparently a useful characteristic). With a CMA measurement this can be calculated by taking the ratio of the medulla/cortex or axis/medulla percents
  • A CMA measurement is not necessary for cigar shaped branches, but it’s still worth revealing the axis to check for flavocardia. Cigar shaped branches are caused by a very loose, thick medulla; if you are unsure about this (it can sometimes be a bit subtle) check if the medulla is over 25% and very loose
  • If the axis strangely colored, this may reveal the species immediately (yellow = flavocardia, brown = trichodea, red, pinkish brown, rose = ceratina)
  • Shine a UV light at the freshly exposed medulla; there are only a few UV+ species (from squamatic acid). Squamatic acid’s UV+ is bright and obvious; if ambiguous it is UV-
  • Consider doing a spot test with the piece you removed taking the CMA measurement. Virtually all species will occasionally lack any secondary metabolites other than usnic acid, so only positive results are useful

Cutting the branch longitudinally for a CMA

This can be a little tricky. Using a double edged razor blade that's been broken in half (like you might use for sectioning apothecia) is best. Find a well exposed, large branch near the base, and make a cut, trying to keep the razor blade level with the branch. If the cut isn't far enough into the branch to cross section the axis, scrape a bit more off. Less is better so you don't cut the branch all the way through (not the end of the world, if you still got a good level section exposed). I find this easier with dry thalli but completely possible with wet thalli too. A 1:1 macro lens with flash should be powerful enough to get a good photo for the CMA measurement. Rotate and crop so the branch makes up the lower 2/3rds of the photo and is horizontal in the frame.


Bruce McCune and Linda Geiser's Macrolichens of the Pacific Northwest; McCune's website has good photos
Daphne Stone's Usnea in the Pacific Northwest (available here)
Clerc (1987) Systematics of the Usnea fragilescens aggregate and its distribution in Scandinavia. (describes CMA measurements)
Clerc (1987) On the morphology of soralia in the genus Usnea.

iNaturalist currently doesn't have a lot of good observations, and computer vision is almost completely useless for Usnea.

Publicado el agosto 30, 2023 07:30 TARDE por wweellll wweellll | 0 comentarios | Deja un comentario