ldwillia / SL3ME

A Python3 implementation of the Spectroscopic Limited Maximum Efficiency (SLME) analysis of solar absorbers
GNU General Public License v3.0
28 stars 14 forks source link

Execution procedure for SL3ME #2

Open kcbhamu opened 3 years ago

kcbhamu commented 3 years ago

I could run it for Wien2k data. I have prepared a file optical (absorption) data and name the file as mock_CdTe_mat_abs.dat and kept that attached am1.5G.dat in the same folder. I used data in the mock_CdTe_mat_abs.dat file into meter inverse. Then I updated the bandgap in these two lines.

material_direct_allowed_gap = 1.797 # material_indirect_gap = 1.797 #

and then executed it as python SL3ME.py.

Could you please confirm whether I am executing it in the right way or I am missing something?

ldwillia commented 2 years ago

Hello! Apologies for the incredibly late response; I never saw this issue get opened due to email settings.

You can run it as a script as you have described (renaming any material absorbance data file to mock_CdTe_mat_abs.dat and changing the material_direct_allowed_gap and material_indirect_gap lines in the "if name == ' main' " section to match your material).

It is designed primarily to be used as a library though. You can bring the SLME calculation function into any python instance with: "from SL3ME import calculate_SLME" (If you get an error about the SL3ME module not being found, make sure to add its location to your PYTHONPATH variable.)

The code in the "if name == ' main' " section is an example showing how to load a datafile and call the calculate_SLME function, as well as how to make a plot graphing the SLME for a material vs. the thickness of the material. This is what runs when you execute the command "python SL3ME.py". However, the imported calculate_SLME function can be used in any python workflow however you wish.

I hope this helps! Let me know if you have additional questions.

kcbhamu commented 2 years ago

Thanks for your response. It was helpful. Is it possible to print the data in a data file with respect to the temperature and thickness of the sample?