Archive for How-to

Morphometric measurements from vector images

I’ve been trying to find a good method for quantifying just how spiny any given ant species is. Among Pheidole ants, we see this interesting phenomenon where certain clades have developed elaborate spines and armature relative to the rather conservative morphology of their relatives. This ‘spinescent’ morphotype has evolved independently in at least four Pheidole lineages.

Morphometric measurements from vector images from Eli Sarnat on Vimeo.

So how to measure spinescence? Ideally we’d have 3D tomography of representative specimens from each species, but that’s not very feasible. Using a stage micrometer to measure spine length relative to something like head width is another option, but it is really difficult to account for the curves and bifurcations in some of the structures.

My solution is to create a spinescence index, defined as the ratio of spine perimeter to body perimeter. In other words, what percentage out the specimen’s 2D perimeter is devoted to spines? It’s not a perfect solution, but it’s the best I’ve come up with in terms of accuracy and feasibility.

Using photoshop to take morphometric measurements

Taking morphometric measurements using specimen photographs from Eli Sarnat on Vimeo.

In this tutorial I use Adobe Photoshop cs6 Extended Version and a specimen photograph of an ant head to take morphometric measurements. I set a custom measurement scale in Photoshop calibrated to the scale bar embedded in the photograph, then record the measurement taken by using the Ruler Tool. Remember, the measurement will only be as accurate as the scale bar embedded in the photograph. So if the scale bar was not calibrated correctly at the time the photograph was taken, any derivative measurements will also be inaccurate.

Scratchpads tutorial: dealing with nomenclatural changes (new combinations)

Scratchpads tutorial: dealing with nomenclatural changes (new combinations) from Eli Sarnat on Vimeo.

In this tutorial I show one way for updating terms in the biological classification to reflect nomenclatural changes. The situation I deal with here is for a species included in the Antkey.org site which has recently been transferred to a different genus. This nomenclatural act is known in taxonomic jargon as a ‘new combination’.

In this case, the species Monomorium destructor has been transferred to the genus Trichomyrmex. I change the Unit 1 name (genus) of the term Monomorium destructor to Trichomyrmex. Then I add a new taxon term ‘Monomorium destructor‘ as a child to Trichomyrmex destructor and classify it an invalid name associated with Monomorium destructor. This way all the content previously associated with Monomorium destructor will now be associated with Trichomyrmex destructor, and anytime someone searches for the now invalid name Monomorium destructor the user will be directed to the valid combination Trichomyrmex destructor.

How to identify Solenopsis invicta using Antkey

In this tutorial I demonstrate a few different approaches to identifying Solenopsis invicta, also known as the Red Imported Fire Ant (RIFA), using Antkey. The key can be accessed at antkey.org/content/key.

How to identify Solenopsis invicta using Antkey from Eli Sarnat on Vimeo.

How to use Antkey’s Lucid3 interactive key

In this tutorial I demonstrate how to make the most effective use of Antkey’s interactive Lucid3 key for identifying invasive and introduced ants. There are tips on how to use features like the ‘best’ and ‘next best’ buttons, what the different panels mean, how to make effective use of thumbnail and pop-up images and how to adjust the text size.

How to use Lucid Key for identifying ants from Eli Sarnat on Vimeo.

Video tutorial for tracing specimen images in Adobe Illustrator

Here is a four part video tutorial I’ve made explaining how to trace specimen photographs using Adobe Illustrator CS5 for producing high quality, scaleable line drawings. This procedure is basically the same as the one described in a previous post on illustrating ant heads. Here I trace the profile of Nylanderia bourbonica. Enjoy, and please leave a comment if you have any questions or suggestions for improvements!

Part 1 of 4. Importing the specimen image and tracing the mesosoma.

Part 2 of 4. Tracing the head.

Part 3 of 4. Tracing the waist and gaster.

Part 4 of 4. Tracing the hairs and adjusting their width profiles.

Illustrating ant heads

Two symmetric sides of head are moved and joined to become one full head.

Here’s a brief tutorial on my technique for tracing ants heads from specimen photographs using Adobe Illustrator (AI) CS5. If you aren’t very familiar with AI, the best thing you can do  is to read the AI help chapters on Drawing, Layers, and Selecting and Arranging objects. The bread and butter of AI is the pen tool, so make sure to read everything having to do with it. The pen tool is not particularly intuitive, and following whatever examples the help tutorials give will get you comfortable with paths and anchor points before diving into your first illustration. Also, mastering a few of the more common keyboard shorts for hand tool, pen tool, select, direct select, arrange, convert anchor points, etc. will save plenty of time in the long run. I’ll put shortcuts in parentheses throughout this post.

