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

No inner sections #525

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

No inner sections #525

wants to merge 18 commits into from

Conversation

sanbrock
Copy link
Collaborator

No description provided.

basename = get_quantity_base_name(quantity.name)
for suffix, dtype in zip(
[
"__mean",
Copy link
Collaborator

@lukaspie lukaspie Feb 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should define these suffixes and their corresponding np functions and datatypes only once and import them everywhere else.

That is, in src/pynxtools/nomad/utils.py, define

__FIELD_STATISTICS = {
    "__mean": (np.mean, np.float64],
    "__var": (np.var, np.float64],
    ...
}

and then use this dict in both schema and parser.

@mkuehbach mkuehbach mentioned this pull request Feb 7, 2025
5 tasks
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.

4 participants