Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #37 +/- ##
=========================================
Coverage ? 71.57%
=========================================
Files ? 57
Lines ? 2881
Branches ? 0
=========================================
Hits ? 2062
Misses ? 819
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@TacHawkes there is something weird going on with the new "psf" intensity calculation. Tests keep failing randomly, I am wondering if it might be due to the random support vector in |
I have added a commit which makes normal3d deterministic. The alternative would be to increase the atol threshold slightly. |
|
Some thoughts from review.
function solve_system!(sys::System, beam; reset_detectors::Bool = false)
if reset_detectors
for obj in sys.objects
if obj isa Detector
empty!(obj)
end
end
end
return BeamletOptics.solve_system!(sys, beam)
end
|
TacHawkes
left a comment
There was a problem hiding this comment.
See my other comment.
Review
initialize!(::AbstractObject) = nothing
initialize!(d::Detector) = empty!(d)There are some use cases where a user might want to use the overwrite feature, e.g. multiple runs of
|
|
I tried to have a look into the second case. Cthulhu and 1.12 seem to be a bit broken but in general the type inference seems to struggle quite a bit, though the code looks fine. I will have a more in-depth look later. We might need some more function barriers to allow the compiler to optimize better. There are ::Any inferences at weird places. |
… for type stability
|
The type of Is this an issue worth solving @TacHawkes ? Otherwise I will merge this PR. |
This PR addresses the following enhancements and issues:
Overall, this PR is a major breaking change in regards to the detector API, hence the update to
v0.11.0ToDo's
electric_fieldfct. forPolarizedRay