A monte carlo pin cell spectral code for nuclear engineering applications.
|
Utility functions to parse in ENDF cross-sections from text files into data arrays. More...
Go to the source code of this file.
Functions | |
void | setXSLibDirectory (const char *directory) |
Sets the directory for the cross-section library. More... | |
const char * | getXSLibDirectory () |
Returns the directory for the cross-section library directory. More... | |
int | restoreXSLibrary () |
Restores the cross-section library to its original, installed state. More... | |
int | parseCrossSections (const char *file, float *energies, float *xs_values) |
Parses an input file of cross-section data. More... | |
int | getNumCrossSectionDataPoints (const char *filename) |
Counts the number of lines in an cross-section input file. More... | |
Utility functions to parse in ENDF cross-sections from text files into data arrays.
int getNumCrossSectionDataPoints | ( | const char * | filename | ) |
Counts the number of lines in an cross-section input file.
filename | the file of interest |
const char* getXSLibDirectory | ( | ) |
Returns the directory for the cross-section library directory.
int parseCrossSections | ( | const char * | file, |
float * | energies, | ||
float * | xs_values | ||
) |
Parses an input file of cross-section data.
Loads the energy values (as eV) and the cross-section values (barns) into two float arrays. It takes in the energies in MeV since that is the most typical unit for ENDF nuclear data, but converts the values into eV during parsing.
file | the filename for the data |
energies | a pointer to a float array for the energies (MeV) |
xs_values | a pointer to a float array fo the xs values (barns) |
int restoreXSLibrary | ( | ) |
Restores the cross-section library to its original, installed state.
This function copies the original cross-section data files installed with PINSPEC from the pinspec/xs-lib/BackupXS folder into the main cross-section library directory pinspec/xs-lib. This function is primarily when a user is using PINSPEC's SLBW module to create artifical cross-sections from Reich-Moore date. This function is called anytime the python pinspec module is imported.
void setXSLibDirectory | ( | const char * | xs_directory | ) |
Sets the directory for the cross-section library.
xs_directory | character array for the cross-section library directory |