Skip to content

Commit

Permalink
fix polarisation bug?
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbrahms committed Jan 20, 2024
1 parent 7992957 commit d304801
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Stats.jl
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function peakintensity(grid, modes::Modes.ModeCollection; components=:y)
Modes.to_space!(Et0, Et, (0, 0), tospace; z=z)
if npol > 1
d["peakintensity"] = c*ε_0/2 * maximum(eachindex(grid.t)) do ii
sum(abs2, Et0[ii, :]; dims=2)
sum(abs2, Et0[ii, :])
end
else
d["peakintensity"] = c*ε_0/2 * maximum(abs2, Et0)
Expand Down

0 comments on commit d304801

Please sign in to comment.