Beispiel #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]]
database = Data.ScatteringCenterPropertiesDatabase(database_path)
au_properties = database.getAtomProperties(Data.ZAID(79000))

au_electron_prop = au_properties.getSharedElectroatomicDataProperties(
    Data.ElectroatomicDataProperties.ACE_EPR_FILE, 14)

file_name = datadir + au_electron_prop.filePath()
table_start = au_electron_prop.fileStartLine()
table_name = au_electron_prop.tableName()

# -------------------------------------------------------------------------- ##
# Electroatom Tests
# -------------------------------------------------------------------------- ##

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()

###
### Electroatom/Electroatom Core Test Check
###
print "\n----- Electroatom ACE Factory Class -----"
brem_cross_sections = xss_extractor.extractBremsstrahlungCrossSection()
excitation_cross_sections = xss_extractor.extractExcitationCrossSection()
ionization_cross_sections = xss_extractor.extractElectroionizationCrossSection(
)
tot_elastic_cross_sections = xss_extractor.extractElasticTotalCrossSection()
# -------------------------------------------------------------------------- ##
#  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";