EQFLUX
This code is taken almost line for line from the JPL GaAs Solar Cell Radiation Handbook. The handbook publishes the FORTRAN code for EQGAFLUX. EQGAFLUX takes RDC data, glass range tables for protons and electrons, GaAs stopping table, and an input space environment particle spectrum to determine the 1 MeV equivalent electron fluence. This module takes that original FORTRAN code and replicates it line for line in python code.
- solarpy.eqflux.EQFLUX.compute_equivalent_fluence_for_electrons(relative_damage_coefficients_electrons, electron_integral_particle_spectrum, nstep=2)
Calculates the total 1 MeV electron fluence for a given integral electron particle spectrum and relative damage coefficients. The function is almost a line for line translation of the JPL EQGAFLUX FORTRAN program in the GaAs Solar Cell Radiation Handbook
- Parameters:
relative_damage_coefficients_electrons (ndarray) – 2d array where column 0 contains the particle energies and column 1 contains the relative damage coefficients for electrons
electron_integral_particle_spectrum (ndarray) – 2d array of the integral electron particle spectrum where column 0 is the electron particle energy and column 1 is the integral fluence. The integral particle spectrum is typically obtained using radiation enviroment models such as Ae8/Ap8 and Ae9/Ap9
nstep (int) – The integration fineness and is typically 2
- Returns:
Total 1 MeV electron fluence
- solarpy.eqflux.EQFLUX.compute_equivalent_fluence_for_protons(relative_damage_coefficients_protons, proton_integral_particle_spectrum, nstep=2)
Calculates the total 1 MeV electron fluence for a given integral electron particle spectrum and relative damage coefficients. The function is almost a line for line translation of the JPL EQGAFLUX FORTRAN program in the GaAs Solar Cell Radiation Handbook
- Parameters:
relative_damage_coefficients_protons (ndarray) – 2d array where column 0 contains the particle energies and column 1 contains the relative damage coefficients for protons
proton_integral_particle_spectrum (ndarray) – 2d array of the integral proton particle spectrum where column 0 is the proton particle energy and column 1 is the integral fluence. The integral particle spectrum is typically obtained using radiation enviroment models such as Ae8/Ap8 and Ae9/Ap9
nstep (int) – The integration fineness and is typically 2
- Returns:
Total 1 MeV electron fluence
- solarpy.eqflux.EQFLUX.get_log_electron_integral_spectrum(electron_integral_particle_spectrum)
Generates the electron particle energy vs ln(fluence) spectrum of the integral particle spectrum in accordance with the JPL EQGAFLUX FORTRAN program as described in the GaAs Solar Cell Radiation Handbook
- Parameters:
electron_integral_particle_spectrum (ndarray) – 2d array of the integral electron particle spectrum where column 0 is the electron particle energy and column 1 is the integral fluence. The integral particle spectrum is typically obtained using radiation enviroment models such as Ae8/Ap8 and Ae9/Ap9
- Returns:
2d ndarray of the electron particle energy (column 0) vs ln(fluence) (column 1)
- solarpy.eqflux.EQFLUX.get_loglog_proton_integral_spectrum(proton_integral_particle_spectrum)
Generates the ln(proton particle energy) vs ln(fluence) spectrum of the integral particle spectrum in accordance with the JPL EQGAFLUX FORTRAN program as described in the GaAs Solar Cell Radiation Handbook
- Parameters:
proton_integral_particle_spectrum (ndarray) – 2d array of the integral proton particle spectrum where column 0 is the proton particle energy and column 1 is the integral fluence. The integral particle spectrum is typically obtained using radiation enviroment models such as Ae8/Ap8 and Ae9/Ap9
- Returns:
2d ndarray of the ln(proton particle energy) (column 0) vs ln(fluence) (column 1)
- solarpy.eqflux.EQFLUX.get_loglog_rdc(relative_damage_coefficients)
Generates the ln(particle energy) vs ln(relative damage coefficient) spectrum for a give relative damage coefficient spectrum in accordance with the JPL EQGAFLUX FORTRAN program as described in the GaAs Solar Cell Radiation Handbook
- Parameters:
relative_damage_coefficients (ndarray) – 2d array where column 0 contains the particle energies and column 1 contains the relative damage coefficients
- Returns:
2d ndarray of the ln(particle energy) (column 0) vs ln(relative damage coefficient) (column 1)
degradation_equations
A set of what is know as the degradation equation as described in the JPL Solar Cell and GaAs Solar Cell Handbook. The equation is used to fit, interpolate, and extrapolate solar cell radiation degrdation data to generate relative damage coefficients as well as displacement damage dose curves. These equations have been empirically determined to best approximate radiation degradation data, but they do not always fit well. This is an active area to determine the best way to relate solar cell radiation degradation to fundamental physics that govern solar cell degradatio due to radiation
- solarpy.degradation_equations.degradation_equation(fluence_ddd, C, phi_D_x)
Degradation equation as defined by the Solar Cell and GaAs Solar Cell Radiation Handbooks (1 - C * np.log10(1 + (fluence / phi_x))). The same equation is used for displacement damage dose curves
- Parameters:
fluence_ddd (ndarray) – 1d numpy array of fluences or displacement damage dose
C (float) – Constant that is determined through fitting
phi_D_x (float) – Fluence or displacement damage dose constant that is determined through fitting
- Returns:
1d array of calculated remaining factors
- solarpy.degradation_equations.degradation_equation_rf_greater_than_one(fluence_ddd, A, C, phi_D_x)
Degradation equation for determining remaining factor as a function of displacement damage dose. The 1 in the degradation equation is replaced with a fitting parameter (A) to account for values above one. This should not be used because it assumes that the remaining factors can be greater than beginning of life. It is in included as a reference to previous literature.
- Parameters:
fluence_ddd (ndarray) – 1d numpy array of fluences or displacement damage dose
A (float) – Constant that is determined from fitting to account for remaining factors greater than 1
C (float) – Constant that is determined through fitting
phi_D_x (float) – Fluence or displacement damage dose constant that is determined through fitting
- Returns:
1d array of calculated remaining factors
- class solarpy.degradation_equations.doubleDegradationEquation(fluence_vs_remaining_factor, zero_fit='n')
Bases:
object
- fit(parameters=None)
- getFluence(remaining_factor)
- getRemainingFactor(fluence)
- solarpy.degradation_equations.double_degradation_equation(fluence_ddd, C1, phi_D_x1, C2, phi_D_x2)
Combines two of the single degradation equation (1 - (C1 * np.log10(1 + (fluence / phi_x1))) - (C2 * np.log10(1 + (fluence / phi_x2)))) in an effort to alleviate the assumption that there are two components degrading. Can fit more complex solar cell degradation better, but may not always be the aright approach as as it is an assumption that there are two mechanisms behaving similarly
- Parameters:
fluence_ddd (ndarray) – 1d numpy array of fluences or displacement damage dose
C1 (float) – Constant that is determined through fitting for first degradation equation
phi_D_x1 (float) – Fluence or displacement damage dose constant that is determined through fitting
C2 (float) – Constant that is determined through fitting for first degradation equation
phi_D_x2 (float) – Fluence or displacement damage dose constant that is determined through fitting
- Returns:
1d array of calculated remaining factors
- solarpy.degradation_equations.double_degradation_equation_rf_greater_than_one(fluence_ddd, A, C1, phi_D_x1, C2, phi_D_x2)
Combines two of the single degradation equation (A - (C1 * np.log10(1 + (fluence / phi_x1))) - (C2 * np.log10(1 + (fluence / phi_x2)))) in an effort to alleviate the assumption that there are two components degrading. Can fit more complex solar cell degradation better, but may not always be the aright approach as as it is an assumption that there are two mechanisms behaving similarly
- Parameters:
fluence_ddd (ndarray) – 1d numpy array of fluences or displacement damage dose
C1 (float) – Constant that is determined through fitting for first degradation equation
phi_D_x1 (float) – Fluence or displacement damage dose constant that is determined through fitting
C2 (float) – Constant that is determined through fitting for first degradation equation
phi_D_x2 (float) – Fluence or displacement damage dose constant that is determined through fitting
- Returns:
1d array of calculated remaining factors
- solarpy.degradation_equations.errorFunctionDegradationEquation(p, fluence_ddd, remaining_factor)
- solarpy.degradation_equations.errorFunctionDoubleDegradationEquation(p, fluence, remainingFactor)
- solarpy.degradation_equations.error_function_degradation_equation_rf_greater_than_one(p, fluence_ddd, remaining_factor)
- solarpy.degradation_equations.fit_degradation_equation(fluence_or_ddd_vs_remaining_factor, parameters=None)
Given the displacement damage dose or fluence vs remaining factor, the data is fit using the Nelder-Mead method to arrive at the best fit for C and phi_D_x for the degradation equation. The data is fit by minimizing the error function to the root mean squared error (RMSE). This is done because it gives lower chi squared values and r squared values closer to 1. Also, you can be pretty far off on your starting parameters and still arrive at a good fit. RMSE allows for better fits as there is usually error in the fluence and remaining factors.
- Parameters:
fluence_or_ddd_vs_remaining_factor (ndarray) – 2d numpy array where column 0 is the displacement damage dose or fluence and column 1 is the remaining factor:
parameters (ndarray) – 1d numpy array of starting values for the fit. The array should be 2 elements where the first element is the C parameter in the degradation equation and phi_D_x is the second parameter. If no parameters are entered the fit defaults to using 2e-2 for C and 2e8 for phi_D_x. These parameters are found to fit most data without any modification
- Returns:
1d numpy array of 2 elements where the first element is the C parameter and the second is phi_D_x
- solarpy.degradation_equations.fit_degradation_equation_leastsquare(fluence_or_ddd_vs_remaining_factor)
Given the displacement damage dose or fluence vs remaining factor, the data is fit using the sum of least squares to arrive at the best fit for C and D_x for the DDD degradation equation.
- Parameters:
fluence_or_ddd_vs_remaining_factor (ndarray) – 2d numpy array where column 0 is the displacement damage dose or fluence and column 1 is the remaining factor:
- Returns:
1d numpy array of 2 elements where the first element is the C parameter and the second is phi_D_x
- solarpy.degradation_equations.fit_degradation_equation_rf_greater_than_1(fluence_or_ddd_vs_remaining_factor, parameters=None)
Given the displacement damage dose or fluence vs remaining factor, the data is fit using the Nelder-Mead method to arrive at the best fit for A, C, and phi_D_x for the DDD double degradation equation. The form of the degradation equation used for the fit replaces the 1 with the fitting parameter A. This is done for data that has a remaining factor above 1 after radiation. We do not recommend this method as a remaining factor above indicates a measurement or calibration error. It does however provide a way to fit otherwise unfittable data. The data is fit by minimizing the error function to the root mean squared error (RMSE). This is done becuase it gives lower chi squared values and r squared values closer to 1. Also, you can be pretty far off on your starting parameters and still arrive at a good fit. RMSE allows for better fits as there is usually error in the fluence and remaining factor and provides the best fit to expected values
- Parameters:
fluence_or_ddd_vs_remaining_factor (ndarray) – 2d numpy array where column 0 is the displacement damage dose or fluence and column 1 is the remaining factor:
parameters (ndarray) – 1d numpy array of starting values for the fit. The array should be 3 elements where the first element is the A parameter in the degradation equation, C is the second parameter, and D_x is the third paramter. If no parameters are entered the fit defaults to using 0.9, 2e-1, 2e10 for A, C, and phi_D_x respectively. These parameters are found to fit most data without any modification
- Returns:
1d numpy array of 3 elements where the first element is the A parameter, the second is C, and the third parameter is D_x.
- solarpy.degradation_equations.fit_double_degradation_eq_leastsquare(fluence_or_ddd_vs_remaining_factor)
Given the displacement damage dose curve and minimizing using sum of least squares to arrive at the best fit for C1, D_x1, C2, D_x2 for the DDD double degradation equation. The data is fit by minimizing the error function to the root mean squared error (RMSE). This is done becuase it gives lower chi squared values and r squared values closer to 1. Also, you can be pretty far off on your starting parameters and still arrive at a good fit. RMSE allows for better fits as there is usually error in the fluence and remaining factor and provides the best fit to expected values
- Parameters:
fluence_or_ddd_vs_remaining_factor (ndarray) – 2d numpy array where column 0 is the displacement damage dose and column 1 is the remaining factor.
- Returns:
1d numpy array of 2 elements where the first element is the C1 parameter in the degradation equation, D_x1 is the second parameter, C2 is the third parameter, and D_x2 is the last paramenter.
- solarpy.degradation_equations.fit_double_degradation_equation(fluence_or_ddd_vs_remaining_factor, parameters=None)
Given the displacement damage dose or fluence vs remaining factor, the data is fit using the Nelder-Mead method to arrive at the best fit for C1, phi_D_x1, C2, phi_D_x2 for the double degradation equation. The data is fit by minimizing the error function to the root mean squared error (RMSE). This is done becuase it gives lower chi squared values and r squared values closer to 1. Also, you can be pretty far off on your starting parameters and still arrive at a good fit. RMSE allows for better fits as there is usually error in the fluence and remaining factor and provides the best fit to expected values.
- Parameters:
fluence_or_ddd_vs_remaining_factor (ndarray) – 2d numpy array where column 0 is the displacement damage dose or fluence and column 1 is the remaining factor:
parameters (ndarray) – 1d numpy array of starting values for the fit. The array should be 4 elements where the first element is the C1 parameter in the degradation equation, D_x1 is the second parameter, C2 is the third parameter, and D_x2 is the last parameter. If no parameters are entered the fit defaults to using 6e-2, 6e8, 2e-4, 4e-10 for C1, D_x1, C2, and D_x2 respectively. These parameters are found to fit most data without any modification
- Returns:
1d numpy array of 4 elements where the first element is the C1 parameter in the degradation equation, phi_D_x1 is the second parameter, C2 is the third parameter, and phi_D_x2 is the last parameter.
- solarpy.degradation_equations.get_fluence(remaining_factor, C, phi_D_x)
Calculates the fluence or displacement damage dose using the degradation equation
- Parameters:
remaining_factor (ndarray or float) – 1d numpy array or float of the remaining factor
C (float) – Constant that is determined through fitting
phi_D_x (float) – Fluence or displacement damage dose constant that is determined through fitting
- Returns:
1d numpy array or float of the fluence or displacement damage dose that the remaining factor is located at
- solarpy.degradation_equations.get_fluence_ddd_double_degradation(remaining_factor, C1, phi_D_x1, C2, phi_D_x2, x0=None)
Calculates the fluence or displacement damage dose using the double degradation equation
- Parameters:
remaining_factor (ndarray or float) – 1d numpy array or float of the remaining factor
C1 (float) – Constant that is determined through fitting for first degradation equation
phi_D_x1 (float) – Fluence or displacement damage dose constant that is determined through fitting
C2 (float) – Constant that is determined through fitting for first degradation equation
phi_D_x2 (float) – Fluence or displacement damage dose constant that is determined through fitting
x0 (float) – Best guess at the fluence or displacement damage does that the remaining factor should be near
- Returns:
1d numpy array or float of the fluence or displacement damage dose that the remaining factor is located at
- solarpy.degradation_equations.get_fluence_ddd_poly(remaining_factor, fit, x0=None)
Calculates the fluence or displacement damage dose using a polynomial fit for a given remaining factor
- Parameters:
remaining_factor (ndarray or float) – 1d numpy array or float of the remaining factor
fit (ndarray) – The polynomial coefficients
x0 (float) – Best guess at the fluence or displacement damage does that the remaining factor should be near
- Returns:
1d numpy array or float of the fluence or displacement damage dose that the remaining factor is located at
- solarpy.degradation_equations.get_remaining_factor_poly(fluence_ddd, fit)
Calculates the remaining factor from a polynomial fit of the displacement damage dose or fluence.
- Parameters:
fluence_ddd (ndarray) – 1d numpy array of fluences or displacement damage dose
fit (ndarray) – The polynomial coefficients
- Returns:
1d numpy array or float of the remaining factor at a given fluence or displacement damage dose
- solarpy.degradation_equations.group_by(data, group_by_column_index=0)
Groups data by a column index :param data (): :param group_by_column_index ():
Returns:
- solarpy.degradation_equations.plot_fit_checks(qual_data, fit_type=None, fit_parameters=None, normalize_rdc=None, particle_type=None, colors=None, marker=None)
- solarpy.degradation_equations.polynomialFit(fluence_or_ddd_vs_remaining_factor, degree=5)
Given the displacement damage dose or fluence vs remaining factor, the data is fit using a polynomial to arrive at the best fit for C and D_x for the DDD degradation equation. Wrapper function of numpy’s polyfit.
- Parameters:
fluence_or_ddd_vs_remaining_factor (ndarray) – 2d numpy array where column 0 is the displacement damage dose or fluence and column 1 is the remaining factor:
degree (int) – Degree of fitting polynomial
- Returns:
Polynomial coefficients, highest power first
electron_rdc
Relative damage coefficients (RDC) are used to relate the relative damage of one particle energy to another. The JPL radiation handbooks relate all particle energies and types to a 1MeV electron equivalent fluence, hence the name JPL Equivalent Fluence of JPL EQFLUX method. According the JPL Handbooks, 1 MeV electron was choose because it is readily available for ground testing and the abundance of 1 MeV electron particles in the space environment.
Note: This module and the proton module can be combined to one rdc module. The modules are seperate to reflect the procedure used in the JPL radiation hand books.
- class solarpy.eqflux.electron_rdc.electron_rdc_aero(qual_data, critical_remaining_factor=None, energy_to_normalize_rdc=None, density_of_shield=None, shield_thickness_cm=None, shield_range_table=None, fit_type=None, fit_parameters=None, normalize_rdc=False)
Bases:
object
- get_energy_vs_rdc(fit_parameters=None, fit_type=None)
- get_energy_vs_rdc_extrapolated(minimum_particle_energy=1e-05, maximum_particle_energy=100.0, minimum_energy_rdc=None, maximum_energy_rdc=None, number_of_points=3000)
- get_omnidirectional_shielded_rdc()
- get_unidirectional_shielded_rdc(incident_angle=0)
- plot_omnidirectional_shielded_rdc()
- plot_rdc(rdc=None, color='blue')
- plot_to_check_fits(qual_data=None, fit_type=None, fit_parameters=None, normalize_rdc=None)
- save_rdcs(file_name)
- update_rdcs(fit_type=None, fit_parameters=None, minimum_particle_energy=1e-05, maximum_particle_energy=100.0, minimum_energy_rdc=None, maximum_energy_rdc=None, number_of_points=3000)
- solarpy.eqflux.electron_rdc.extrapolate_RDC(energy_vs_rdc, minimum_particle_energy, maximum_particle_energy, minimum_energy_rdc=None, maximum_energy_rdc=None, number_of_points=3000)
Linearly extrapolates AND interpolates the RDC data. This is a wrapper function of scipy interpolate using the ‘extrapolate” keyword argument. The user can use any function they wish to interpolate or extrapolate
- Parameters:
energy_vs_rdc – 2d numpy array with column 0 being the particle energy and column 1 being the relative damage coefficienct
minimum_particle_energy – Minimum energy to start linear extrapolation of rdc data
maximum_particle_energy – Maximum energy to linearly extrapolate rdc data. For example the GaAs data from the GaAs Solar Cell Radiation handbook extrapolates the low energy electron data and the data from 12MeV electrons to 40MeV electrons is extrapoloated
minimum_energy_rdc – 1d array of minimum energy and rdc value to extrapolate. The first value is the particle energy and the second value is the rdc. For electrons, the minimum energy used in The GaAs Solar Cell Radiation Handbook is 0.260 MeV and the minimum rdc value for that energy is <0.1 (B. Anspaugh, ‘Proton and electron damage coefficients for GaAs/Ge solar cells’, DOI: 10.1109/PVSC.1991.169472)
maximum_energy_rdc – 1d array of maximum energy and rdc value to extrapolate. For most new triple junction cells peeople use the RDCs greater than 10 MeV from the GaAs RDC data in The GaAs Solar Cell Radiation Handbook….which…I don’t agree with because there is no reference to the data see (B. Anspaugh, ‘Proton and electron damage coefficients for GaAs/Ge solar cells’, DOI: 10.1109/PVSC.1991.169472)
number_of_points – The number of particle energies to interpolate. refer to numpy.logspace documentation to
more (understand) –
- Returns:
2d numpy array or energy in column 0 and relative damage coefficients in column 2 that is extrapolated and interpolated for user defined arguments
- solarpy.eqflux.electron_rdc.extrapolate_RDC_loglog(energy_vs_rdc, minimum_particle_energy, maximum_particle_energy, minimum_energy_rdc=None, maximum_energy_rdc=None, number_of_points=3000)
Linearly extrapolates AND interpolates the loglog of RDC data. This is a wrapper function of scipy interpolate using the ‘extrapolate” keyword argument. The user can use any function they wish to interpolate or extrapolate
- Parameters:
energy_vs_rdc – 2d numpy array with column 0 being the particle energy and column 1 being the relative damage coefficienct
minimum_particle_energy – Minimum energy to start linear extrapolation of rdc data
maximum_particle_energy – Maximum energy to linearly extrapolate rdc data. For example the GaAs data from the GaAs Solar Cell Radiation handbook extrapolates the low energy electron data and the data from 12MeV electrons to 40MeV electrons is extrapoloated
minimum_energy_rdc – 1d array of minimum energy and rdc value to extrapolate. The first value is the particle energy and the second value is the rdc. For electrons, the minimum energy used in The GaAs Solar Cell Radiation Handbook is 0.260 MeV and the minimum rdc value for that energy is <0.1 (B. Anspaugh, ‘Proton and electron damage coefficients for GaAs/Ge solar cells’, DOI: 10.1109/PVSC.1991.169472).
maximum_energy_rdc – 1d array of maximum energy and rdc value to extrapolate. For most new triple junction cells peeople use the RDCs greater than 10 MeV from the GaAs RDC data in The GaAs Solar Cell Radiation Handbook….which…I don’t agree with because there is no reference to the data see (B. Anspaugh, ‘Proton and electron damage coefficients for GaAs/Ge solar cells’, DOI: 10.1109/PVSC.1991.169472)
number_of_points – The number of particle energies to interpolate. refer to numpy.logspace documentation to
more (understand) –
- Returns:
2d numpy array or energy in column 0 and relative damage coefficients in column 2 that is extrapolated and interpolated for user defined arguments
- solarpy.eqflux.electron_rdc.fitQualData(qual_data, fit_type='Single Degradation', fit_parameters=None)
- solarpy.eqflux.electron_rdc.get_energy_vs_rdc(qual_data, critical_remaining_factor, energyToNormalizeRDC=1, fit_parameters=None, return_model=None)
Calculates the unidirectional RDC curve (energy vs RDC) given the radiation qual data, critical remaining factor, and the partcle energy you wish to relate the damage of each particel too. Uses the single degradation equation. This is needed to calculate the fluence at which each the critical remaining factor is for each of the particle energy data sets
- Parameters:
qual_data – 2d numpy array with three columns where column 0 is particle energy, column 1 is fluence, and column 2 is remaining factor
critical_remaining_factor – The remaining factor at which to relate all fluences
energyToNormalizeRDC – The particle energy to normalize the relative damage coefficients
fit_parameters – 1d numpy array include 2 parameters, one for the fitting constant C and the other for phi_x.
- Returns:
2d numpy array of the energy in column 0 and relative damage coefficient in column 1
- solarpy.eqflux.electron_rdc.get_energy_vs_rdc_double_degradation(qual_data, critical_remaining_factor, energyToNormalizeRDC=1, fit_parameters=None, return_model=None)
Calculates the unidirectional RDC curve (energy vs RDC) given the radiation qual data, critical remaining factor, and the partcle energy you wish to relate the damage of each particel too. Uses double degradatin equation. This is needed to calculate the fluence at which each the critical remaining factor is for each of the particle energy data sets
- Parameters:
qual_data – 2d numpy array with three columns where column 0 is particle energy, column 1 is fluence, and column 2 is remaining factor
critical_remaining_factor – The remaining factor at which to relate all fluences
energyToNormalizeRDC – The particle energy to normalize the relative damage coefficients
fit_parameters – 1d numpy array of list of parameters includes 4 parameters, C_1 and phi_x_1 for the first degradation equation and C_2 and phi_x_2 for the second degradation equation
- Returns:
2d numpy array of the energy in column 0 and relative damage coefficient in column 1
- solarpy.eqflux.electron_rdc.get_omnidirectional_electron_RDC_with_shielding(energy_vs_rdc, mass_thickness_of_shield, shield_range_table)
Calculates the omnidirectional relative damage coefficient of a solar cell after some shielding, typically solar cell cover glass.
- Parameters:
energy_vs_rdc – 2d numpy array with column 0 being the particle energy and column 1 being the relative damage coefficienct
mass_thickness_of_shield – Mass thickness of the shielding being used in units of g/cm. Derived by multiplying the density of the shield by the thickness of the shield
shield_range_table – Stopping power and range table for the shield
- Returns:
2d numpy array of energy (column 0) and relative damage coefficients (column 2). The relative damage coefficients are calculated after going through some shielded and adjusted from unidirectional test energies to omnidirectional test energies
- solarpy.eqflux.electron_rdc.get_rdc_after_shielding(energy_vs_rdc, angles, mass_thickness_of_shield, shield_range_table)
Calculates the relative damage coefficient of unidirectional particles after some shielding. The relative damage coefficienct is calculated for all angles of a particle after shielding over a hemisphere
- Parameters:
energy_vs_rdc – 2d numpy array with column 0 being the particle energy and column 1 being the relative damage coefficient
angles – 1d numpy array of entry angles of particles. Typically over 180 degrees
mass_thickness_of_shield – Mass thickness of the shielding being used in units of g/cm. Derived by multiplying the density of the shield by the thickness of the shield
shield_range_table – Stopping power and range table for the shield
- Returns:
List of 1d numpy array of relative damage coefficients for each angle of a hemisphere after a user defined shield
- solarpy.eqflux.electron_rdc.get_shielded_particle_energies(particleEnergies, angles, mass_thickness_of_shield, shield_range_table)
Calculates the energy of a particle after it passes through shielding. The energy of the particle is calculated for all angles over 180 degrees.
- Parameters:
particleEnergies –
angles –
mass_thickness_of_shield –
shield_range_table –
- Returns:
List of 1d numpy array of particle energies for each angle of a hemisphere after a user defined shield
- solarpy.eqflux.electron_rdc.get_unidirectional_electron_RDC_with_shielding(energy_vs_rdc, mass_thickness_of_shield, shield_range_table, incident_angle=0)
Calculates the omnidirectional relative damage coefficient of a solar cell after some shielding, typically solar cell cover glass.
- Parameters:
energy_vs_rdc – 2d numpy array with column 0 being the particle energy and column 1 being the relative damage coefficienct
mass_thickness_of_shield – Mass thickness of the shielding being used in units of g/cm. Derived by multiplying the density of the shield by the thickness of the shield
shield_range_table – Stopping power and range table for the shield
- Returns:
2d numpy array of energy (column 0) and relative damage coefficients (column 2). The relative damage coefficients are calculated after going through some shielded and adjusted from unidirectional test energies to omnidirectional test energies
- solarpy.eqflux.electron_rdc.group_qual_data_by_particle_energy(qual_data)
- solarpy.eqflux.electron_rdc.make_rdc_dictionary(energy_vs_rdc)
- solarpy.eqflux.electron_rdc.qual_data_from_file(rdc_txt_file)
Gets rdc curve from txt file from qual report and interpolates it :param rdc_txt_file:
- Returns:
interpolated rdc curve
- solarpy.eqflux.electron_rdc.reference_particle_fit(qual_data, reference_energy, fit_type=None, fit_parameters=None, zero_fit=None)
- Parameters:
qual_data –
reference_energy –
fit_type –
fit_parameters –
zero_fit –
Returns:
proton_rdc
Relative damage coefficients (RDC) are used to relate the relative damage of one particle energy to another. The JPL radiation handbooks relate all particle energies and types to a 1MeV electron equivalent fluence, hence the name JPL Equivalent Fluence of JPL EQFLUX method. According the JPL Handbooks, 1 MeV electron was choose because it is readily available for ground testing and the abundance of 1 MeV electron particles in the space environment. For protons all protons are related to 10 MeV protons. The 10 MeV protons are then related to 1 MeV electrons.
Note: This module and the proton module can be combined to one rdc module. The modules are seperate to reflect the procedure used in the JPL radiation hand books
Note: Turns out since JPL EQFLUX was implemented and through DDD 10 MeV protons don’t actually do much damage……sooooo hmmmmm would it be better to relate all protons to a lower proton energy.
- solarpy.eqflux.proton_rdc.energyAfterGlass_single(unidirectional_particle_energy, entry_angles, shield_thickness_cm, shield_range_table)
- solarpy.eqflux.proton_rdc.get_omnidirectional_and_shielded_proton_rdc(energy_vs_rdc, solar_cell_range_table, shield_range_table, solar_cell_displacement_table, solar_cell_thickness_cm, shield_thickness_cm)
Calculates the omnidirectional relative damage coefficient curve through shielding for protons following the procedures in the GaAs Solar Cell Radiation Handbook. A key difference between this calculation and that for electrons is that protons can stop in the solar cell where they deposit most of their energy. This end of track damage at the Bragg peak can lead to greater changes in the solar cell performance parameters. The JPL method accounts for end of track damage by relating the the stopping distance of different energy particles and angles to that of the relative damage coefficient of the normally incident proton. Also the relative damage coefficient is weighted by the ratio total displacements created for particle at an angle and its equivalent normal incidence energy at the same stopping depth.
- Parameters:
energy_vs_rdc (ndarray) – 2d numpy array with column 0 being the particle energy and column 1 being the relative damage coefficient
solar_cell_range_table (ndarray) – 2d numpy array of stopping range for protons in the solar cell material of interest. Ideally this range table would be for the exact solar cell, but the range table for GaAs is typically used. Column 1 is the proton energy and column 2 is the range in cm
shield_range_table (ndarray) – 2d numpy array where column 1 is the proton energy and column 2 is the range in cm through the shielding material. For solar cells the shield is typically some type of glass. Stopping and range table for a shield
solar_cell_displacement_table (ndarray) – 2d numpy array where column is proton energy and column 2 is the number of displacement created by the proton in the solar cell material. The table is generated using TRIM 2018. By using TRIM the number of displacements can be determined for each particle energy. In the GaAs Solar Cell handbook the displacements are calculated using a the Kinche-Pease model
solar_cell_thickness_cm (float) – Thickness of the solar cell in cm
shield_thickness_cm (float) – Thickness of the shield in cm
- Returns (ndarray):
2d numpy array where column 1 is particle energy and column 2 is the relative damage coefficient
- solarpy.eqflux.proton_rdc.get_range_over_entry_angles(unidirectional_particle_energy, entry_angles, shield_thickness_cm, shield_range_table)
- solarpy.eqflux.proton_rdc.get_unidirectional_and_shielded_proton_rdc(energy_vs_rdc, solar_cell_range_table, shield_range_table, solar_cell_displacement_table, solar_cell_thickness_cm, shield_thickness_cm, incident_angle=0)
Calculates the unidirectional relative damage coefficient curve through shielding for protons following the procedures in the GaAs Solar Cell Radiation Handbook. A key difference between this calculation and that for electrons is that protons can stop in the solar cell where they deposit most of their energy. This end of track damage at the Bragg peak can lead to greater changes in the solar cell performance parameters. The JPL method accounts for end of track damage by relating the the stopping distance of different energy particles and angles to that of the relative damage coefficient of the normally incident proton. Also the relative damage coefficient is weighted by the ratio total displacements created for particle at an angle and its equivalent normal incidence energy at the same stopping depth.
- Parameters:
energy_vs_rdc (ndarray) – 2d numpy array with column 0 being the particle energy and column 1 being the relative damage coefficient
solar_cell_range_table (ndarray) – 2d numpy array of stopping range for protons in the solar cell material of interest. Ideally this range table would be for the exact solar cell, but the range table for GaAs is typically used. Column 1 is the proton energy and column 2 is the range in cm
shield_range_table (ndarray) – 2d numpy array where column 1 is the proton energy and column 2 is the range in cm through the shielding material. For solar cells the shield is typically some type of glass. Stopping and range table for a shield
solar_cell_displacement_table (ndarray) – 2d numpy array where column is proton energy and column 2 is the number of displacement created by the proton in the solar cell material. The table is generated using TRIM 2018. By using TRIM the number of displacements can be determined for each particle energy. In the GaAs Solar Cell handbook the displacements are calculated using a the Kinche-Pease model
solar_cell_thickness_cm (float) – Thickness of the solar cell in cm
shield_thickness_cm (float) – Thickness of the shield in cm
incident_angle (float or ndarray) – angle radiation is entering the solar cell in degrees
- Returns (ndarray):
2d numpy array where column 1 is particle energy and column 2 is the relative damage coefficient
- class solarpy.eqflux.proton_rdc.proton_rdc_aero(qual_data, critical_remaining_factor=None, energy_to_normalize_rdc=None, density_of_shield=None, shield_thickness_cm=None, shield_range_table=None, solar_cell_range_table=None, solar_cell_displacement_table=None, solar_cell_thickness_cm=None, fit_type=None, fit_parameters=None)
Bases:
object
- get_energy_vs_rdc(fit_parameters=None, fit_type=None)
- get_energy_vs_rdc_extrapolated(minimum_particle_energy=0.01, maximum_particle_energy=100.0, minimum_energy_rdc=None, maximum_energy_rdc=None, number_of_points=3000)
- get_omnidirectional_shielded_rdc()
- get_unidirectional_shielded_rdc(incident_angle=0)
- plot_omnidirectional_shielded_rdc()
- plot_rdc(rdc=None, color='blue', label=None)
- plot_to_check_fits(qual_data=None, fit_type=None, fit_parameters=None)
- save_rdcs(file_name)
- update_rdcs(fit_type=None, fit_parameters=None, minimum_particle_energy=0.01, maximum_particle_energy=100.0, minimum_energy_rdc=None, maximum_energy_rdc=None, number_of_points=3000)
relativeMeV_fluence
This module takes the relative damage coefficients of a solar cell type and the space environment particle spectrum to arrive and total 1 MeV fluence. Using the 1 MeV electrion radiation data used to generate the RDC curve, one can predict the expected remaining factor of the parameter of interest in a solar cell
- solarpy.eqflux.relativeMeV_fluence.get_cumulative_relative_fluence(relative_damage_coefficients, differential_particle_spectrum, norm=True)
Calculates the cumulative 1MeV fluence for each particle energy
- Parameters:
relative_damage_coefficients (2d ndarray) – 2d array where column 0 contains the particle energies and column 1 contains the relative damage coefficients
differential_particle_spectrum (2d ndarray) – 2d array where column 0 contains the particle energies and column 2 contains the differential particle fluence
- Returns:
2d nd array where column 0 is the particle energies and column 1 is the cumulative 1 Mev fluence.
- solarpy.eqflux.relativeMeV_fluence.get_energy_vs_relative_fluence(relative_damage_coefficients, differential_particle_spectrum)
Calculates the energy vs 1 MeV fluence data. The relative damage coefficients are interpolated for particle energies from the differential particle spectrum. The interpolation of the relative damage coefficients is accomplished by linear interpolation of the loglog of the relative damage coefficient. Relative damage coefficients outside the range of user supplied values is linearly extrapolated. The interpolation and extrapolation of the relative damage coefficients is in accordance with the Solar Cell and GaAs Solar Cell Radiation Handbooks. The interpolated relative damage coefficients are multiplied by the differential fluence to yield the 1MeV fluence at each particle energy.
- Parameters:
relative_damage_coefficients (2d ndarray) – 2d array where column 0 contains the particle energies and column 1 contains the relative damage coefficients
differential_particle_spectrum (2d ndarray) – 2d array where column 0 contains the particle energies and column 2 contains the differential particle fluence
- Returns:
2d ndarray where column 0 is the particle energies and column 1 is the 1 MeV electron fluence. The particle energies are from the differential particle spectrum as the relative damage coefficients are interpolated and extropolated the differential particle spectrum.
- solarpy.eqflux.relativeMeV_fluence.get_relative_MeV_fluence_trapezoidal_integration(relative_damage_coefficients, differential_particle_spectrum)
Calculates the total 1MeV fluence given the relative damage coefficients and differential particle spectrum. The relative damage coefficients are interpolated for particle energies from the differential particle spectrum. The interpolation of the relative damage coefficients is accomplished by linear interpolation of the loglog of the relative damage coefficient. Relative damage coefficients outside the range of user supplied values is linearly extrapolated. The interpolation and extrapolation of the relative damage coefficients is in accordance with the Solar Cell and GaAs Solar Cell Radiation Handbooks. The interpolated relative damage coefficients are multiplied by the differential fluence to yield the 1MeV fluence at each particle energy. The energy vs 1MeV fluence data is then integrated over all particle energies to yield the total 1MeV fluence
- Parameters:
relative_damage_coefficients (ndarray) – 2d array where column 0 contains the particle energies and column 1 contains the relative damage coefficients
differential_particle_spectrum (ndarray) – 2d array where column 0 contains the particle energies and column 1 contains the differential particle fluence
- Returns:
Total 1MeV fluence
- solarpy.eqflux.relativeMeV_fluence.get_relative_fluence_JPL_Aero(relative_damage_coefficients, differential_particle_spectrum)
Calculates the 1 MeV electron fluence using the JPL EQFLUX method using the differential particle spectrum. The original JPL EQFLUX program takes the integral particle spectrum and does what seems like a step-by-step differentiation then a Riemann sum to arrive at the total 1 MeV fluence. This functions also does a Riemann sum but takes out the differentiation of the integral spectrum and simply uses the differential spectrum. The differential particle spectrum for an environment is easily obtained from Spenvis on AE8/AP8 and AE9/AP9 radiation environment models. This function is similar to the ‘oneMeVfluence_trapezoidalIntegration’ function. The difference being this function uses Riemann sum integral appoximation and the ‘oneMeVfluence_trapezoidalIntegration’ function uses trapezoidal integration.
- Parameters:
relative_damage_coefficients (ndarray) – 2d array where column 0 contains the particle energies and column 1 contains the relative damage coefficients
differential_particle_spectrum (ndarray) – 2d array where column 0 contains the particle energies and column 1 contains the differential particle fluence
- Returns:
Total 1MeV fluence
- solarpy.eqflux.relativeMeV_fluence.interpolate_electron_spectrum(integral_differential_electron_spectrum, energy_increment=0.01)
Interpolates the electron particle spectrum according to The GaAs Radiation Handbook. The Handbook suggests interpolating the integral electron spectrum using linear interpolation of the “particle energy vs log(electron fluence)”
- Parameters:
integral_differential_electron_spectrum (ndarray) – 2d numpy array where column 0 is the particle energy and column 1 is the electron fluence
energy_increment (float) – spacing in which to linearly interpolate spectrum
- Returns:
A 2d numpy array of the interpolated electron spectrum where column 0 is the particle energy and column 1 is the electron fluence
- solarpy.eqflux.relativeMeV_fluence.interpolate_proton_spectrum(integral_differential_proton_spectrum, energy_increment=0.001)
Interpolates the proton particle spectrum according to The GaAs Radiation Handbook. The Handbook suggests interpolating the integral pront spectrum using linear interpolation of the “log(particle energy) vs log(electron fluence)”
- Parameters:
integral_differential_proton_spectrum (ndarray) – 2d numpy array where column 0 is the particle energy and column 1 is the proton fluence
energy_increment (float) – spacing in which to linearly interpolate spectrum
- Returns:
A 2d numpy array of the interpolated electron spectrum where column 0 is the particle energy and column 1 is the proton fluence
ddd
Displacement damage dose (DDD) tools to convert solar cell radiation data to displacement damage dose using the non-ionizing energy loss (NIEL) for a solar cell material of interest. DDD uses the NIEL curve to determine the displacement damage dose from each particle type and energy as opposed to the RDC method in the JPL EQFLUX method.
- class solarpy.ddd.ddd_degradation_functions.DDDqualData(qual_data, particle_type, NIEL=None, energy_to_normalize=None, fit_type=None, fit_parameters=None)
Bases:
object
- plot_ddd_fits()
- update_ddd()
- solarpy.ddd.ddd_degradation_functions.adjusted_niel(energy_0, niel_curve, range_table, thickness_cm)
- solarpy.ddd.ddd_degradation_functions.convertDDDelectronsToDDDprotons(D_px, D_ex, C_e, C_p, D_e, A_p=1, A_e=1)
- solarpy.ddd.ddd_degradation_functions.convertDDDprotonsToDDDelectrons(D_px, D_ex, C_e, C_p, D_p, A_p=1, A_e=1)
- solarpy.ddd.ddd_degradation_functions.convert_ddd_to_fluence(ddd, particle_energy, niel_curve)
- solarpy.ddd.ddd_degradation_functions.errorFunctionBestThresholdDisplacement(T_d, NIELs_vs_Td, Tds, particle_energies_NIEL, particle_energies_qual_data, fluence, remaining_factor)
- solarpy.ddd.ddd_degradation_functions.errorFunctionBestThresholdDisplacement_doubleDegradation(T_d, NIELs_vs_Td, Tds, particle_energies_NIEL, particle_energies_qual_data, fluence, remaining_factor)
- solarpy.ddd.ddd_degradation_functions.error_function_nValue_for_effectiveDDD(parameter, particle_energy, fluence, remaining_factor, NIEL, energy_to_normalize, fit_type)
Error function used to find the the n value for radiation qualification data that does not collapse when using displacement damage dose. For protons this has empirically determined to be 1 and for electrons the n value can range from 0.3-4
- Parameters:
parameter – n value guess to minimize
particle_energy – particle energy
fluence – 1d numpy array of fluence
remaining_factor – 1d array of remaining factor of interest
NIEL – 2d numpy array of particle energies in column 0 and nonionizing energy loss (NIEL) in column 1
energy_to_normalize – particle energy to normalize the effective displacement damage dose curve. This value is typically 1 for 1MeV electrons
fit_type – fit using single degradation equation, ‘single’, or double degradation equation, ‘double’. May add another option to fit using the A parameter
- Returns:
will look into using chi_squared instead
- Return type:
Error to be minimized by using 1 - r2. # TODO
- solarpy.ddd.ddd_degradation_functions.fitToFindThresholdDisplacement(NIELs_vs_Td, Tds, particle_energies_NIEL, particle_energies_qual_data, fluence, remaining_factor)
Fit to find the best NIEL curve to fit displacement damage dose data that does not collapse using the single degradation equation. The NIEL curves are selected based on the threshold displacement energy (Td) used to derive the NIEL curve. This function takes a 2d table where x is Td and y is the particle energy to do interpolation to determine the best NIEL curve on Td. Once the appropriate NIEL Td curve has been determined the actual NIEL curve using the Td derived from this fit should be used to check if it is correct. This is because 2d linear interpolation is used to derive the appropriate NIEL curve. So far it looks to fit pretty well
- Parameters:
NIELs_vs_Td – 2d numpy array of NIEL values only where the x values or columns are the threshold displacement energies used to calculate the NIEL curves and the y values or rows are the particle energies of the NIEL curves
Tds – 1d numpy array of the threshold displacement energies of the NIEL values in the NIELs_vs_Td data set
particle_energies_NIEL – 1d numpy array of the particle energies of the NIEL values in the NEIL_vs_Td data set
particle_energies_qual_data – 1d numpy array of the particle energies of the radiation data to be collapsed using displacement damage dose method
fluence – 1d numpy array of of the fluences of the radiation data to be collapsed using displacement damage dose method
remaining_factor – of the remaining factors of the radiation data to be collapsed using displacement damage dose method
- Returns:
Threshold displament energy of the NIEL curve that collapse the radiation data using a n value of 1
- solarpy.ddd.ddd_degradation_functions.fitToFindThresholdDisplacement_double_degradation(NIELs_vs_Td, Tds, particle_energies_NIEL, particle_energies_qual_data, fluence, remaining_factor)
Fit to find the best NIEL curve to fit displacement damage dose data that does not collapse using the double degradation equation. The NIEL curves are selected based on the threshold displacement energy (Td) used to derive the NIEL curve. This function takes a 2d table where x is Td and y is the particle energy to do interpolation to determine the best NIEL curve on Td. Once the appropriate NIEL Td curve has been determined the actual NIEL curve using the Td derived from this fit should be used to check if it is correct. This is because 2d linear interpolation is used to derive the appropriate NIEL curve. So far it looks to fit pretty well
- Parameters:
NIELs_vs_Td – 2d numpy array of NIEL values only where the x values or colums are the threshold displacement energies used to calculate the NIEL curves and the y values or rows are the particle energies of the NIEL curves
Tds – 1d numpy array of the threshold displacement energies of the NIEL values in the NIELs_vs_Td data set
particle_energies_NIEL – 1d numpy array of the particle energies of the NIEL values in the NEIL_vs_Td data set
particle_energies_qual_data – 1d numpy array of the particle energies of the radiation data to be collapsed using displacement damage dose method
fluence – 1d numpy array of of the fluences of the radiation data to be collapsed using displacement damage dose method
remaining_factor – of the remaining factors of the radiation data to be collapsed using displacement damage dose method
- Returns:
Threshold displament energy of the NIEL curve that collapse the radiation data using a n value of 1
- solarpy.ddd.ddd_degradation_functions.fit_nValue_effectiveDDD(particle_energy, fluence, remaining_factor, NIEL, energy_to_normalize, fit_type='single')
Give the particle energies, fluences, and remaining factors of an irradiated cell this function fits the data to find the n_value that best collapses the displacement damage dose curves. The function minimizes by fitting the displacement damage dose curves using the degradation equation and n value to find the best bit using r squared as the fitting parameter. I have found this to provide better fits than those in the SCREAM model fits
- Parameters:
particle_energy (ndarray of float) – 1d numpy array of particle energies or single float value of particle energies
fluence (ndarray) – 1d numpy array of fluences. The fluences are converted to displacement damage dose using the NIEL curve
remaining_factor (ndarray) – 1d numpy array of remaining factors for each fluence
NIEL (ndarray) – 2d numpy array where column 0 is the particle energy and column 1 is the Non Ionizing Energy Loss of the material
energy_to_normalize (float) – particle energy to normalize the effective displacement damage dose curve. This value is typically 1 for 1MeV electrons
- Returns:
The n value that best collapses the displacement damage dose curves
- solarpy.ddd.ddd_degradation_functions.getTotalDDD(energy_vs_ddd, cutoff=0)
Takes a given displacement damage dose particle spectrum and calculates the total displacement damage dose expected for a given environment
- Parameters:
energy_vs_ddd (ndarray) – 2d numpy array where column 0 is the particle energy and column 1 is the displacment damage does per particle energy
- Returns:
The total displacement damage does in a given particle environment
- solarpy.ddd.ddd_degradation_functions.get_cumulative_ddd(particle_spectrum, NIEL, energy_to_normalize=None, n_value=None, norm=True)
Return the cumulative displacement damage dose spectrum for a give environment particle spectrum using the non-ionizing energy loss curve
- Parameters:
particle_spectrum (ndarray) – 2d numpy array where column 0 is the particle energy and column 1 is the partcle fluence
NIEL (ndarray) – 2d numpy array where column 0 is the particle energy and column 1 is the non-ionizing energy loss
(float (energy_to_normalize) – The energy to relate all displacement damage dose curves to. For electrons this is typically 1
n_value (float) – Empirically determined fitting parameter to collapse displacement damage dose curves that do not collapse. It is 1 for protons
norm (bool) – Optional argument to normalize the cumulative ddisplacement damage dose to 1 if set to True
- Returns:
2d numpy array where column 0 is the particle energy and column 1 is the cumulative displacement damage dose
- solarpy.ddd.ddd_degradation_functions.get_ddd(particle_energy, fluence, NIEL, energy_to_normalize=None, n_value=None)
Calculates the displacement damage dose. For protons the “n” value is 1 and the energy to normalize isn’t necessary. When calculating effective displacement damage dose an empirically determined “n” value is used to collapse the electron displacement damage curves for different particle energies. The n value can be derived by fitting displacement damage curves to for a n until they collapse. N can be anywhere from 0 to 4 as determined in the literature
- Parameters:
particle_energy – particle energy
fluence – fluence
NIEL – 2d numpy array of particle energies in column 0 and nonionizing energy loss (NIEL) in column 1
energy_to_normalize – particle energy to normalize the effective displacement damage dose curve. This value is typically 1 for 1MeV electrons
n_value – Empirically determined fitting parameter to collapse displacement damage dose curves that do not collapse. It is 1 for protons
- Returns:
1d numpy array of effective displacement damage dose
- solarpy.ddd.ddd_degradation_functions.get_ddd_vs_remaining_factor(particle_energy, fluence, remaining_factor, NIEL, energy_to_normalize=None, n=None)
Calculates the 2d numpy array of displacement damage dose vs energy.
- Parameters:
particle_energy (ndarray or float) – particle energy
fluence (ndarray) – 1d numpy array of fluence
remaining_factor (ndarray) – 1d array of remaining factor of interest
NIEL (ndarray) – 2d numpy array of particle energies in column 0 and nonionizing energy loss (NIEL) in column 1
energy_to_normalize (float) – particle energy to normalize the effective displacement damage dose curve. This value is typically 1 for 1MeV electrons
n (float) – Empirically determined fitting parameter to collapse displacement damage dose curves that do not collapse. It is 1 for protons
- Returns:
2d numpy array where column 0 is the displacement damage dose and column 1 is the remaining factor
- solarpy.ddd.ddd_degradation_functions.get_ddd_vs_remaining_factor_by_particle_energy(qual_data, NIEL, energy_to_normalize=None, n_value=None)
Organizes a table of radiation qualification data into groups based on particle energy. This function is useful for organizing radiation qualification data tables for plotting and analysis
- Parameters:
qual_data (ndarray) – 2d numpy array where column 0 is hte particle energy for each fluence, column 1 is the fluence, and column 2 is the remaining factor
NIEL (ndarray) – 2d numpy array where column 0 is the particle energy and column 1 is the non-ionizing energy loss
(float (energy_to_normalize) – The energy to relate all displacement damage dose curves to. For electrons this is typically 1
n_value (float) – Empirically determined fitting parameter to collapse displacement damage dose curves that do not collapse. It is 1 for protons
- Returns:
A list of 2d numpy arrays where each element in the list represents one particle energy and and each array in the list is composed of three columns where column 1 is the particle energy, column 2 is the fluence, and column 3 is the remaining factor
- solarpy.ddd.ddd_degradation_functions.get_energy_vs_ddd(particle_spectrum, NIEL, energy_to_normalize=None, n_value=None)
Takes a give particle spectrum for an environment and calculates the displacement damage dose for that environment using the non-ionizing energy loss curve.
- Parameters:
particle_spectrum (ndarray) – 2d numpy array where column 0 is the particle energy and column 1 is the partcle fluence
NIEL (ndarray) – 2d numpy array where column 0 is the particle energy and column 1 is the non-ionizing energy loss
energy_to_normalize (float) – The energy to relate all displacement damage dose curves to. For electrons this is typically 1
n_value (float) – Empirically determined fitting parameter to collapse displacement damage dose curves that do not collapse. It is 1 for protons
- Returns:
2d numpy array where column 0 is the particle energy and column 1 is the displacement damage dose.
- solarpy.ddd.ddd_degradation_functions.interpolateNIELvsTd(newTd, NIELs_vs_Td, Tds, particle_energies, kind='linear')
By using 2d interpolation of a table of NIEL values for various Tds, this function will return a NIEL curve at a specific Td using 2d linear interpolation. The appropriate method would simple be to caluculate the NIEL curve instead of doing linear interpolation. This funtion will be replaced with the calculation in the future
- Parameters:
newTd (float) – Threshold displacement energy to derive a new non-ionizing energy loss curve
NIELs_vs_Td (ndarray) – 2d numpy array of NIEL values only where the x values or colums are the threshold displacement energies used to calculate the NIEL curves and the y values or rows are the particle energies of the NIEL curves
Tds (ndarray) – 1d numpy array of the threshold displacement energies of the NIEL values in the NIELs_vs_Td data set
particle_energies (ndarray) – 1d numpy array of the particle energies of the NIEL values in the NEIL_vs_Td data set
kind (str) – The type if interpolation to use. The default is ‘linear”. Refer to documentation on scipy interp2d for other interpolation methods
- Returns:
2d numpy arrary where column 0 is the particle energy and column 1 is the NIEL curve using the user defined threshold displacement energy
- solarpy.ddd.ddd_degradation_functions.lookupNIELValue(particle_energy, NIEL)
Finds a NIEL for a given particle energy. Basically interpolates the data to find the NIEL
- Parameters:
particle_energy – particle energy you want the NIEL value for
NIEL (ndarray) – the 2D numpy array of particle energy vs NIEL
- Returns:
NIEL value at the chosen particle energy
Example Class
Several classes built with the library to simplify use.
- class solarpy.examples.eqflux_aero.eqflux_aero(electron_qual_data, proton_qual_data, electron_differential_spectrum, proton_differential_spectrum, electron_reference_energy=None, proton_reference_energy=None, critical_remaining_factor=None, density_of_shield=None, shield_thickness_cm=None, proton_shield_range_table=None, electron_shield_range_table=None, solar_cell_range_table=None, solar_cell_displacement_table=None, solar_cell_thickness_cm=None, electron_energy_vs_rdc=None, proton_energy_vs_rdc=None, proton_to_electron_conversion_factor=None, p_fit_type=None, p_fit_parameters=None, e_fit_type=None, e_fit_parameters=None)
Bases:
object
Class that derives all EQFLUX parameters for a solar cell including, the RDC of electrons, protons as well as the remaining factor. If giving the environment spectrum the remaining factor of the solar cell can be calculated.
- Parameters:
electron_qual_data (ndarray) – [description]
proton_qual_data (ndarray) – [description]
electron_differential_spectrum (ndarray) – [description]
proton_differential_spectrum (ndarray) – [description]
electron_reference_energy (float) – Defaults to None. [description]
proton_reference_energy (float) – Defaults to None. [description]
fit_type (str) – Defaults to None. [description]
critical_remaining_factor (float) – Defaults to None. [description]
density_of_shield (float) – Defaults to None. [description]
shield_thickness_cm (float) – Defaults to None. [description]
proton_shield_range_table (ndarray) – Defaults to None. [description]
electron_shield_range_table (ndarray) – Defaults to None. [description]
solar_cell_range_table (ndarray) – Defaults to None. [description]
solar_cell_displacement_table (ndarray) – Defaults to None. [description]
solar_cell_thickness_cm (ndarray) – Defaults to None. [description]
electron_energy_vs_rdc (ndarray) – Defaults to None. [description]
proton_energy_vs_rdc (ndarrayl) – Defaults to None. [description]
proton_to_electron_conversion_factor (float) – Defaults to None. [description]
- adjust_electron_rdc_fit_type(particle=None, fit_type=None, fit_parameters=None)
- get_proton_to_electron_factor()
- get_r2(particle, fit_type=None, fit_parameters=None)
- reference_particle_fit(qual_data, reference_energy, fit_type=None, fit_parameters=None)
- update()
Updates member variables
- update_rdc()