VirtualPhotonics / Vts.Gui.Wpf

WPF Application using the Vts library
Other
3 stars 0 forks source link

Monte Carlo panel Save Simulation Results button data saving needs improvement #21

Closed hayakawa16 closed 5 years ago

hayakawa16 commented 5 years ago

When a user runs a simulation using the Monte Carlo panel and clicks "Save Simulation Results". 1) The user has the option to "Make New Folder". This needs to be done and the folder name needs to match the name of the infile used (minus the .txt extension). Otherwise the results are saved to a "results" folder and this will not match the name of the infile.txt inside. 2) The results are saved to the designated folder along with load_results_script.m, loadMCResults.m, readBinaryData.m and the jsonlab folder. These files need to be up one level to be used directly. In other words, load_results_script.m is going to be looking for a "datanames" specified folder and inside that folder it is expecting the infile.txt. 3) The actions above do not match those performed when the MCCL and MCPP are run. When the MCCL is executed, the output is put to a folder with name specified by "OutputName" and writes the results to that folder along with the infile named as OutputName.txt.

Suggested fixes: 1) Use the MCCL/MCPP naming convention and use the OutputName specified in the infile as the results folder name. Write the results to this folder along with the infile renamed to OutputName.txt. 2) Save the Matlab script files and folders to the same level as where the OutputName folder resides.

hayakawa16 commented 5 years ago

I modified MC_SaveSimulationResultsToFolder to save all files/folders to "results" folder. Within "results" a subfolder is created named infile.OutputName where the detector results are saved. Within this subfolder the infile is also saved with name OutputName.txt. This allows the user to just have to change the "datanames" in load_results_script.m to OutputName and run it to produce plots.