Giter Club home page Giter Club logo

uvvistauc's Introduction

uvvistauc

DOI Vignette Shiny app

This R package calculates the optical band gap of semiconductors from UV-Vis spectra using Tauc plots.

Our Tauc fitting algorithm, animated

The Tauc plot is commonly used for semiconductors with either direct or indirect, forbidden or allowed, band gaps; such as oxides, sulfides, and many others.

A Tauc plot is usually performed manually, that is, the band edge region is identified visually, and then a linear fit to the linear part of the band edge is performed manually and the intersect with the abscissa is calculated to arrive at the optical band gap.

Here I have developed a semi-automatic algorithm, that only requires you to supply four x values: two values that define the mostly linear part on the low-energy side of the band edge, and two values that define the high-energy side of the band edge.

This algorithm returns the calculated optical band gap, the fitted Tauc line, as well as the adjusted R-square of the Tauc fit and its number of fitted data points.

Note that this package expects you to supply your UV-Vis data as absorbance (unitless) vs energy (in electronvolts).

So far, this package has only been tested for ZnO. If you use it with other materials, I would love it if you would let me know!

To learn more about how this package implements the Tauc algorithm, read the vignette.

This package also includes a dataset with a time-series of UV-Vis spectra from an experiment on growing colloidal ZnO nanoparticles.

Install this package

To use this package, install it directly from this repo:

install.packages("remotes")
remotes::install_github("solarchemist/uvvistauc")

If you encounter bugs or have questions please open an issue.

Develop this package

Check out the source code from this repo:

git clone https://github.com/solarchemist/uvvistauc.git

I suggest the following package rebuild procedure (in RStudio IDE):

  • Run devtools::check() (in the console or via the Build pane). Should complete with one note about "installed package size" being large and no warnings or errors (be warned, the step creating vignettes ... may take several minutes to finish):
── R CMD check results ───────────────────────────────────────────── uvvistauc 0.5.1.9000 ────
Duration: 6m 0.1s

❯ checking installed package size ... NOTE
    installed size is 10.0Mb
    sub-directories of 1Mb or more:
      doc    8.0Mb
      help   1.8Mb

0 errors ✔ | 0 warnings ✔ | 1 note ✖
  • Run devtools::build_vignettes() in the console. This recompiles the vignettes and populates the doc/ directory.
  • Manually remove the line doc from .gitignore (the build step keeps adding it).

Contributions welcome

If you would like to add another example dataset, or report errors in the code of offer improvements or any other contribution, you're very welcome. Feel free to contact me.

Citation

To cite uvvistauc in publications use:

Taha Ahmed (2022). The uvvistauc package: calculate optical band gap of semiconductors from UV-Vis spectra using the Tauc method. DOI: 10.5281/zenodo.5814054.

Or see the CITATION.cff (citation file format) file in this repo or in the sidebar.

uvvistauc's People

Contributors

solarchemist avatar

Stargazers

 avatar

Watchers

 avatar

uvvistauc's Issues

Suggestion: implement more automated fitting algorithm

From a discussion with a valued colleague, who raised the prospect of using different approach to the "band edge detection" part of the algorithm.

Instead of having the user specify bg.limits, could we implement a function that finds the linear fit that a) maximises the fitted number of points, while b) maximising some goodness-of-fit measure (the latter remains to be defined).
I think such an approach, if implemented naively, would result in a large computation penalty.

The major upside is the elimination of two (possibly four) of the six input parameters.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.