stb-ramanAnalysis¶
Stage 3 - Analysis of the 5.11 Raman Spectrum workflow · menu code 5.11.3
usage: stb-ramanAnalysis [-h] [-dir DIRECTORY] [-l LABEL] [--file FILE]
[--linewidth LINEWIDTH] [--temperature K] [-o OUTPUT]
[--experimental FILE] [--peak-prominence FRACTION]
[--save-gnuplot] [--view] [-v] [--no-intro]
Stage 3 of 3: analyzes a stb-ramanModes Optical-calculation sweep and computes the Raman spectrum.
Reads each mode's folders (+/-delta x, y, z, and, if stb-ramanModes was run
with --full-tensor, also the (x+y)/sqrt(2), (x+z)/sqrt(2), (y+z)/sqrt(2)
mixed directions), extracts the imaginary part of the dielectric function
from SystemLabel.EPSIMG, obtains the static dielectric constant via a
Kramers-Kronig transform (core/dielectric.py), and takes a central finite
difference across +/-delta to get the Raman tensor per mode. Auto-detects
per mode whether the full symmetric tensor (Rxx, Ryy, Rzz, Rxy, Rxz, Ryz)
or just the diagonal (Rxx, Ryy, Rzz) is available from the folders Stage 2
actually wrote -- the full tensor gives the EXACT literature Raman-activity
invariant (45a'^2+7gamma'^2); diagonal-only gives an APPROXIMATION missing
the off-diagonal anisotropy contribution. Writes a Lorentzian-summed
spectrum (.dat/.gplot).
options:
-h, --help show this help message and exit
-dir DIRECTORY, --directory DIRECTORY
Root directory written by stb-raman/stb-ramanModes (default: raman_study).
-l LABEL, --label LABEL
SystemLabel used in Stage 2's Optical calc.fdf (default: auto-detected).
--file FILE SIESTA output filename inside each mode_*/ folder (default: calc.out).
--linewidth LINEWIDTH
Lorentzian linewidth (cm^-1) for the summed spectrum (default: 10.0).
--temperature K Weight each mode's spectrum contribution by the Stokes Bose-Einstein thermal population factor (n+1) at this temperature (Kelvin). Default: no weighting (every mode contributes by its raw activity alone, as before this option existed).
-o OUTPUT, --output OUTPUT
Base filename (no extension) for the spectrum .dat/.gplot pair (default: raman_spectrum), written under '<directory>/plot/' -- only relevant with --save-gnuplot.
--experimental FILE Overlay a measured Raman spectrum (2-column text file: frequency cm^-1, intensity) on the simulated one, and report a nearest-neighbor peak match (simulated vs. experimental peak positions, one row per experimental peak). Plotted on a separate y-axis (simulated 'activity' and real intensity aren't on the same scale).
--peak-prominence FRACTION
Minimum peak prominence, as a fraction of that spectrum's own max intensity, for --experimental's peak-finding (default: 0.01 -- filters out sub-1% noise bumps in both spectra).
--save-gnuplot Also save the spectrum (and, with --experimental, the overlaid measured spectrum) as gnuplot .dat + .gplot scripts, under '<directory>/plot/'. Off by default.
--view View the Raman spectrum (and, with --experimental, the overlaid measured spectrum on a second y-axis) interactively via matplotlib now. Off by default. Needs a display. Independent of --save-gnuplot -- matplotlib here is only an on-screen preview, never written to disk.
-v, --version show program's version number and exit
--no-intro Do not show the introduction
Usage example:
stb-ramanAnalysis --directory raman_study