NJOY2016 icon indicating copy to clipboard operation
NJOY2016 copied to clipboard

add verbose, extended precision file format output option to COVR

Open gregfi opened this issue 1 year ago • 0 comments

This change creates an alternative to the BOXR output file in COVR using currently-undefined values of the matype parameter. Modifying test #65 as:

covr
 41 51 0 /
 1 /
 u235 /
 /
9228 0 0 0 /
stop

The resulting output file (tape51) can be read with conventional Python as:

import numpy as np
import re
from io import StringIO

# read data from file
fileData=open('tape51').read()

# split into substrings based on "#"
splitData=list(filter(None, re.split('^#.*$', fileData, re.DOTALL, re.MULTILINE)))

# load into numpy arrays
erg, xs, stdev, covr = [np.loadtxt(StringIO(chunk)) for chunk in splitData]

When processing IRDFF covariance matrices into multigroup formats, as a result of the increased precision, the negative eigenvalues I get from the re-binning process drop by roughly 3 orders of magnitude.

gregfi avatar Sep 23 '23 19:09 gregfi