Step 1. Open the specimen photograph you plan to trace in AI. This will serve as your drawing template. Double click on the layer with the photo in the Layer Panel, and name the layer something like ‘Photo’ or ‘Specimen image’. Before closing the dialog box, also click the ‘Dim Images to’ box and put a number in between 80%-70%. Also, make sure you click the ‘Lock’ layer box. CS5 also has an option for selecting ‘Template’, which is a good idea, but not essential. When selecting your template image, look for ones with all the parts you plan to illustrate clearly showing (at least on one side of the face). For example, choose one with the full antennae showing (or at least all of one scape). Also, try for images that are positioned correctly. For example, notice on the Camponotus planatus specimen image I’m using, the right eye breaks the head outline while the left eye does not. Ideally, that discrepancy wouldn’t exist. Also, notice that the scapes block both the eyes. That’s one reason I like moving the antennal scapes down when I image my own specimens.

Specimen image of Camponotus planatus imported as a template layer into Adobe Illustrator

 

Step 2. Make a vertical guideline running down the middle of the face. To do this make sure the rulers are showing, then click and drag on the y-axis ruler to bring a guide out to where you need it. You can unlock the guide if you need to move it. If your specimen image is not perfectly level, unlock the photo template and rotate (r) the image until it is level, then lock it again.

Guideline running down the middle of the head.

Step 3. Create a new layer and call it something like ‘Face’.

Step 4. Draw the outline of one half of the face. For some reason, I always do the right side, perhaps because it is not obscured by the paper point. The drawing is all done using the pen tool (p). I like to draw with a 1 point stroke with rounded ends (both of which options are available in the Stroke Panel).

Start at the mid-point top at the top of the head. Drop an anchor point while holding Shift to keep the handles perpendicular to the guide, and drag the anchors out a bit towards the sides of the head. This technique keeps a nice natural curve across the head when the two halves are joined later.

Now drop your anchor point, remembering to draw out the anchor handles each time.  Drop as few anchor points as possible to make the most natural and smooth lines. You can adjust the curves as you go by using the direct select tool (a) and the convert anchor points tool (Shift+c). To continue your line, hover over the anchor point with your pen tool until you see the ‘/’ symbol, then click on it (or click and hold to draw out anchor handles).

 

Drawing the first curve.

 

Continue tracing along the outside of the face. If the eyes break the outline of the head, I just ignore them. I don’t include the mandibles until later in the process, preferring instead to follow the anterior margin of the clypeus until I hit the vertical guideline.

 

Step 5. Next I like to do the eyes. I use the Ellipse tool (L) while holding the Control button (to expand the ellipse from the midpoint) for the first rough approximation. Then I select the four anchor points with the direct select tool (A) and move them into place and make whatever other minor adjustments with anchor handles as necessary. Once I’m satisfied with the shape, I fill it with a gradient, then use the Gradient tool to approximate a 45 degree angle.

 

Drawing the eye using the Ellipse tool and Gradient tools.

 

Step 6. Next I draw whatever interior characters seem appropriate. In this case I do the median and lateral potions of the clypeus and the frontal carinae. For the frontal carinae, I’ve started experimenting with different width profiles available in the Stroke panel, and with the Width tool (Shift+W) to make my own custom profiles. This allows the line to taper quite elegantly.

Drawing interior characters such as the frontal carinae and the clypeus. Notice the fine tapering of the frontal carinae achieved by a custom width profile available in CS5.

 

Step 7. The antennae are next. In general, it is best practice in AI to draw complete closed shapes when possible. That’s what I do with the antennal condyle and torulus and whatever that part is that is basal to the condyle. Sometimes I’ll do all the antennal segments, but more often I’ll just do the scape and leave it at that.

Drawing the antennal scape.

 

Once I’ve outlined and closed all the shapes of the antennae, I fill them with white and arrange them forwards (Control+]) and backwards (Control+[) to get them in the right order.

Step 8. Rotate (R) the antennal scape to horizontal position. I usually group the parts that I want to rotate together. This is my personal preference, but many other illustrators seem to prefer the scape aimed towards the posterolateral corner of the head. Up to you!

Scape rotated to horizontal position. This keeps it from obstructing the face, but doesn't allow you to see how much it exceeds (if at all) the posterior margin of the head.

  

Step 9. Copy and flip your artwork. Select all your artwork, copy it, paste it to back (Control+B), and flip it across its vertical axis (Transform > Reflect).

Artwork is copied, pasted and flipped.

 

Step 10. Then, while the copy is all selected, drag it while holding down Shift (to keep it on the same axis) until the midpoints of the head line up exactly. Select pairing points where they meet at the midline with the direct select tool (A) and join them, each in turn. This is essential for when the shapes are filled with color.

Sometimes the outline will be narrower than the actual specimen image. When this happens, I select everything with the regular selection tool (V) then drag one of the sides out. This makes all the shapes wider proportionally, so it introduces a little discrepancy (of the eyes for example) in return for a more accurate head width.

Two symmetric sides of head are moved and joined to become one full head.

 

Step 11. Now I like to do the mandibles. I’ll do whichever is in front, then copy, paste and reflect it for the back one. Again, make sure to close the shape. Don’t worry about the inner margin overlapping the clypeus — that will get sorted out later.

Mandibles drawn as closed shapes.

 

Step 12. Hide the photo template layer.

Photo template layer is hidden. Notice the I also made a new layer for the scale bar.

 

Step 13. Fill in the head and mandibles with white (or a different color if you prefer). Then arrange different elements backwards and forwards within the layer to achieve the proper order.

Now you’re done! At this point you can adjust the artboard (CS5 only), add text, etc. If you want to add hairs, follow the directions of my illustrating ant hairs post.

All done!

Illustrating ant hairs

 

One of the most satisfying things to do when illustrating ants with Adobe Illustrator (AI) is to turn rather dull hairs into elegant tapered masterpieces. Hairs, or ‘setae’ as the traditionalists prefer, can be excellent characters for identification. For my introduced ant key, I need to come up with characters for distinguishing Camponotus planatus from Camponotus atriceps. I’ve coded both as having abundant long erect hairs on the head, mesosoma and gaster. But the quality of the hairs is different between these two. Those of C. planatus are stiff and thick, while those of C. atriceps are slender and flexuous. Here’s a quick post on how I drew the hairs for C. atriceps.

 

First thing was to import a photograph of C. atriceps from Antweb. I had to rotate it to the standard position where the back two coxae are level with each other.

Screenshot of Adobe Illustrator with specimen photo of C. atricpes placed as the first layer.

 

Next I created new layers for the head, mesosoma, waist and gaster, and drew the outlines using the Pen tool. I hope to post more on these basic steps of tracing specimen images in the near future.

The outlines of the specimen have been traced with the pen tool, and filled in with white.

 

Now I create a new layer for the hairs, and lock all of the other layers.

New 'hairs' layer is created and I zoom in a bit.

 

The next step is to trace the hairs. There are a few ways to do this, but the trick is to achieve a nice smooth curve. With hairs, I like to use the Pencil tool and trace on my x200 Thinkpad tablet. Before I had my tablet, though, I would probably stick with the Pen tool for these type of long flexuous hairs. If you do opt for the Pencil tool, make sure to double click on it and select a nice smoothness (I used 75%) and get rid of the ‘edit paths’ option for sure.

 

Hairs are traced using the Pencil tool with a tablet, but the Pen tool works well for these as well.

Once I’ve traced all the hairs on the profile outline, I hide the specimen photograph layer to see how it looks.

 

Here comes the cool part: making a new hair type.

  1. Use the pen tool to draw a straight line approximately as long as one of the longer hairs. Change the stroke to 0.25.
  2. Select the line and copy it (Control+C).
  3. Paste the line to the back (Control+B). This pastes the copy directly behind the original.
  4. Use the ‘Direct Select’ tool (A) and drag a selection box around the top two points (it looks like just one point because the copy is directly behind the original). Now join the two selected points. I do this by right clicking and selecting ‘Join’, but I’m sure there are other ways to get there.
  5. Again using the Direct Select tool, click on one of the bottom points. Use the arrow keys to move it a few pixels to the left. I changed the default keyboard increment (Edit > Preferences > General) to .001 in to have a bit more precision.
  6. Now select the other bottom point and move it an equal number of spaces to the right.
  7. Draw a line joining these two bottom points.
  8. Use the ‘Add anchor point’ tool (+) to drop an anchor point in the middle of this bottom line.
  9. Select the middle anchor point and move it down a few spaces. Click it and hold with the ‘Convert anchor points’ tool (Shift+C) to add a little curve to the bottom line.
  10. Fill the resulting polygon with black (or you could go for a gray if they are very light hairs if you want).
  11. Use the regular Selection tool (V) to select the whole object.
  12. Open the ‘Brushes’ window and create a new brush (lower right page icon in the window). Make it an Art Brush.
  13. Name the brush, and make sure the arrow is pointing upwards towards the pointy end (so long as you drew the hairs from the base to the tip). Save the brush library as ‘Ant Hairs’ or something like that. Sometimes if the following steps don’t work, I copy my hair to a new AI window and make a new brush. Some odd glitch or something, but sometimes it doesn’t save the brush correctly.
  14. Now select all your hairs. Easy way to do this is to make sure all the other layers are locked except for the hair layer, then do a ‘Select All’ command (Control+A). Click the new hair brush on the brush panel window, and voila. If the hairs are backwards, you may need to switch the way the arrow points in the brush options.

Lines rendered as hairs using my new C. atriceps hairs brush. Notice the fine tapering!

 

Now that you have the hair brush, you can paint hairs directly using the paintbrush tool. I find the paintbrush tool takes a lot longer, though, so I personally prefer using the pen or pencil tool, and then selecting all the strokes and converting them to brushstrokes with whichever ant hairs brush best suites the job.

How to improve Lucid3 thumbnails

One of the greatest assets of the Lucid3 software is its capacity to integrate thumbnails of images inserted for character states, features and taxa. Once you insert a full-size image as media, Lucid3 automatically generates a thumbnail. The default thumbnail size is 125×125 pixels, but the user can customize it in Lucid Builder. The resulting thumbnails, however, are rather low quality, and can be significantly improved by using a third party application. I use Picasa to generate my thumbnails, but I am sure there are many other programs that will do just as fine a job. So, here’s how I do it.

1. Locate your thumbnail folder in Key folder > Media > Thumbs. Remember not to change the names or structure of the files within the key folder, because this will have nasty consequences. Notice how all of the thumbnails have the “_TN.jpg” suffix appended to the filename.

2. Copy the ‘Thumbs’ folder to some safe holding space like the desktop to serve as a backup in case things go wrong.

3. Delete all of the images within the ‘Thumbs’ folder.

4. Open the application you plan to use for generating the new and improved thumbnails. In my case, I use Picasa.

5. Open the ‘Images’ folder (Key folder > Media > Images), select all the files, then export them to a new folder (e.g. ‘New Thumbnails’) as 125×125 pixel jpeg’s (or whatever size you’ve customized your key to use).

6.  Now we need to append the ‘_TN’ suffix to the new thumbnails. I use a program called ‘Bulk Rename Utility‘. Open the ‘New Thumbnails’ folder in Bulk Rename Utility. Select all the files. Type ‘_TN’ into the Suffix form of the Add box. Make sure all the files have “_TN.jpg” at the end of them in the ‘New Name’ column. Press ‘Rename’.

Bulk Rename Utility is used to append the '_TN' suffix to the new thumbnails.

 

7. Copy all the updated thumbnail files from the ‘New Thumbnails’ folder into the ‘Thumbs’ folder (Key folder > Media > Thumbs).

 

Original thumbnails generated by Lucid3

New thumbnails generated by Picasa

8. Reload your key in Builder and check for any missing thumbnails. If you find a missing thumbnail, check the file path in the media tab, and then search your ‘Thumbs’ folder for the same filename. Often I find that I need to insert a ‘_1’ before the ‘_TN’ because I’ve accidentally imported multiple copies of the same full size image into Builder, which then automatically appends the ‘_1’ to full size image in the ‘Images’ folder.

Well, the jpeg’s published here do not quite do justice to the difference in quality, but rest assured that replacing the original thumbnails with your own will dramatically improve the aesthetic and quality of your key’s media.

Making regional checklists for ants

I’m working with Evan Economo and one of his students on putting together a checklist for the ants of the Solomon Islands. I thought it would be a good opportunity to record my workflow in case I do one of these again, and in case someone else is looking to do a similar project.

The proximate goal of this exercise it to produce a species list for Antweb. Down the line though, we also want to publish the checklist to make it easier for future researchers to do a thorough survey of the Solomons, and also to help broaden the global knowledge of ant species distributions.

A checklist is all about the names. The names are coming from three primary pools: (1) specimens we collected in the field, (2) specimens we’ve examined in museum collections, and (3) species occurrences published in the literature.

To begin with, I download the example species list (Excel) that is available on Antweb. (It is also worth reading the accompanying documentation.)

It’s really only necessary to fill out the following columns: Subfamily, Genus, SpeciesName, Species Author Date. For a really solid checklist, though, it’s also nice to have the page number of the original description. For example “Emery, 1897: 581”. And remember, if the species was originally described under a genus different from the current one, the author and date go in parentheses “(Emery 1897): 581”.

Next, I insert a bunch of columns after ‘Species Author Date’ and label them, Source1, Source2, Source3, etc. These columns will serve to record what sources each species occurrence is drawn from.

I also add a new worksheet that I name ‘Sources’ which I use to compile the full citations for all the literature records, websites, etc. from which I will be pulling species occurrence records.

Antbase Distribution Database

A good way to generate a base list of species for a given country is the Antbase Distribution Database. This will generate a list of all species with type specimens from the country, in addition to an assortment of names retrieved from other online databases. Unfortunately, there is no way I know of to easily determine where these latter records come from. In order to verify them (and find records that HOL might have missed), we must use other online resources.

Hymenoptera Online (HOL)

The next names I add are from previous literature records. The most significant publication was Mann’s 1919 Ants of the Solomon Islands. In order to generate a species list from Mann (1919), I search for the author in Antbase.org, and then click the citation link. This takes me to the Hymenoptera Online (HOL) page for Mann (1919). The ‘Taxon citations’ window lists all the names reported in that publication, with links to the online citations for the original descriptions.

I then copy the list and paste it into a new worksheet labelled ‘Mann, 1919’. Since this is my first source, I add ‘Mann, 1919’ and the full citation to the ‘Sources’ worksheet.

Now it’s time to cross-check the master species list I’ve generated with the Mann (1919) list. If the name is already on my master list, I add ‘Mann, 1919’ next to it in the ‘Source1’ column. If the name is not on the master list, I add it in and mark the source.

CAUTION: it looks like the names in the HOL ‘Mann, 1919’ list include species Mann includes in some of his keys that do not occur in the Solomons. The only way to catch these discrepancies is to look at the publication, itself. So once again, there is no substitute for human eyeballs and original publications.

AntCat

Many of the names that appear in Mann (1919) have either been transferred to a different genus or have been synonymized with an older species name. This requires me to cross-reference each of Mann’s species names with the current nomenclature using AntCat (which is more up-to-date than HOL). I type the old name into the search box and see whether it is valid, has been transferred to another genus, or is a junior synonym or homonym of an older name. If these names correspond to valid names that are not already on my list, I add them in making sure to copy the species author (author of the original description) and date into the ‘Species Author Date’ field. As I mentioned before, I’m also including the page number of the species description.

FORMIS

Now for the obscure literature records. To find these I use FORMIS. As an Endnote user, I make sure I have the most recent edition of FORMIS and open the library. I’ll make a new ‘group’ on the lefthand sidebar called ‘Solomon Island records’. Then I’ll type ‘Solomon Is’ into the search box to hopefully get a list of all (or nearly all!) published ant literature that mentions the Solomon Islands in the title, abstract or keywords. If it is relevant, I’ll add it to the new ‘Solomon Island records’ group I made. For each relevant citation, I’ll make a new worksheet tab in my Excel workbook and rename it with the author-date.

References with species lists for the region

The easiest papers to mine are restricted to the Solomon Islands, and have a list of species separated by semicolons in the abstract or keywords. If this is the case, I copy the names to the appropriate Excel worksheet tab. I’ll use the ‘convert text to columns’ feature to make each name populate a different column in ‘Row 1’. Then I’ll select all the names and copy them to the clipboard. Next I click on Cell 2A and then use the ‘paste special’ feature and select ‘transpose’. Now all the names are on different rows. Delete Row 1.

Once again, these names need to be vetted with AntCat to make sure they are valid. If not, I change them to the valid name. If the name is new to my master list, I add it, making sure to fill in all the appropriate fields, including the ‘Source’ field.

Other references

Other references will require more thorough searching. Global or larger-scale geographic revisions are an example of this type. For these, I will try and get a pdf of the article. If it is an older one, I’ll use the ‘OCR text recognition’ feature available in Adobe Acrobat to convert the pdf images into readable text. Then I search the text for ‘Solomon’, to see which species were collected from the Solomon Islands. These, too, I will add as new names to the master list if they were not there already, or add the citation to a ‘Source’ column.

Bolton’s Catalog

Another resource for mining locality info is the PDF version of Bolton’s Catalog that is (as of this post) being periodically updated on the Global Ant Project site. By searching for ‘Solomon’ we can retrieve all species for which the Solomon Islands serves as the type locality.

Specimens we collected

The next names and records I incorporate into checklist are from specimens that we collected ourselves in 2008. We identified and compared these with type material and determined specimens at the USNM. Next to these names, I add ‘EMS/EPE, 2008’ in the appropriate ‘source’ column.

This project is on hiatus for awhile, but I hope to return to it in the near future, and will update this posting when I do!