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 5bf7927
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion 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 issorted(freqValues)

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

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

0 comments on commit 5bf7927

Please sign in to comment.