Skip to content

Data analysis and visualisation of energy band gap from reflectance spectra of solid semiconducting materials

Notifications You must be signed in to change notification settings

gadoseb/Streamlit-BandGap-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Band Gap Calculation using Tauc Plot

This web application allows users to calculate the band gap of semiconductors using reflectance data via the Tauc plot method. The app is built with Streamlit and provides an interactive interface to upload data, visualise spectra, and perform band gap calculations.

Link to the App

Features

  • Data Upload: Upload reflectance data in CSV, XLSX, or TXT format.
  • Experiement Selection: Transmittance or Reflectance data. Direct or Indirect Band Gap calculation
  • Wavelength Range Slider: Select the wavelength range for calculations and plots.
  • Transmittance Spectrum: Visualize or calculate the transmittance spectrum of the uploaded data.
  • Reflectance Spectrum: Visualize or calculate the reflectance spectrum of the uploaded data.
  • Absorbance Spectrum: Calculate and display the absorbance spectrum using the inverse Kubelka-Munk transformation.
  • Tauc Plot: Generate the Tauc plot for direct and indirect transitions.
  • Band Gap Calculation: Perform a linear fit on a selected range of the Tauc plot to calculate the band gap energy.
  • Data Export: Export the calculated data (Tauc plot values, linear fit results, and estimated band gap) to CSV file.
  • Automatic Linear Region Detector [Beta]: Estimate band gap automatically and display fit quality metrics.
  • Quick and Dirty Literature Review [Beta]: Perform a literature review about the material under investigation. The band gap is shown only for open-source journals with a webpage view.

Demo

streamlit-test_bandgap-2024-09-26-17-09-17.1.mp4

Usage

  1. Launch the Streamlit app.
  2. Upload your data in CSV, XLSX, or TXT format.
  3. Select the columns representing wavelength and signal.
  4. Select the data range to be used.
  5. Visualize the spectra.
  6. Generate the Tauc Plot and select the range for the linear fit.
  7. The band gap energy is calculated and displayed on the screen.
  8. Export the results as CSV.

File Formats

The app supports the following file formats for data upload:

  • CSV: Comma-separated values.
  • XLSX: Microsoft Excel files.
  • TXT: Tab-delimited text files.

Exported Data

The data exported in CSV formats include the following:

  • Wavelength (nm)
  • Reflectance
  • Absorbance
  • Transmittance
  • Photon Energy (eV)
  • Tauc Plot Values
  • Fitted Photon Energy (eV) for the linear fit
  • Fitted Tauc Plot Values for the linear fit
  • Estimated Band Gap (eV)

Example

  • Upload Data: Upload a CSV file with columns for wavelength (in nm) and reflectance.
  • Visualization: The app will display reflectance, absorbance spectra, and Tauc plot.
  • Calculation: A linear fit will be performed in the selected region of the Tauc plot to estimate the band gap.
  • Download: Download CSV file of the calculated values.
  • Quick and Dirty Literature Review: Perform a quick literature review on your material without changing the webpage!

Dependencies

The following Python packages are required:

  • streamlit==1.38.0
  • pandas>=1.3.0
  • numpy>=1.21.0
  • matplotlib>=3.4.0
  • scipy>=1.7.0
  • requests>=2.26.0
  • beautifulsoup4>=4.10.0
  • openpyxl

How Tauc Plot works

The Tauc plot is used to estimate the optical band gap energy of semiconductors. It is based on the following equation for direct transitions:

$$ (\alpha h \nu)^2 = A(h \nu - E_g) $$

Where:

  • ( \alpha ) is the absorption coefficient (approximated using Kubelka-Munk function).
  • ( h \nu ) is the photon energy (in electron volts, eV).
  • ( E_g ) is the band gap energy.
  • ( A ) is a constant.

For indirect transitions, the equation becomes:

$$ (\alpha h \nu)^{1/2} = A(h \nu - E_g) $$

The linear region of the Tauc plot is used to extrapolate the band gap.

About

Data analysis and visualisation of energy band gap from reflectance spectra of solid semiconducting materials

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages