Exemple #1
0
xml_obj = source.getObject()
cs_list = Teuchos.XMLParameterListReader().toParameterList(xml_obj)

# -------------------------------------------------------------------------- ##
#  Electroionization Data
# -------------------------------------------------------------------------- ##
file_names = [
    '/home/lkersting/frensie/src/packages/test_files/ace/test_au_epr14_ace_file.txt'
]
table_names = ['79000.14p']

for j in range(0, len(table_names)):
    print "\n----------------------------"
    print "-----", table_names[j], "Tests -----"
    print "----------------------------"
    ace_file = ACE.ACEFileHandler(file_names[j], table_names[j], 1)
    ace_data = ACE.XSSEPRDataExtractor(ace_file.getTableNXSArray(),
                                       ace_file.getTableJXSArray(),
                                       ace_file.getTableXSSArray())

    subshells = ace_data.extractSubshellENDFDesignators()
    print subshells
    shell_binding_energies = ace_data.extractSubshellBindingEnergies()
    shells = [subshells[0], subshells[len(subshells) - 1]]
    print shells
    binding_energies = [
        shell_binding_energies[0],
        shell_binding_energies[len(shell_binding_energies) - 1]
    ]

    shells = [subshells[0]]
Exemple #2
0
    native_cs[i] = cs_0 + (cs_1 - cs_0) * lin_interp
    #native_cs[i] = numpy.exp(numpy.log(cs_0) + numpy.log(cs_1/cs_0)*log_interp)
    print 'shell = ', shell, '\tcs = ', '%.16e' % native_cs[i]

    total_cs += native_cs[i]
print '---------------------------------------------------'
print '\ttotal Native = ', '%.16e' % total_cs

# -------------------------------------------------------------------------- ##
#  ACE Data
# -------------------------------------------------------------------------- ##
data_list = cs_list.get('Au')
file_name = datadir + data_list.get('electroatomic_file_path')
table_name = data_list.get('electroatomic_table_name')
table_start = data_list.get('electroatomic_file_start_line')
ace_file = ACE.ACEFileHandler(file_name, table_name, table_start)
xss_extractor = ACE.XSSEPRDataExtractor(ace_file.getTableNXSArray(),
                                        ace_file.getTableJXSArray(),
                                        ace_file.getTableXSSArray())

energy_grid = xss_extractor.extractElectronEnergyGrid()
index = 0
for i in range(0, energy_grid.size):
    if energy_grid[i] <= energy:
        index = i

energy_0 = energy_grid[index]
energy_1 = energy_grid[index + 1]
lin_interp = (energy - energy_0) / (energy_1 - energy_0)
log_interp = numpy.log(energy / energy_0) / numpy.log(energy_1 / energy_0)
# -------------------------------------------------------------------------- ##
#  Electroionization Data
# -------------------------------------------------------------------------- ##
h_native_list = cs_list.get( 'H-Native' )
h_ace_list = cs_list.get( 'H_v14' )
file_names = ['/home/lkersting/frensie/src/packages/test_files/ace/test_pb_epr_ace_file.txt', '/home/lkersting/frensie/src/packages/test_files/ace/test_pb_epr14_ace_file.txt']
table_names = ['82000.12p','82000.14p']

### -------------------------------------------------------------------------- ##
###  Forward Elastic Unit Test Check
### -------------------------------------------------------------------------- ##
h_native_file_name = datadir + h_native_list.get( 'electroatomic_file_path' )
native_data = Native.ElectronPhotonRelaxationDataContainer( h_native_file_name )
h_ace_file_name = datadir + h_ace_list.get( 'electroatomic_file_path' )
ace_file = ACE.ACEFileHandler( h_ace_file_name, "1000.14p", 1 )
ace_data = ACE.XSSEPRDataExtractor( ace_file.getTableNXSArray(), ace_file.getTableJXSArray(), ace_file.getTableXSSArray() )

energy_grid = native_data.getElectronEnergyGrid()

native_dist = Collision.createScreenedRutherfordElasticDistribution( native_data )
ace_dist = Collision.createScreenedRutherfordElasticDistribution( ace_data )

energies = [1e5, 1e-4]
angles = [0.999999, 0.9999995, 1.0]

print "\n----------------------------"
print "----- Native H Tests -----"
print "----------------------------"

print "\n--- evaluate ---\n";