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

Dealing with changing parameters between simulations using the angular redistribution matrix method #36

Open
phoebe-p opened this issue Aug 10, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@phoebe-p
Copy link
Member

Is your feature request related to a problem? Please describe.
As in #28, when using the angular redistribution matrix method, if an interface is changed between simulations, or options which affect the calculation of the matrices for a surface are changed, RayFlare does not currently recognize/'know' about this. This means that if you for example change the surface layers on an interface, or change the polarization or number of rays in options, but do not change the name of the interface or the name of the project (options.project_name), the previously-calculated matrices will just be loaded and used. This is confusing and can clearly lead to errors.

Describe the solution you'd like
There should be a way for RayFlare to check, per surface, if that surface and options relevant to its matrix calculation have changed between runs. Perhaps this information can be stored in a text file alongside the results, and that information can be compared with the new options/surface information at the start of the next run. Note that the check should be per surface because if only one surface has changed, it isn't necessary to recalculate matrices for both surfaces. Similarly, only changing the options which actually affect the method used for a surface should trigger re-calculation; if you are using ray-tracing for one of the surfaces and change the number of RCWA orders, that will not affect the matrices for the ray-traced surface.

Describe alternatives you've considered
The above would be quite involved -- perhaps an interim solution is to give a warning or yes/no text prompt saying that matrices already exist and asking the user if they want to recalculate, with the option of setting a 'force_recalculate' option or similar.

@phoebe-p phoebe-p added the enhancement New feature or request label Aug 10, 2021
@phoebe-p phoebe-p self-assigned this Aug 10, 2021
@michelgaglioni
Copy link

michelgaglioni commented Apr 8, 2024

I have been doing that manually simply by checking if the directory in which the simulation is saved is existent and deleting it after every iteration of the loop (os/shutil).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants