<jupyter_start><jupyter_text>Example script for ysprod  This script demonstrates the usage of ysprod and ysprod181003550 as presented in arxiv:18100.3550 Conventions:There is a conveniton choice for the sign of the complex part of the ringdown frequency that translates into a convention for the sign of the complex part of the inner-product.By default, $\omega_{\ell m n}$, sep_const = positive.leaver(dimensionless_spin,l,m,n=0,...)[0], outputs QNM frequencies with negative valued complex part. This corresponds to a multipolar convention in which there is an explicity minus sign in the definition of the time domain phase: $h_{\ell m n} = A_{\ell m n} \; exp(-im\omega_{\ell m n})$. However, when considering spherical harmonic moments (eg from NR), a common convention is that positive $m$ moments (ie "modes") have positive frequencies. In that context, we are interested in $h_{\ell m n} = A_{\ell m n} \; exp(im\omega*_{\ell m n})$, where $\omega*_{\ell m n}$ is the complex conjugate of $\omega_{\ell m n}$. As a result, it is necessary to consider the complex conjugate of output from ysprod when seeking to convert from spherical to spheroidal data.In short, if the your spherical harmonic mass-quadrupole (\ell,m)=(2,2), has positive frequencies, then you'll want conj( ysprod(...) ).  Import usefuls<jupyter_code>%load_ext autoreload
%autoreload 2
%matplotlib inline
# The Important Things
from positive import *
from nrutils.core.units import *
from matplotlib.pyplot import *
from numpy import *<jupyter_output>([0;36mpositive[0m)>> Applying custom matplotlib settings.<jupyter_text>Define multipole indeces<jupyter_code>#
dimensioless_bh_spin = linspace(0,0.99,2e2)

# Define spherical indeces
L,M = 3,2

# Define spheroidal indeces 
lmn = (2,2,0)<jupyter_output><empty_output><jupyter_text>Calculate numerical inner-productsNote that the conjugate is taken<jupyter_code># Calculate spherical-spheroidal
sigma = array([ ysprod( j, L, M, lmn ) for j in dimensioless_bh_spin ]).conj()<jupyter_output><empty_output><jupyter_text>Evaluate related modelNote that the conjugate is taken<jupyter_code># 
sigma_from_model = ysprod181003550( dimensioless_bh_spin, L, M, lmn ).conj()<jupyter_output><empty_output><jupyter_text>Plot for comparison<jupyter_code>#
figure( figsize=1.2*figaspect(0.618/2) )

#
subplot(1,2,1)
plot( dimensioless_bh_spin, abs(sigma), lw=4, color='k', alpha=0.2 )
plot( dimensioless_bh_spin, abs(sigma_from_model), ls='-' )
xlabel('$j$')
ylabel(r'$\sigma_{\bar{\ell}\bar{m}\ell m n}$')

#
subplot(1,2,2)
plot( sigma.real, sigma.imag, lw=4, color='k', alpha=0.2 )
plot( sigma_from_model.real, sigma_from_model.imag, ls='-' )
xlabel(r'$\mathrm{Re} \; \sigma_{\bar{\ell}\bar{m}\ell m n}$')
ylabel(r'$\mathrm{Im} \; \sigma_{\bar{\ell}\bar{m}\ell m n}$')

#
tight_layout(w_pad=2)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12680521310320536, 'fraction_numerical': 0.023599859105318775, 'mean_word_length': 5.943765281173594, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '510261', 'license': 'MIT', 'n_tokens_mistral': 1027, 'n_tokens_neox': 956, 'n_words': 298, 'path': 'examples/ysprod_example.ipynb', 'repo_name': 'llondon6/koalas', 'size': '2839'}