Skip to content

Commit

Permalink
make sure use max_ndet
Browse files Browse the repository at this point in the history
  • Loading branch information
Lightup1 committed Sep 18, 2023
1 parent 0546fdb commit 828ef6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/char-coeff-new-indexing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ function MathieuExponent(a,q;ndet::Int=20,has_img::Bool=true,max_ndet::Int=1000)
_,idx=findmin(abs,vals)
return ν,vecs[:,idx]
elseif ndet<max_ndet
MathieuExponent(a,q;ndet=2*ndet,has_img=false,max_ndet=max_ndet)
MathieuExponent(a,q;ndet=min(2*ndet,max_ndet),has_img=false,max_ndet=max_ndet)
else
@warn "Expect real output for a=$a and q=$q, but the result is complex even for ndet=$ndet."
alpha=2*asin(sqrt(Complex(beta)))/pi
Expand Down

0 comments on commit 828ef6c

Please sign in to comment.