The Materials System

class solcore.material_system.material_system.MaterialSystem(sources=None)[source]

The core class that manage the materials in solcore.

material(name, sopra=False)[source]

This function checks if the requested material exists and creates a class that contains its properties, assuming that the material does not exists in the database, yet.

Such class will serve as the base class for all the derived materials based on that SpecificMaterial. For example, N-type GaAs and P-type GaAs use the same SpecificMaterial, just with a different doping, and the happens with GaAs at 300K or 200K.

The derived materials based on a SpecificMaterial are instances of the SpecificMaterial class.

>>> GaAs = solcore.material('GaAs')      # The SpecificMaterial class
>>> n_GaAs = GaAs(Nd=1e23)               # Instance of the class
>>> p_GaAs = GaAs(Na=1e22)               # Another instance of GaAs with different doping
>>> AlGaAs = solcore.material('AlGaAs')  # The SpecificMaterial class
>>> AlGaAs_1 = AlGaAs(Al=0.3)            # Instance of the class. For compounds, the variable element MUST be present
>>> AlGaAs_2 = AlGaAs(Al=0.7, T=290)     # Different composition and T (the default is T=300K)

The material is created from the parameters in the parameter_system and the n and k.txt data if available. If the n and k.txt data does not exists - at all or for that composition - then n=1 and k.txt=0 at all wavelengths. Keep in mind that the available n and k.txt data is valid only at room temperature.

Parameters:
  • name – Name of the material
  • sopra – If a SOPRA material must be used, rather than the normal database material, in case both exist.
Returns:

A class of that material

parameterised_material(name)[source]

The function that actually creates the material class.

sopra_material(name)[source]

Creates an optical material fromt he SOPRA database.

class solcore.material_system.material_system.BaseMaterial(T, **kwargs)[source]

The solcore base material class

material_string = 'Unnamed'
composition = []
material_directory = None
k_path = None
n_path = None
strained = False
main_fraction = 0
load_n_data[source]
load_k_data[source]
n_interpolated(x)[source]
k_interpolated(x)[source]
get(parameter)[source]
alpha(wavelength)[source]
alphaE(energy)[source]
latex_string()[source]
plain_string()[source]
html_string()[source]
class solcore.material_system.critical_point_picker.CPPicker(directory)[source]

This class can be used to pick the critical points out of a collection of n and k curves for a range of compositions in ternary alloys. Later, this critical points can be used later to calculate the n and k data at any other intermediate composition.

>>> directory = '/InGaSb-Material/k.txt'
>>> pickerApp = CPPicker(directory)
>>> pickerApp.loop()
guess_fraction(file_name)[source]
gather_files()[source]
plot_a_curve(curve_id, background=False)[source]
setup_plot(keep_limits=False)[source]
plot_all(keep_limits=True)[source]
loop()[source]
onpick(event)[source]
onkey(event)[source]
save()[source]