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

Search for Material Nuclides containing just elemental data. #642

Open
MicahGale opened this issue Jan 23, 2025 · 0 comments · May be fixed by #608
Open

Search for Material Nuclides containing just elemental data. #642

MicahGale opened this issue Jan 23, 2025 · 0 comments · May be fixed by #608
Assignees
Labels
alpha testing Issues that came up during alpha testing feature request An issue that improves the user interface.
Milestone

Comments

@MicahGale
Copy link
Collaborator

MicahGale commented Jan 23, 2025

Is your feature request related to a problem? Please describe.

Sometimes you get a model with legacy nuclear data, e.g., 26000.50c that you want to replace.
However, if you do problem.materials.get_containing("26000.50c") you will get all iron isotopes.
It's unclear right now if the library extension is being matched (needs verification).

While in some cases this is a nice behavior, its not always the best.

Describe the solution you'd like

I think an strict parameter would be helpful.

So problem.materials.get_containing("26000.50c", strict=True) would exactly match the required nuclide.
This would also be helpful for finding library-less nuclides.

Describe alternatives you've considered

The alternatives might be:

for material in problem.materials:
    for nuclide in material.nuclides:
        if nuclide == "2600.50c": 
             yield material
             break

Additional context
This is for version 1.0.0a1.

@MicahGale MicahGale added alpha testing Issues that came up during alpha testing feature request An issue that improves the user interface. labels Jan 23, 2025
@MicahGale MicahGale self-assigned this Jan 23, 2025
@MicahGale MicahGale added this to the M&C workshop milestone Jan 23, 2025
@MicahGale MicahGale linked a pull request Jan 23, 2025 that will close this issue
21 tasks
@MicahGale MicahGale modified the milestones: M&C workshop, release-1.0.0 Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha testing Issues that came up during alpha testing feature request An issue that improves the user interface.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant