Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add verbose, extended precision file format output option to COVR #310

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

gregfi
Copy link

@gregfi gregfi commented Sep 23, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant