April 3, 2023

Raman utility - work resumed in 2023

The first order of business is simply to get back on the horse and ride what I did back in 2021 (which was not all that much). Here is a sort of declaration of goals and methods: I suspect this will end up "just working" on Mac given the portable nature of python and the wx widget set. I will do most of my development on linux, but I do have a machine running Windows 10 with python installed. You get the Tk gui toolkit with python as a built in feature, but wx may require a package to be installed. Packages to install wxPython on Mac are available.

My work in 2021 was with Tk. I placed this in my Github repository:

Using the "locate" command on my linux system, I find my local files at:
/u1/Projects/Sleuth/new/raman.py
When I run this, I get a tidy window showing the Raman spectrum of Calcite, which is what I remembered and hoped for. I also have a file "raman2.py" which offers me a menu of all files in the Raman data set. When I select one, it plots it, just as it did the Calcite. So even though this is not in the Github collection it probably represents the last work I did (on October 15, 2021).

What about on Windows? I find a "Raman" directory under c:/users/tom and it has a .git file showing that I am/was using Git to synchronize between my linux and windows systems. I fire up a command prompt and type "python raman.py" and it works!

A peek at the source code shows me that the python code detects whether it is running on linux or windows and sets a variable to give the path of the Raman library. On linux it is in /home/tom/RamanLib. On windows it takes it from where Crystal Sleuth put it, namely:

\CrystalSleuth\SearchRecords\RamanLib
I can simply type git commands (such as "git status") in the command prompt window, though I remember having a bash shell back in 2021. I can search for "Git bash" and indeed there is such a thing, so I can work with a bash shell in Windows. I ditched the desktop icon for this (along with every other desktop icon I could find), but I should add this to my start menu.

If I launch python and type "import wx", we do not have the wx widgets so that will be a topic for the next page.


Feedback? Questions? Drop me a line!

Tom's Mineralogy Info / tom@mmto.org