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

ENH Pass result reader settings at construction #521

Open
drewejohnson opened this issue Jun 17, 2024 · 0 comments
Open

ENH Pass result reader settings at construction #521

drewejohnson opened this issue Jun 17, 2024 · 0 comments
Assignees
Milestone

Comments

@drewejohnson
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Spin out from #339 to focus on providing relevant settings to the results reader at construction

Describe the solution you'd like
Pass zero or more of the supported settings at construction. If I just want to get keff,

r = ResultsReader(
    fp,
    serpentVersion="2.2.0",
    variables=["COL_KEFF"],
)

or a combination of variable groups (pre-defined variable collections) and exactly specified variables

r = ResultsReader(
    fp,
    serpentVersion="2.1.32",
    variableGroups=["times", "xs"],
    variables=["COL_KEFF"], 
    reshapeScatter=True,
    getB1XS=False,
    getInfXS=True,
)
so this reader would read things like `INF_TOT` for homogenized group constants, but not `B1_TOT` as the `*_TOT` data are in the `xs` group. So the full set of variables to be read would be a union of those expanded from `variableGroups` and those literally specified in `variables`.

**Describe alternatives you've considered**
Using the global settings object which #339 intends to deprecate

**Additional context**
Deprecation timeline https://github.com/CORE-GATECH-GROUP/serpent-tools/issues/339#issuecomment-2146109426
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant