Checklist
Bug Report
Thanks for this great package, a real joy to work with it! I was running experiments where I use the IncoherentIrradiance class, both with and without using grad_mode for the torch backend. My results were different depending on whether grad_mode was on or off. I think I tracked down the source:
Describe the bug
In the differentiable path of the Irradiance class, the power map is indexed (y,x) here as opposed the (x,y) in the non-differentiable path here
I now fixed it myself by swapping the indices in the differentiable path. This gives consistent output between the two paths. I am not sure if this was somehow intended behaviour? If not, I can open a small PR with the changes!
Checklist
Bug Report
Thanks for this great package, a real joy to work with it! I was running experiments where I use the IncoherentIrradiance class, both with and without using grad_mode for the torch backend. My results were different depending on whether grad_mode was on or off. I think I tracked down the source:
Describe the bug
In the differentiable path of the Irradiance class, the power map is indexed (y,x) here as opposed the (x,y) in the non-differentiable path here
I now fixed it myself by swapping the indices in the differentiable path. This gives consistent output between the two paths. I am not sure if this was somehow intended behaviour? If not, I can open a small PR with the changes!