def setUp(self): """ Setting up a test. """ self.__files_to_remove = [] self.__dirs_to_remove = [] self.xrts_parameters = PlasmaXRTSCalculatorParameters( elements=[['Be', 1, -1]], photon_energy=4.96e3, scattering_angle=90.0, electron_temperature=10.0, electron_density=2.8433e23, ion_charge=2.3, mass_density=1.85)
def setUp(self): """ Setting up a test. """ self.__files_to_remove = [] self.__dirs_to_remove = [] # Setup parameters. self.parameters = PlasmaXRTSCalculatorParameters( elements=[['Be', 1, -1]], photon_energy=8.00e3, electron_density=3e29, electron_temperature=10.0, mass_density=1.85, ion_charge=2.3, scattering_angle=90., )
def testConstruction(self): """ Testing the default construction of the class using a dictionary. """ # Attempt to construct an instance of the class. xrts_parameters = PlasmaXRTSCalculatorParameters( elements=[['Be', 1, -1]], photon_energy=4.96e3, scattering_angle=90.0, electron_temperature=10.0, electron_density=None, ion_charge=2.3, mass_density=1.85, ) # Check instance and inheritance. self.assertIsInstance(xrts_parameters, PlasmaXRTSCalculatorParameters) self.assertIsInstance(xrts_parameters, AbstractCalculatorParameters)
def setUp(self): """ Setting up a test. """ self.__files_to_remove = [] self.__dirs_to_remove = [] # Setup parameters. self.xrts_parameters = PlasmaXRTSCalculatorParameters( elements=[['Be', 1, -1]], photon_energy=4.96e3, electron_density=3.0e23, electron_temperature=10.0, ion_charge=2.3, scattering_angle=90., energy_range={ 'min': -50.0, 'max': 50.0, 'step': 0.5 }, )
# Loop over times total_spectrum = None plasma_parameters = PlasmaXRTSCalculatorParameters(elements=[["Be", 1, -1]], photon_energy=8500.0, scattering_angle=40.0, electron_temperature=10.0, electron_density=1.0e29, ion_temperature=None, ion_charge=2.0, mass_density=1.85, debye_temperature=None, band_gap=None, energy_range={ "min": 8200., "max": 8500., "step": 1.0 }, model_Sii="SOCP", model_See="RPA", model_Sbf="IA", model_IPL="EK", model_Mix=None, lfc=None, Sbf_norm=None, source_spectrum="GAUSS", source_spectrum_fwhm=10.0) ks = ['100'] for k in ks: time_entry = hydro_data["/data"][k]
Kelvin_to_eV = 1./11806. # Loop over times total_spectrum = None plasma_parameters = PlasmaXRTSCalculatorParameters( elements = [["Be", 1, -1]], photon_energy=8500.0, scattering_angle=40.0, electron_temperature=10.0, electron_density=1.0e29, ion_temperature=None, ion_charge=2.0, mass_density=1.85, debye_temperature=None, band_gap=None, energy_range={"min" : 8200., "max" : 8500., "step" : 1.0}, model_Sii="SOCP", model_See="RPA", model_Sbf="IA", model_IPL="EK", model_Mix=None, lfc=None, Sbf_norm=None, source_spectrum="GAUSS", source_spectrum_fwhm=10.0 ) ks = ['100'] for k in ks: time_entry = hydro_data["/data"][k] time_unitSI = time_entry.attrs["timeUnitSI"]