Package: rubycond
RubycondPressure by Ruby Luminescence (PRL) software to determine pressure in diamond anvil cell experimentsInstallDownload and install Anaconda or Miniconda:Anacondahttps://docs.anaconda.com/anaconda/install/Minicondahttps://docs.anaconda.com/free/miniconda/miniconda-install/from anaconda prompt (windows) or terminal (Ubuntu & MAC) create a virtual environment with name "my_env":condacreate-nmy_envpipactivate the virtual environment withcondaactivatemy_envinstall rubycond with:pipinstallrubycondOPTIONAL: Install thepython-seabreezefor the Ocean Optics spectrometers:condainstall-cconda-forgeseabreeze
seabreeze_os_setuplaunch rubycond:rubycondShortcutIn windows the rubycond.exe can be found in the virtual environment Scripts folder, usually something like:C:\Users\username\anaconda3\envs\my_env\ScriptsC:\Users\username\miniconda\envs\my_env\ScriptsTo check where the virtual environment has been installed:condaenvlistManualOperating modesRubycondcan operate in two modes,ConnectedorStand Alone. If the parameter stand_alone in the the init file (Rubycond_init.txt) is set to False,Rubycondwill start inStand Alonemode. If the parameter stand_alone is set to True,Rubycondwill try to load the spectrometer drivers and start inConnectedmode. If an error occurs while opening the driver,Rubycondwill start inStand Alonemode.ConnectedmodeStand AlonemodeFit WindowA separate window that shows all the details of the fit resultsTab ShortcutsList of available shortcutsctrl + # = Select the # Tab

ctrl + z = Set Fit:Min as cursor
ctrl + x = Set Fit:Max as cursor
ctrl + c = Zoom to fit
ctrl + q = Rescale to full scale
ctrl + f = Fit snap
ctrl + g = Fit continuos

ctrl + r = Read file
ctrl + s = Save image
ctrl + v = Save fitTab CalcLet the user to perform simulations using different gauges, wavelenght, pressure and temperatures for Ruby and gauges, wavelenght and pressure for Samarium.Menus[!IMPORTANT]
All main program controls are performed by menus, shortcuts or menu activation via the Alt keyFileSave:warning: Not Available inStand AlonemodeSave the data in txt format, wavelenghts, intensity, plus all the accumulations if theMeasurement:Accumulationoption is selected. Save the header in rtf format, with a resume of the performed analisys. Save the main figure in png format.Save FitSave the data in txt format, wavelenghts, intensity, best fit (peak 1 , peak 2 and background if Double Function) plus all the accumulations if theMeasurement:Accumulationoption is selected. Save the header in rtf format, with a resume of the performed analisys. Save the main figure in png format.Open FileRead data from txt file, letting the user to select the x / first column units (nm or cm⁻¹)QuitQuit the main programGraphRescale YRescale the Y axisRescale XRescale the X axisRescale XYRescale the X and the Y axisRescale to Fitrescale to the selected fit range, seeFit:MinandFit:MaxX axis units nm cm⁻¹switch the Wavelenghts unit beetween nm and cm⁻¹Spectrometer :warning: Menu Not Available inStand AlonemodeModelShows the spectrometer model and serial numberUser CalibrationIf selected use the calibation saved in the init fileRubycond_init.txtasWavelengths(nm) = calibration_i + calibration_c1 *pixels+ calibration_c2 *pixels²+ calibration_c3 *pixels³Electronic DarkIf requested and supported the average value of electric dark pixels on the ccd of the spectrometer is subtracted from the measurements to remove the noise floor in the measurements caused by non optical noise sources (correct_dark_counts for HR4000)Take Backgroundsave the current acquisition as background referenceSubtract Backgroundsubstract the background reference from the current acquisitionCalibratelaunch the sub-routine Rubycond_calibratorMeasurement :warning: Menu Not Available inStand AlonemodeSnapperform a single acquisitionAcquirestart a nuos acquisitionInt Time (s)change the acquisition integration time in seconds, default value is 0.1 secondsAccumulationchange the number of accumulations, default value is 1GaugeThis menu allows to choose the gauge to be used and to change the default values for the reference wavelenghts and temperatures to be used both for Ruby and Samarium Sm²⁺:SrB₄O₇.Rubyλ₀ (nm) = 694.25P CalibrationShen 2020Mao hydro 1986Mao non hydro 1986Dewaele 2008Dorogokupets and Oganov 2007T(λ₀) (K) = 298T(λ) (K) = 298T CalibrationDatchi 2004Sm²⁺:SrB₄O₇λ₀ (nm) = 685.51P CalibrationRashchenko 2015Datchi 1997Fit[!IMPORTANT]
Fit are always performed to the data with Wavelenghts in cm⁻¹
Ifsigma_vary= False, whenVoightorDouble Voigtfunctions are selected the sigma corresponding to the gaussian component is fixed to the value ofsigma (cm-1)(See init fileRubycond_init.txt)Snapperform a single fitContinuosstart a continuos fitting routineFunctionVoigtGaussLorentzDouble VoigtDouble GaussDouble LorentzPoly Degreechange the polynomial degree up to 7Min NNNShow the fit range minimum value and let to change it.Enter valuelet the user to manually input the new value,Set NNNdirectly set the value NNN wher NNN is the actual cursor position showed by a dotted vertical line on the graph (left mouse click on the graph to change it)Max NNNShow the fit range minimum value and let to change it.Enter valuelet the user to manually input the new value,Set NNNdirectly set the value NNN wher NNN is the actual cursor position showed by a dotted vertical line on the graph (left mouse click on the graph to change it)Iter LimThe maximum number of iterations used in the minimization routine. The default value is 150AutoupdateIf not selected the Fit initial condition are automatically evaluated when the Fit range is changed (Fit:MinandFit:Max), so not taking in account eventual changement in the afterwards acquired signal.If selected the Fit results are used as the Fit initial condition in the next Fit.Clean GraphRemove the Fit plot from the graphLogger :warning: Menu Not Available inStand AlonemodeLogger ON/OFFTurn ON / OFF the log functionalityLogger Time (s)select the log save frequency in secondsLog Directoryshow the selected logging directory, can be changed during loggingLogger :warning: Not Available inStand AlonemodeThe logger will automatically create alog filein the log directory. A new file will be create if the log directory is changed. The filename format is:%y%m%d_%H%M%S.txt, i.e. 02 Jan 2024 12:03:04 => '240102_120304.txt'The logger will save3 filesfor each log using the format:%y%m%d_%H%M%S_header.rtfMain info of the measurement, including the fit results if the fit is selected%y%m%d_%H%M%S_img.pngImage as displayed on the software%y%m%d_%H%M%S_data.txtAll the data, including the fit results if the fit is selectedThe logger will add a line to thelog filewith the followingparameters:Beginning of the3 filesfilename (starting with %y%m%d_%H%M%S)Unix timeof the logMeasurement:Int Time (s)Measurement:AccumulationR1_centerR1_gammaR1_fwhmR2_center (if selected)R2_gamma (if selected)R2_fwhm (if selected)Fit:MinFit:MaxSelected Pressure Gauge (if selected)Selected Temperature Gauge (if selected)PressureTemperaureInit fileRubycond_init.txtIn windows the init file can be found in the virtual environment packages folder, usually something like:C:\Users\username\anaconda3\envs\my_env\Lib\site-packages\rubycondInit file example:[Settings]
stand_alone = False

[Spectrometer]
calibration_i = 1
calibration_c1 = 1
calibration_c2 = 0
calibration_c3 = 0
sigma_vary = False
sigma (cm-1) = 0.637Tested SpectrometersOcean Optics HR4000, based onpython-seabreezeContactYiuri Garinoyiuri.garino@cnrs.frCellule Projet@IMPMCLicenseRubycond: Pressure by Ruby Luminescence (PRL) software to determine pressure in diamond anvil cell experimentsCopyright (c) 2022-2023 Yiuri GarinoRubycond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.You should have received a copy of the GNU General Public License along with this program. If not, seehttps://www.gnu.org/licenses/.