Bright Configuration

This module provides tools for manipulating bright-namespace level configuration variables which may affect all fuel cycle components.

All functionality may be found in the bright_config module:

import bright.bright_config

Configuration Object

class bright.bright_config.BrightConf

A class whose attributes expose C++ bright namespace variables. The bright_conf object is a singleton instance of this class.

BRIGHT_DATA

Overide for directory path which is (by default) read in from an environmental variable of the same name.

track_nucs

Set of nuclides (in zzaaam form, see pyne) which components should track.

track_nucs_order

Array nuclides which determines the order of track_nucs.

verbosity

Determines the at which to print messages. Lower numbers mean fewer messages (default 0).

write_hdf5

Boolean flag for whether to write binary HDF5 output.

write_text

Boolean flag for whether to write flat text file output.

write_hdf5

Boolean flag for whether to write binary HDF5 output.

output_filename

Path to outputh file.

Helper Functions

bright.bright_config.bright_start()

Handles bright initialization. Reads in the ‘BRIGHT_DATA’ environment variable.

bright.bright_config.load_track_nucs_hdf5(filename, datasetname="", clear=False)

This convience function tries to load the track_nucs set from a dataset in an HDF5 file. The dataset must be of integer type. String-based nuclide names are currently not supported.

Parameters :

filename : str

Path to the data library.

dataset : str, optional

Dataset name to grab nuclides from.

clear : bool, optional

Flag that if set removes the currrent entries from track_nucs prior to loading in new values.

Notes

If the dataset argument is not provided or empty, the function tries to load from various default datasets in the following order:

"/track_nucs"  
"/Isos2Track"
"/isostrack"   
"/IsosTrack"
"/isotrack"   
"/IsoTrack"    
"/ToIso"
"/ToIsos"
"/ToIso_zz"
"/ToIso_MCNP"
"/FromIso"  
"/FromIsos"  
"/FromIso_zz" 
"/FromIso_MCNP"
bright.bright_config.load_track_nucs_text(filename, clear=False)

This convience function tries to load the track_nucs set from a text file. The nuclide names may use any naming convention. Mixing different conventions in the same file is allowed. Whitespace is required between isotopic names.

Parameters :

filename : str

Path to the data library.

clear : bool

Flag that if set removes the currrent entries from track_nucs prior to loading in new values.

bright.bright_config.sort_track_nucs()

This function sorts the track_nucs and places the result in track_nucs_order.

Helper Data

bright.bright_config.lib

Path to pure C++ library directory.

bright.bright_config.includes

Path to C++ and Cython header file directory.

bright.bright_config.bright_data

Path to bright data directory.

Previous topic

Storage Class

Next topic

API Generation

This Page