How to run a Julia package using Visual Studio Code?

I am reading the article -
“Quasinormal mode/grey-body factor correspondence for Kerr black holes”, which use the the following pacakge

to compute the the QNM frequencies of the fundamental mode and the
first overtone of gravitational perturbations (s = −2) for Kerr Black Holes, e.g. Table I.

I have never used Julia before, and I tried to run this package using VS Code. However, I keep encountering error messages when running the code, and it fails to compute any results.


This image shows some error messages.

Welcome to the Julia community!

The tests call qnmfunction(; s,l,m,n,a) but that method is commented out. Only qnmfunction(::Custom; ...) exists, so Julia throws a MethodError for the keyword-only call.

Also, the old qnmfunction depends on qnm(...) from QnmRotationSeries.jl, and the entire legacy include chain in src/KerrQuasinormalModes.jl is commented out, so that dependency chain is broken. :melting_face:

Fix

Restore a keyword qnmfunction wrapper. A simple solution is to add the following in src/ModeFunctionInterface/Interface.jl right after the block comment that ends around line ~188 (just above struct Custom end):

function qnmfunction(; s=-2,l=2,m=2,n=0,a=0.00, N=150)
    seq = ModeSequence(; s=s, l=l, m=m, n=n)
    seq(a; N=N)
end

This keeps the old interface working while routing through the internal solver stack. After adding it, Pkg.test() passes. :wink:

Thank you for your help! Can you tell me how to use the package to compute the quasi-normal modes, for example, the author’s instruction:

Ω = ModeSequence(s=-2,l=2,m=2,n=0) # Pick a mode
ψ = Ω(0.8) # Get the QNM mode function at a = 0.8

ψ.ω # = 0.5860169749084593 - 0.0756295523345646im
ψ.Alm # = 2.5852939720024275 + 0.20529748567633602im.

I can’t get these results.

Sorry, I can’t help with that. I can only fix structural errors in the code, but I know nothing about Quasinormal Modes for Kerr Black holes.

I suggest you modify the title of this post now to accurately describe your question, thereby attracting experts who can answer it.

For example: “How to use KerrQuasinormalModes.jl to compute the quasi-normal modes.”

1 Like