You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Better way to check if plot settings are valid #77
Right now we get a lot of errors if the plot_settings.pkl file doesn't match the current model closely enough when starting the plotter. This happens often when building a model:
Use plotter to view model
Discover problem in model
Close GUI (plot_settings.pkl is written)
Model is extended or changed
Re-load plotter and get a long list of errors about keys not found in the ID mapping
It would be really useful to have some kind of automated detection as to whether or not that file is still valid for the model. This will likely require some hashing of the XML files, which might be a useful feature to add to OpenMC itself.
Is there a simple way to replicate this error with the test files present in this repo? I am doing the following, and it is not triggering any errors when I re-open:
open plotter
close plotter - writes plot_settings.pkl file
change one of the .xml files (I tried changing material definitions, changing dimensions on existing surfaces, changing cell IDs to be different integers)
Reopen plotter so it loads the plot_settings.pkl file. I would expect the errors here, but I don't get any.
Okay I want to double check the desired behavior before I open this PR:
Right now, if the model is viewed by cell in the GUI, and then a material ID changes after close, no error is triggered. And vice versa. Do we want to ignore plot_settings.pkl file no matter what if the cell or mat IDs change? Or only if the saved view has changed from what those IDs are? I am guessing the latter (so if materials change, but we are viewing by cell, we can still use the plot_settings.pkl file).
Activity
kkiesling commentedon May 13, 2022
Is there a simple way to replicate this error with the test files present in this repo? I am doing the following, and it is not triggering any errors when I re-open:
plot_settings.pklfileplot_settings.pklfile. I would expect the errors here, but I don't get any.kkiesling commentedon May 13, 2022
Wait- changing one material ID to new integer seemed to work to create these errors. nvm
kkiesling commentedon May 13, 2022
Okay I want to double check the desired behavior before I open this PR:
Right now, if the model is viewed by
cellin the GUI, and then a material ID changes after close, no error is triggered. And vice versa. Do we want to ignoreplot_settings.pklfile no matter what if the cell or mat IDs change? Or only if the saved view has changed from what those IDs are? I am guessing the latter (so if materials change, but we are viewing by cell, we can still use theplot_settings.pklfile).kkiesling commentedon May 13, 2022
never mind again - I don't think the latter above actually works. I will ignore pkl file if either cells or mat IDs change.