Skip to content

SW Calculator is a desktop app that calculates S and W parameters of the doppler spectrum of annihilation radiation. Software estimates electron binding energies and Fermi energy for metals.

License

Notifications You must be signed in to change notification settings

petrstepanov/sw-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SW Calculator

Program calculates S and W parameters of the 511 annihilation peak of the annihilation radiation. It is possible to estimate the binding electron energies by fitting the CDB spectrum with the contributions from e+ annihilation on electrons with different wave functions. Electrons from conduction band contribute into the spectrum as an inverted parabola. Upon the shape of the parabola we calculate Fermi energy. Check our research group website SelimLab.

SW Calculator desktop application

Application is written in C++ with CERN ROOT libraries and GUI. In order to run the app first we need to install ROOT libraries. Unfortunately it is impossible to do static link your applications object files with the ROOT libraries as well as build their static versions. Moreover, sometimes source headers should be available at runtime.

Currently it is possible to run application either on macOS or Linux. I will try to compile the windows binary whenever the native Windows ROOT 6 build will be released.

Installation on Windows

Prerequisites

  1. Download and run Visual Studio Build Tools.
  2. Install the "Desktop development with C++" package and install it with default components.
  3. Download and install ROOT release for Windows. Use Windows Visual Studio 2022 64-bit x64 executable from the latest release page. During the installation ensure ROOT environment is added to the system PATH.
  4. ROOT releases not necessarily includes the Fourier Transform library (FFTW). Download it here. Use x64 version. Unpack and copy the libfftw3-3.dll to ROOT's bin folder, e.g. C:\root_v6.##.##\bin.
  5. Above FFTW library is linked to ROOT's libFFTW.dll and should be renamed correctly. Rename libfftw3-3.dll to fftw3-3.dll.
  6. Optional. To ensure the correct name for the FFTW library, open ROOT's libFFTW.dll in Dependency Walker program. The correct name for the FFTW library will be listed as a missing dependency in the top-right panel.

Compilation

  1. Download and extract the program source code (green button on the top of this page).
  2. Open Developer Command Prompt from the Start menu.
  3. In the Command Prompt navigate to extracted program folder, e.g. cd C:\Users\<your-user>\Downloads\sw-calculator.
  4. Run .\install.bat.

Execution

Find and run swcalculator.exe in your ROOT bin folder, e.g. C:\root-v.6.##.##\bin\swcalculator.exe.

Technical Note

FFTW library can always be compiled and installed manually with CMake and MSBuild.

Installation on Windows 10 with WSL

  1. Install Ubuntu linux inside Windows Subsystem for Linux (WSL) as described here.
  2. Open Start → Ubuntu to launch linux Terminal. Proceed with Installation on Linux below.

Installation on Linux or macOS

Install CERN ROOT on your system. Refer to official install page for more details.

Open Terminal and clone program source files in your home folder:

cd
git clone https://github.com/petrstepanov/sw-calculator
cd sw-calculator

Check program dependencies and create native makefile with CMake. Finally build and install. System will ask for your password to install the app.

cmake ./
make
sudo make install

On linux you can install application launcher:

make install-launcher

To install app launcher on macOS run package resources/sw-calculator.pkg.

Program source files are not needed any more and can be removed from your computer:

rm -rf ~/sw-calculator

Running program

Find application in the system menu. Alternatively, open Termnal and type sw-calculator to launch the program.


Shoot me an email with feedback or questions: stepanovps@gmail.com

About

SW Calculator is a desktop app that calculates S and W parameters of the doppler spectrum of annihilation radiation. Software estimates electron binding energies and Fermi energy for metals.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published