### -------------------------------------------------------------------------- ## native_file_name = datadir + data_list.get('electroatomic_file_path') native_data = Native.ElectronPhotonRelaxationDataContainer(native_file_name) energy_grid = native_data.getElectronEnergyGrid() tot_elastic_cs = native_data.getTotalElasticCrossSection() cutoff_cs = native_data.getCutoffElasticCrossSection() screen_rutherford_cs = native_data.getScreenedRutherfordElasticCrossSection() screen_rutherford_index = native_data.getScreenedRutherfordElasticCrossSectionThresholdEnergyIndex( ) ### ### Lin-Log Analog Reaction Unit Test Check ### print "\n----- Lin-Lin-Log -----" analog_dist = Collision.createAnalogElasticDistribution( native_data, "LinLinLog", True, 1e-15) energies = [1e-5, 4e-4, 1e5] for energy in energies: print "Energy = ", energy index = 0 for i in range(0, energy_grid.size): if energy_grid[i] <= energy: index = i energy_0 = energy_grid[index] cs_0 = cutoff_cs[index] cs = cs_0 if energy_0 != energy:
energy_grid = native_data.getElectronEnergyGrid() elastic_energy_grid = native_data.getElasticAngularEnergyGrid() cs_reduction = native_data.getMomentPreservingCrossSectionReduction() hybrid_reaction = Collision.createHybridElasticReaction( native_data, 0.9, False, True, 1e-15) cutoff_reaction = Collision.createCutoffElasticReaction( native_data, 1.0, False, True, 1e-15) analog_reaction = Collision.createAnalogElasticReaction( native_data, False, True, 1e-15) hybrid_dist = Collision.createHybridElasticDistribution( native_data, 0.9, False, True, 1e-15) cutoff_dist = Collision.createCutoffElasticDistribution( native_data, 1.0, False, True, 1e-15) analog_dist = Collision.createAnalogElasticDistribution( native_data, False, True, 1e-15) bin_index = 4 energy = elastic_energy_grid[bin_index] mp_cs_reduction = cs_reduction[bin_index] cutoff_cs = native_data.getCutoffElasticCrossSection() moment_cs = native_data.getMomentPreservingCrossSection() moment_index = native_data.getMomentPreservingCrossSectionThresholdEnergyIndex( ) index = 0 for i in range(0, energy_grid.size): if energy_grid[i] <= energy: index = i