JYU-IBA / potku

Potku is analysis and simulation software for ToF-ERD measurements
https://www.jyu.fi/science/en/physics/research/infrastructures/accelerator-laboratory/pelletron/potku/
GNU General Public License v2.0
7 stars 7 forks source link

Fix simulation specific settings and simulation discovery #296

Closed samivout closed 1 year ago

samivout commented 1 year ago

I noticed that when not using request settings on the simulation side, the settings were not saved properly due to modules/simulation.py function to_file being commented out completely. Saving is fixed by adding few lines that use the ConfigManager class to save the actual simulation data and uncommenting the lines corresponding to simulation specific settings.

Additionally in PR #295 I changed the discovery of simulation files to be tied to .mccfg files instead of .simulation files. This lead to a problem with discovering old simulations that don't yet have a .mccfg file in them. I changed the discovery to look for both .simulation and .mccfg files and to break the for file loop once either one is dicovered in order to prevent one simulation being discovered twice.