Skip to content

Commit

Permalink
added gaussian broadening option to spec func
Browse files Browse the repository at this point in the history
  • Loading branch information
abhirup-m committed Dec 9, 2024
1 parent f22690f commit 40c13e4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/correlations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -342,13 +342,14 @@ function SpecFunc(
degenTol::Float64=0.,
normalise::Bool=true,
silent::Bool=false,
broadFuncType::String="lorentz",
)

@assert length(eigVals) == length(eigVecs)

@assert broadFuncType ("lorentz", "gauss")
@assert issorted(freqValues)

broadeningFunc(x, standDev) = standDev ./ (x .^ 2 .+ standDev .^ 2)
broadeningFunc(x, standDev) = ifelse(broadFuncType=="lorentz", standDev ./ (x .^ 2 .+ standDev .^ 2), exp.(-0.5 .* ((x ./ standDev).^2)) ./ (standDev .* (2 π)^0.5 ))

energyGs = minimum(eigVals)
specFunc = 0 .* freqValues
Expand Down

0 comments on commit 40c13e4

Please sign in to comment.