Google Colab: Four-Model Comparison
The standalone Colab notebook is the fastest way to run the four public
3ptWL-mod theory branches without cloning the repository. It installs the
3ptWL-mod source distribution from PyPI, downloads one versioned example
power spectrum, runs every branch with a common numerical configuration, and
plots the results on shared scales.
The notebook source is also available on GitHub.
Models
The labels used in the notebook match the model reference and the
tree_level run-time parameter:
Notebook label |
|
Physical approximation |
|---|---|---|
SPT |
|
Standard perturbation theory. |
Tree |
|
Power-spectrum-squared approximation. |
EFT |
|
Effective-field-theory inspired branch. |
Halo Model |
|
Takahashi/Halo-model inspired branch. |
See 3PCF Model Reference for the scientific conventions behind these branches. They are different physical approximations, not successive numerical accuracy levels.
What the Notebook Does
The notebook is independent of a repository checkout. In order, it:
installs the native GSL and FFTW3 dependencies available in Colab;
installs
3ptWL-mod==1.0.0from PyPI;downloads
linear_pk_Takahashi_z0.txtfrom the matchingv1.0.0tag;runs SPT, Tree, EFT, and Halo Model with the same input and grid settings;
creates a four-by-five map of \(|\zeta_m|\) for
m=0,...,4;compares one-dimensional slices at three fixed values of \(\theta_2\); and
packages the numerical outputs and figures into a zip archive.
The main map uses one logarithmic color scale for all 20 panels. This makes amplitude differences physically visible; a branch whose values fall below the displayed lower bound will therefore appear at the lowest color.
Fast and Higher-Resolution Modes
The default FAST_MODE=True configuration uses:
Nell = 48
chiQuadSteps = 80
GLpoints = 24
mMax = 4
Set FAST_MODE=False to use the repository example settings:
Nell = 64
chiQuadSteps = 120
GLpoints = 32
mMax = 4
Both configurations are tutorial settings. Before using predictions in an analysis, increase the relevant grid controls and establish convergence over the angular range and model branch of interest. Replace the example power spectrum with one generated for the intended cosmology and redshift.
Generated Files
The notebook writes its products beneath 3ptwl_colab/ in the Colab
runtime. The principal figures are:
four_models_3pcf_maps.png;four_models_3pcf_slices.png.
The optional final cell creates 3ptwl_four_models_results.zip for download.
The runtime filesystem is temporary, so download results before closing the
session.
Local Use
The same notebook can be opened locally from
examples/3ptWL_mod_four_models_colab.ipynb. Install the native
prerequisites described in Installation first. Outside Colab the
notebook skips the apt-get step and uses pip in the active Python
environment.