C:\CrystalSleuth\searchrecords\ramanlibI now want to get a copy of all these on my linux machine. On my home network, my linux machine is "trona", and I can use "scp" to copy the files from window to linux. First I start an ssh server on the linux machine. I also make a directory "RamanLib" to receive them.
cd /c/crystalsleuth/searchrecords/ramanlib scp * tom@trona:RamanLib
This does the trick, and 5133 files get copied. 5129 of these files are reference spectra with file extension ".txt". These are in fact CSV files, with a 4 line header section which is flagged by double hash marks like so:
##NAMES=Epidote ##LOCALITY=Jebel Shacro, Morocco ##RRUFFID=R070205 ##CHEMISTRY=Ca_2_Fe^3+^Al_2_(Si_2_O_7_)(SiO_4_)O(OH)
There are also 4 files with a ".rsf" extension.
RamanSearchFileFast.rsf RamanSearchFileSlow.rsf RamanSearchNameInfo.rsf RamanSearchNameList.rsf
I believe that ".rsf" stands for "Raman Search File". These are the files that are generated by the Crystal Sleuth "compile" process.
Note that the copy yields files with a CR-LF at the end of each line in the Windows tradition. Linux of course expects only a LF. I could write a script to run the command:
tr -d '\r' old.txt > new.txt.However, I am reading them in Python using the numpy "genfromtxt" routine, which apparently swallows the extra CR just fine (as well as skipping lines with initial # as comments). So I don't actually need to do anything, and I don't
Tom's Mineralogy Info / tom@mmto.org