|
7 | 7 | # sort |
8 | 8 | ra, dec, redshift, halo_mass = sort_halo_catalog(ra, dec, redshift, halo_mass) |
9 | 9 |
|
10 | | -print("Number of halos: ", length(halo_mass))</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi"> Downloading artifact: tsz_example |
| 10 | +print("Number of halos: ", length(halo_mass))</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi"><span class="sgr32"><span class="sgr1"> Downloading</span></span> artifact: tsz_example |
11 | 11 | Number of halos: 2455621</code></pre><p>Next, we'll generate a cosmology. Note how we use Float32 throughout.</p><pre><code class="language-julia hljs">cosmo = get_cosmology(h=0.6774f0, OmegaM=0.3075f0) |
12 | 12 | x, y, z = XGPaint.ra_dec_redshift_to_xyz(ra, dec, redshift, cosmo) |
13 | 13 | halo_pos = [x'; y'; z';] |
|
44 | 44 | shape, wcs = geometry(CarClenshawCurtis{Float64}, box, 0.5 * Pixell.arcminute) |
45 | 45 | m = Enmap(zeros(Float32, shape), wcs) |
46 | 46 | XGPaint.paint!(m, 143.0f0 * 1.0f9, model, sources, fluxes_cen, fluxes_sat) |
47 | | -plot(log10.(m), c=:coolwarm)</code></pre><img src="8d624de9.svg" alt="Example block output"/><h2 id="Sources-from-HDF5"><a class="docs-heading-anchor" href="#Sources-from-HDF5">Sources from HDF5</a><a id="Sources-from-HDF5-1"></a><a class="docs-heading-anchor-permalink" href="#Sources-from-HDF5" title="Permalink"></a></h2><p>To work with the Websky halo catalogs, you can't just use the example catalogs! One first loads the halo positions and masses into memory with <a href="../api/#XGPaint.read_halo_catalog_hdf5-Tuple{Any}"><code>read_halo_catalog_hdf5</code></a>. This package uses halo positions in the shape <span>$(3, N_{\mathrm{halos}})$</span>, where the first dimension is the Cartesian coordinates <span>$x, y, z$</span>.</p><pre><code class="language-julia hljs">using XGPaint |
| 47 | +plot(log10.(m), c=:coolwarm)</code></pre><img src="c86ad964.svg" alt="Example block output"/><h2 id="Sources-from-HDF5"><a class="docs-heading-anchor" href="#Sources-from-HDF5">Sources from HDF5</a><a id="Sources-from-HDF5-1"></a><a class="docs-heading-anchor-permalink" href="#Sources-from-HDF5" title="Permalink"></a></h2><p>To work with the Websky halo catalogs, you can't just use the example catalogs! One first loads the halo positions and masses into memory with <a href="../api/#XGPaint.read_halo_catalog_hdf5-Tuple{Any}"><code>read_halo_catalog_hdf5</code></a>. This package uses halo positions in the shape <span>$(3, N_{\mathrm{halos}})$</span>, where the first dimension is the Cartesian coordinates <span>$x, y, z$</span>.</p><pre><code class="language-julia hljs">using XGPaint |
48 | 48 | using Healpix |
49 | 49 |
|
50 | 50 | ## Load halos from HDF5 files, establish a CIB model and cosmology |
|
109 | 109 | # for this test, do it only on a subset of the halos |
110 | 110 | sources = generate_sources(custom_model, cosmo, halo_pos[:,1:10], halo_mass[1:10]) |
111 | 111 |
|
112 | | -print(sources.lum_cen)</code></pre><p>This particular change zeros out the luminosities, and indeed you should see the result is an array of zeroes.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../rsz/">« Relativistic Sunyaev–Zeldovich Effect</a><a class="docs-footer-nextpage" href="../api/">API »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.14.1 on <span class="colophon-date" title="Tuesday 26 August 2025 05:38">Tuesday 26 August 2025</span>. Using Julia version 1.11.6.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> |
| 112 | +print(sources.lum_cen)</code></pre><p>This particular change zeros out the luminosities, and indeed you should see the result is an array of zeroes.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../rsz/">« Relativistic Sunyaev–Zeldovich Effect</a><a class="docs-footer-nextpage" href="../api/">API »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.14.1 on <span class="colophon-date" title="Tuesday 26 August 2025 06:20">Tuesday 26 August 2025</span>. Using Julia version 1.11.6.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> |
0 commit comments