Skip to content

kimrojas/Analyze_THz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Analyze_THz

Analyzes the THz output and prepares an intensity mesh

Getting started

To get started, download the executables here

In Windows,

  1. Edit the settings.txt based on your needs. More information on settings
  2. Make sure the executable and "settings.txt" is in the same folder.
  3. For windows, double-click the program.

In Mac OS,

  1. There is no executable for Mac OS. Follow the compilation guide.
  2. Edit the settings.txt based on your needs. More information on settings
  3. Make sure the executable and "settings.txt" is in the same folder.
  4. Double-click the program or when using a terminal, you can use ./Analyze_THz command

Settings

In order to use the program, you will need to provide a "settings.txt" input file.

Template

settings.txt for fft analysis

data_path = ./data
data_method= fft
freq_method = sampling
freq_arg = 2 8 10
id = ceramic2_wav
save_raw =True
verbose = True

settings.txt for peak analysis

data_path = ./data
data_method= peak
id = ceramic2_wav
save_raw =True
verbose = True

Tag information

data_path

  • The data path of the data.
  • Does not accept the space character.

data_method

  • The processing method for the data.
  • ACCEPTED VALUES: fft , peak

freq_method and freq_arg [fft required]

  • The method of producing frequency list.
  • freq_method ACCEPTED VALUES: single , sampling , interval
    • For single - manually / individually supply the requested frequencies in freq_arg.
    • For sampling - The list of requested frequency is produced via
      numpy.linspace(start=freq_arg[0], end=freq_arg[1], num=freq_arg[2])
    • For interval - The list of requested frequency is produced via
      numpy.arange(start=freq_arg[0], end=freq_arg[1], step=freq_arg[2])

id

  • The string to identify the data filenames to be processed.
  • NO SPACES

save_raw

  • Setting to save the transformed datasets.
  • ACCEPTED VALUES: True , False

verbose

  • Setting to maximize output in terminal.
  • ACCEPTED VALUES: True , False

Outputs

For fft analysis

  1. fft-transformed dataset in analysis_output/trans_data/
  2. Final intensity dataset (in x-y space) for each frequency in analysis_output/main_data/
  3. The Final dataset filenames have its mapping to chosen frequency in Freq_Filnames.dat

For peak analysis

  1. Final intensity dataset (in x-y space) for peak-to-peak data in analysis_output/main_data/
  2. Final intensity dataset with data interpolation analysis_output/main_data/
    Note: The interpolation is done using scipy.ndimage.zoom subroutine. The order in thisd function can be 0-5.
    The interpolation is based on spline method. order = 0 is nearest neighbor, order = 1 is Bilinear, and higher order spline corresponds to higher order derivatives.
    See more information on spline orders here

Compilation guide

Create environment

Note: Do not use conda to download packages as it creates a large executable (a known issue).

conda create --name thz
conda activate thz
conda install -c conda-forge pip python=3.7
pip install numpy pyinstaller tqdm scipy

Compile

pyinstaller --clean --onefile -i icon.ico --name Analyze_THz main.py

Executable

The executable can be found in dist/

About

- Source code and excecutables for analyzing THz datasets

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages