Mathematica script to fit solar spectra using a black-body spectrum taking into account molecular absorption of the Earth’s atmosphere.
When citing this work, please refer to: M. H. Futscher, B. Ehrler, Efficiency Limit of Perovskite/Si Tandem Solar Cells. ACS Energy Lett. 2016, 1, 863-868, DOI: 10.1021/acsenergylett.6b00405
Download the file fitting_procedure.nb and the ASTM G173-03 Reference Spectra (ASTMG173.xls) and include these files in the directory where you are performing the analysis. Open the file fitting_procedure.nb with Wolfram Mathematica and evaluate the notebook.
Feel free to use and modify the code, but do so at your own risk.