September 11, 2021

Software for Raman mineral identification

At various times I have been fortunate enough to be able to use the Raman device at the University of Arizona mineralogy lab.

The end result of this is a spectrum, which is typically saved in CSV format. The machine will also save spectra in an undocumented "SPA" file format, which I have been able to partially learn how to decode.

Crystal Sleuth

This program was written in (of all things) fortran 90, back in 1993 based on comments in the source code. This program will run only on Windows. The code depends on some visual studio graphics libraries and perhaps has other Windows dependencies.

The program is available for free download:

Two links are provided. One has the humorous anachronism "recommended for dial-up users". This, if nothing else, should tell you how often this website is updated! You want the other link (labeled "CrystalSleuth precompiled"). The difference is only 68 versus 108 megabytes.

In September of 2021, I decided to try to install this on my Windows 10 machine. I downloaded the "precompiled" package (CSsetup_large.exe) and clicked on the download when it finished. It warns me that the publisher cannot be verified, then asks for my root/admin password in order to perform the install. It asks some basic questions, then begins unpacking a myriad of mineral spectra.

No new icons appear on my desktop. Typing crystalsleuth into the windows search entry does find and launch the program. The program identifies itself as the May 19, 2008 version. Poking around with the help screens, I am informed that this program requires Windows 2000, XP, or Vista. The download page states that this software was last updated in July of 2009, which may be when this May 19, 2008 version was placed on the web page.

I have not confirmed this, but there is a good chance that this program is the work of Thomas Laetsch, done while he was studying mineralogy under Bob Downs at the University of Arizona.

Run Crystal Sleuth

Ignoring the issue of setting up a handy short cut for now, we start it via the windows search menu. Using File Open has us looking in C:\Windows\System32 -- which is an unlikely place to find our spectra. I copy the above sample data file into my home directory (C:\Users\Tom), rename it to retain the "rruff" extension and then it is easy enough to use the file browser that CrystalSleuth "file open" yields to locate and open this file. I get a nice spectrum plotted in the CrystalSleuth window!

Clicking on "mode raman-search" gives me a busy spinning circle for a while, then a search dialog comes up. I don't get any kind of warning about needing to "compile" the search library. It has not actually performed the search! It is ready to do so when you click the search button. It tells me it has 5129 spectra available and some poking around indicates that these are stored at C:\CrystalSleuth\SearchRecords\RamanLib.

At this point the documentation in the "quick start" guide has come to an end. The online documents are now the best resource.

Start work on some new software

I decided to try writing a "replacement" for CrystalSleuth using the Python language. More about why, along with details at this link:

Where are the files?

Some day we will want to create a shortcut to start CrystalSleuth.

It looks like the CrystalSleuth install wizard just deposits all of the files in C:\CrystalSleuth. The executable is found here as crystalsleuth.exe. The reference spectra are found in C:\CrystalSleuth\SearchRecords\RamanLib. Alongside of this is C:\CrystalSleuth\SearchRecords\XrayLib, but that directory is empty.

How about a shortcut?

This turns out to be the easiest thing in the world. I click on the windows symbol in the very lower left corner of the screen. This brings up what I guess is called the "start menu". Since I have already found and started CrystalSleuth from this menu, it has an entry for it sitting right there in case I want to start it again soon. I use the left mouse button to select this icon and drag it to my desktop background and now I have a shortcut.

Just for the record, another way is to use a file manager (windows explorer?) to locate the file of interest. Then hold down the ALT key while dragging and dropping the file to the desktop background. Yes indeed, I am new to this windows stuff.


Feedback? Questions? Drop me a line!

Tom's Mineralogy Info / tom@mmto.org