<jupyter_start><jupyter_text>Exclusion functionsSimple usage<jupyter_code>import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
from gzpt import hzpt
from gzpt.tracers import AutoCorrelator

klin,plin = np.loadtxt('../tests/test_plin_planck_z0.55.txt',unpack=True) #load some input linear power
model = hzpt(klin,plin) #instantiate the hzpt model (at the plin cosmology)
kk = np.logspace(-3,1)
rr = np.logspace(-1,2)<jupyter_output><empty_output><jupyter_text>Configuration space  $F_{\rm{exc}}(r)$<jupyter_code>hh = AutoCorrelator([1e-3,2,350,30,5],model,params_exc=[1])
hh0 = AutoCorrelator([1e-3,2,350,30,5],model)

Fr_Exp = hh.Fr_excl(rr,2)
Fr_ExpLog = hh.Fr_excl(rr,2,.1)
plt.plot(rr,Fr_Exp,label='Exp') 
plt.plot(rr,Fr_ExpLog,ls=':',label='ExpLog') 
plt.xlim(.5,50)
plt.xscale('log')
plt.legend()
plt.xlabel(r'$r \ [\rm{Mpc}/h]$')
plt.ylabel(r'$F_{\rm{exc}}(r) $')
plt.show()<jupyter_output><empty_output><jupyter_text>Model with and without exclusion<jupyter_code>plt.plot(rr,hh.Xi()(rr),label=r'$\xi^{(d)}$')
plt.plot(rr,hh0.Xi()(rr),label=r'$\xi^{(c)}$',ls='--') 
plt.xscale('log')
plt.legend()
plt.xlabel(r'$r \ [\rm{Mpc}/h]$')
plt.ylabel(r'$\xi(r) $')
plt.ylim(-2,20)
plt.show()<jupyter_output>R,sigma [1] None<jupyter_text>Fourier space  $F_{\rm{exc}}(k)$<jupyter_code>nbar=1e-4
hh = AutoCorrelator([nbar,4,350,30,5],model,params_exc=[2])
hh0 = AutoCorrelator([nbar,4,350,30,5],model)
Fk = hh.Fk_excl(kk,2)
plt.semilogx(kk,Fk) #very similar to k-space top-hat, but slope is slightly different
plt.xlabel(r'$k \ [h/\rm{Mpc}]$')
plt.ylabel(r'$F_{\rm{exc}}(k) $')
plt.show()<jupyter_output><empty_output><jupyter_text>Model with and without exclusion<jupyter_code>plt.loglog(kk,hh.Power()(kk),label=r'$P^{(d)}$')
plt.loglog(kk,hh0.Power()(kk),ls='--',label=r'$P^{(c)}$')
plt.axhline(1/nbar,ls='--',c='k',label='Poisson')
plt.xlim(1e-2,5)
plt.legend()
plt.xlabel(r'$k \ [h/\rm{Mpc}]$')
plt.ylabel(r'$P(k) \ [\rm{Mpc}/h]^{3}$')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.23484848484848486, 'fraction_numerical': 0.031818181818181815, 'mean_word_length': 8.045662100456621, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, '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': '45690', 'license': 'MIT', 'n_tokens_mistral': 970, 'n_tokens_neox': 913, 'n_words': 108, 'path': 'examples/k_exclusion.ipynb', 'repo_name': 'jmsull/gzpt', 'size': '1980'}