fispact / pypact

A Python package for parsing FISPACT-II output
https://pypact.readthedocs.io/en/latest/
Apache License 2.0
25 stars 13 forks source link

meta stable isotopes mixed in with ppa plot #45

Closed areedc closed 2 years ago

areedc commented 2 years ago

Hey! I would like to use python to parse the FISPACT output but it seems that meta-stable isotopes are grouped together with non-metastable. (following along the "plotting" example on the main page.

When one plots, for example, Xe-135 then every other data point corresponds to Xe-135m. Which is pretty annoying.

Regards, Andrew

github-actions[bot] commented 2 years ago

Congratulations for submitting your first issue on pypact. Thanks for contributing!

thomasms commented 2 years ago

Hi @areedc , is this a bug with the parsing or just the plotting feature of the library? The plotting part of the package is indeed not well maintained, the development effort on that side never took off.

If pypact is failing to parse the FISPACT-II output correctly then that is something that needs fixing - do you think you could share the output file (or example of the file) so I can reproduce and potentially fix this issue?

Thanks for using pypact btw!

areedc commented 2 years ago

Hey Thomas. Now I've taken a look. The parser works fine. Metastable isotopes are treated as separate nuclide in the output.InventoryData.nuclide object. This issue is in the plotproperty function.

I wanted to use the plotproperty function to strip out a time series for each nuclide. But that was getting cluttered by combining the metastable nuclides with the ground state.

thomasms commented 2 years ago

OK, so I can indeed see the issue. I think it is this line here: https://github.com/fispact/pypact/blob/master/pypact/analysis/propertyplotter.py#L43, it just ignores the state is just ignored here. With some changes it should be possible to include this.

Feel free to make this changes.

areedc commented 2 years ago

Sweet! I just haven't had time to fix it but would have missed the change in pypact/library/nuclidelib.py!

thomasms commented 2 years ago

Fixed in PR #49.