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

added neutronics tools #23

Merged
merged 17 commits into from
Dec 13, 2024
Merged

Conversation

SteSeg
Copy link
Contributor

@SteSeg SteSeg commented Dec 9, 2024

Added the neutronics folder in the package with the neutron generator characteristics and a function to generate it as openmc source.

Copy link
Collaborator

@RemDelaporteMathurin RemDelaporteMathurin left a comment

Choose a reason for hiding this comment

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

Thanks @SteSeg for taking care of the neutronics part!

  • The CI is failing here because it's missing the h5py package. It is also missing openmc as a dependency. Could you add it to the requirements?

    dependencies = ["numpy", "pint", "scipy", "matplotlib", "sympy", "pandas"]

  • Moreover you will have to add it to the ci workflow file?

  • Also the _version.py file should not be tracked. Did you do git add .? 😈

  • Can we add a test to check that this function works?

libra_toolbox/_version.py Outdated Show resolved Hide resolved
libra_toolbox/neutronics/neutron_source.py Outdated Show resolved Hide resolved
libra_toolbox/neutronics/neutron_source.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@RemDelaporteMathurin RemDelaporteMathurin left a comment

Choose a reason for hiding this comment

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

The CI is still not passing due to openmc not being installed with conda. I can take care of this if you want!

Got a few other comments

# angular and energy distribution

from pathlib import Path
from collections.abc import Iterable
Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably not important but do you know if there's a difference between this and

from typing import List

libra_toolbox/neutronics/neutron_source.py Outdated Show resolved Hide resolved
libra_toolbox/neutronics/neutron_source.py Outdated Show resolved Hide resolved
# angle column names
angles = df.columns[1:]
# angular bins in [0, pi)
pbins = np.cos([np.deg2rad(float(a)) for a in angles] + [np.pi])
Copy link
Collaborator

Choose a reason for hiding this comment

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

pretty sure there's a way to use angles directly without iterating through it and converting it to a float. pandas builds upon numpy

libra_toolbox/_version.py Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
SteSeg and others added 6 commits December 12, 2024 16:40
Co-authored-by: Rémi Delaporte-Mathurin <[email protected]>
Co-authored-by: Rémi Delaporte-Mathurin <[email protected]>
Copy link
Collaborator

@RemDelaporteMathurin RemDelaporteMathurin left a comment

Choose a reason for hiding this comment

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

CI passes 🎉

@RemDelaporteMathurin RemDelaporteMathurin merged commit 0087d5c into LIBRA-project:main Dec 13, 2024
2 checks passed
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.

2 participants