Skip to content

ENH Pass result reader settings at construction #521

@drewejohnson

Description

@drewejohnson

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions