Skip to content

stb-convdos

DOS Processor (Convolution) · menu code 2.3 · guide: 2.3 DOS Processor (Convolution)

usage: stb-convdos [-h] (--file INPUT_FILE | --dir INPUT_DIR)
                   (--sigma SIGMA | --fwhm FWHM) [--size SIZE] [--out OUTFILE]
                   [-o OUTPUT_DIR] [--no-plot] [-v] [--no-intro]

Apply Gaussian convolution to broaden a DOS file's columns.

options:
  -h, --help            show this help message and exit
  --file INPUT_FILE     Input DOS file: whitespace-separated columns, energy first. Requires --out. Alternative to --dir.
  --dir INPUT_DIR       Recursively broaden every *.dat file found under this directory (e.g. a stb-dos output folder: dos_total.dat + dos_per_atom/*.dat + dos_per_species/*.dat) with the same --sigma/--fwhm/--size. Each file is written under --output-dir preserving its relative path and filename -- a broadened mirror of the whole input tree. A file that fails validation is skipped with a warning, not fatal to the rest of the batch. Alternative to --file.
  --sigma SIGMA         Gaussian broadening standard deviation, in meV. Converted internally to grid samples using each input file's own energy spacing, so the same --sigma gives the same physical broadening regardless of how densely a file is sampled. Must be positive. Alternative to --fwhm.
  --fwhm FWHM           Gaussian broadening full width at half maximum, in meV (FWHM = 2.3548 * sigma) -- the width more commonly quoted in spectroscopy/DOS literature. Must be positive. Alternative to --sigma.
  --size SIZE           Gaussian kernel width, in samples. Optional -- by default sized automatically from --sigma/--fwhm to cover about 3 standard deviations on each side. Must be a positive odd number if given explicitly (an even size shifts the filtered curve by half a bin, since it has no single center sample).
  --out OUTFILE         Output file for the filtered data. Required with --file, invalid with --dir.
  -o OUTPUT_DIR, --output-dir OUTPUT_DIR
                        Root of the broadened output tree for --dir (default: '<dir>_filtered', a sibling directory). Invalid with --file (use --out there).
  --no-plot             Skip the before/after plot (all columns are still filtered and written). With --dir, only the first processed file is ever plotted regardless of this flag's default; --no-plot turns that single plot off too.
  -v, --version         show program's version number and exit
  --no-intro            Do not show the introduction

Example usage:
  stb-convdos --file dos_total.dat --sigma 50 --out dos_filtered.dat
  stb-convdos --file dos_total.dat --fwhm 100 --size 41 --out dos_filtered.dat --no-plot
  stb-convdos --dir dos_output/ --sigma 50 --output-dir dos_output_filtered/