Computing fourth-order shear statistics on a mock shape catalog

In this notebook we compute the fourth-order shear correlation functions on a realistic shape catalog and compare it with the gaussian prediction. We then compute the fourth-order aperture mass statistics using the same setup as the one used in Fig 3 or Porth+ (2025).

[1]:
from astropy.table import Table
import numpy as np
from matplotlib import pyplot as plt

import orpheus

Obtaining a realistic mock shape catalog

We will run this notebook using a mocks shape catalog from the SLICS ensemble. First, let us download this catalog and read in its contents.

Note: If you want to run the notebook yourself, you need to update the savepath_SLICS variable.

[2]:
catname = "GalCatalog_LOS11.fits"
path_to_SLICS = "http://cuillin.roe.ac.uk/~jharno/SLICS/MockProducts/KiDS450/" + catname
savepath_SLICS = "/vol/euclidraid4/data/lporth/HigherOrderLensing/Mocks/SLICS_KiDS450/"
[3]:
#!wget {path_to_SLICS} -P {savepath_SLICS}
[4]:
slicscat = Table.read(savepath_SLICS + catname)
print(slicscat.keys())
['x_arcmin', 'y_arcmin', 'z_spectroscopic', 'z_photometric', 'shear1', 'shear2', 'eps_obs1', 'eps_obs2']
WARNING: UnitsWarning: 'UNKNOWN' did not parse as fits unit: At col 0, Unit 'UNKNOWN' not supported by the FITS standard.  If this is meant to be a custom unit, define it with 'u.def_unit'. To have it recognized inside a file reader or other code, enable it with 'u.add_enabled_units'. For details, see https://docs.astropy.org/en/latest/units/combining_and_defining.html [astropy.units.core]
WARNING: UnitsWarning: 'UNKNOWN' did not parse as fits unit: At col 0, Unit 'UNKNOWN' not supported by the FITS standard.  If this is meant to be a custom unit, define it with 'u.def_unit'. To have it recognized inside a file reader or other code, enable it with 'u.add_enabled_units'. For details, see https://docs.astropy.org/en/latest/units/combining_and_defining.html [astropy.units.core]
[5]:
fdownsample = 28 # Downsample mock to roughy match nbar of Porth+25 tests on SLICS
[6]:
shapecat = orpheus.SpinTracerCatalog(spin=2,
                                     pos1=slicscat["x_arcmin"][::fdownsample],
                                     pos2=slicscat["y_arcmin"][::fdownsample],
                                     tracer_1=slicscat["shear1"][::fdownsample],
                                     tracer_2=slicscat["shear2"][::fdownsample])
[10]:
print("Number of galaxies:%i --> effective nbar: %.3f/arcmin^2 on %.2f deg^2"%(
    shapecat.ngal, shapecat.ngal/(shapecat.len1*shapecat.len2), shapecat.len1*shapecat.len2/3600.))
Number of galaxies:109672 --> effective nbar: 0.305/arcmin^2 on 100.00 deg^2

Computation of full 4PCF (few bins)

Let us first showcase that in the case of a coarsely binned 4PCF the actual computation is not too expensive. As in this case also the memory footprint of the 4PCF is small, we can use the runtime-optimised implementation (i.e. we set lowmem=False) and we further accelerate the estimator using the Tree-approximation.

[8]:
min_sep = 1.
max_sep = 128.
nbinsr = 14
nthreads = 48
method="Tree"
lowmem = False
tree_resos = [0.,1.,2.,4.]
rmin_pixsize = 20
nmax=15
[9]:
fourpcf = orpheus.GGGGCorrelation_NoTomo(min_sep=min_sep, max_sep=max_sep,nbinsr=nbinsr,nmaxs=nmax,
                                         method=method, nthreads=nthreads,verbosity=2)
[11]:
%%time
fourpcf.process(shapecat, lowmem=lowmem, statistics=['4pcf_multipole'])
.........|.........|.........|.........|.........|.........|.........|.........|.........|.........|CPU times: user 1h 46min, sys: 1min 11s, total: 1h 47min 12s
Wall time: 2min 15s
[11]:
()

Let us now plot the result and compare it with the gaussian prediction (i.e. the disconnected part of the 4PCF). To estimate the latter we compute the second-order shear correlation functions and rebin then to a fine linear binning.

[12]:
%%time
# Compute shear 2pcf from data
fac_minsep = 0.05
fac_maxsep = 2.
min_sep_disc = fac_minsep*fourpcf.min_sep
max_sep_disc = fac_maxsep*fourpcf.max_sep
binsize_disc = 0.1
ggcorr = orpheus.GGCorrelation(min_sep=min_sep_disc, max_sep=max_sep_disc,binsize=binsize_disc,
                               rmin_pixsize=fourpcf.rmin_pixsize, tree_resos=fourpcf.tree_resos, nthreads=fourpcf.nthreads)
ggcorr.process(shapecat)

# Map to a very fine linspace
from scipy.interpolate import interp1d
linarr = np.linspace(min_sep_disc,max_sep_disc,int(max_sep_disc/(binsize_disc*min_sep_disc)))
xip_spl = interp1d(x=ggcorr.bin_centers_mean,y=ggcorr.xip[0].real,fill_value=0,bounds_error=False)
xip_lin = xip_spl(linarr)
xim_spl = interp1d(x=ggcorr.bin_centers_mean,y=ggcorr.xim[0].real,fill_value=0,bounds_error=False)
xim_lin = xim_spl(linarr)
CPU times: user 1min 28s, sys: 89.6 ms, total: 1min 28s
Wall time: 2.28 s

With the 2PCF in hand we can use the orpheus-internal gauss4pcf_analytic method to convert the measured 2PCFs to the disconnected 4PCFs. To get the full 4PCF we transform the 4PCF multiples to the real-space basis. As we only want to consider a single radial bin combination we use the multipoles2npcf_singlethetcombi method for that matter.

[13]:
%%time
# Selection of bins for this example
icomp = 0 # Natural component (0-7)
itheta1 = 6 # Index of first radial bin
itheta2 = 10 # Index of second radial bin
itheta3  = 9 # Index of third radial bin

# Get disconnected 4PCF from measured 2PCF
fourpcf_disc = fourpcf.gauss4pcf_analytic(itheta1, itheta2, itheta3, nsubr=4,
                                          xip_arr=xip_lin, xim_arr=xim_lin,
                                          thetamin_xi=linarr[0], thetamax_xi=linarr[-1], dtheta_xi=linarr[1]-linarr[0])

# Get full 4PCF by transforming the 4PCF multipoles to the real space basis
fourpcf_slice, fourpcrnorm_slice = fourpcf.multipoles2npcf_singlethetcombi(elthet1=itheta1,elthet2=itheta2,elthet3=itheta3)

CPU times: user 195 ms, sys: 998 µs, total: 196 ms
Wall time: 194 ms

Finally, let us plot the results. As in the Porth+ (2025) paper (cf Fig 2) we can see how the overall shape between the disconnected and the full 4PCF is fairly similar, and we also see that there is a significant disconnected contribution.

[14]:
# Plot estimate of disconnected 4PCF
plt.imshow(fourpcf_disc[icomp].real,origin='lower',extent=[0,2*np.pi,0,2*np.pi])
plt.colorbar()
plt.title(r"Re$[\Gamma_{%i,\mathrm{disc.}}^\times](%.2f,%.2f,%.2f,\phi_{12},\phi_{13})$"%(icomp,
    fourpcf.bin_centers[0,itheta1],fourpcf.bin_centers[0,itheta2],fourpcf.bin_centers[0,itheta3]))
plt.show()

# Plot full 4pcf --> Use same normalisation as for disconnected piece to emphasize the amplitude difference
plt.imshow(fourpcf_slice[icomp].real,vmin=np.min(fourpcf_disc[icomp].real),vmax=np.max(fourpcf_disc[icomp].real),
           origin='lower',extent=[0,2*np.pi,0,2*np.pi])
plt.colorbar()
plt.title(r"Re$[\Gamma_{%i}^\times](%.2f,%.2f,%.2f,\phi_{12},\phi_{13})$"%(icomp,
    fourpcf.bin_centers[0,itheta1],fourpcf.bin_centers[0,itheta2],fourpcf.bin_centers[0,itheta3]))
plt.show()

# Plot overall normalization --> Shape makes sense given poisson sampling + square footprint of extent 10degx10deg.
plt.imshow(fourpcrnorm_slice.real,origin='lower',extent=[0,2*np.pi,0,2*np.pi])
plt.title(r"Re$[\mathcal{N}](%.2f,%.2f,%.2f,\phi_{12},\phi_{13})$"%(
    fourpcf.bin_centers[0,itheta1],fourpcf.bin_centers[0,itheta2],fourpcf.bin_centers[0,itheta3]))
plt.colorbar()
plt.xlabel(r"$\phi_{12}$ [rad]")
plt.ylabel(r"$\phi_{13}$ [rad]")
plt.show()
../_images/notebooks_GGGG_tutorial_18_0.png
../_images/notebooks_GGGG_tutorial_18_1.png
../_images/notebooks_GGGG_tutorial_18_2.png

Computation of full 4PCF (many bins)

Warning: This example requires significant CPU (~200h) resources!

We now proceed to compute the 4PCF in many radial bins s.t. we expect to get an unbiased estimate of the fourth-order aperture mass statistics. As in this case the length of the internal arrays exceeds the C-imposed limit for the runtime-optimised implemenation, we have to resort to the memory-optimised implementation which only uses about 10GB in total (as opposed to an estimated hypothetical 500GB for the runtime-optimised implementation).

We note that while the setup below reproduces the one inPorth+ (2025)the underlying ellipticity data does not include any noise.

[15]:
min_sep = 0.25
max_sep = 166.2854082610904
nbinsr = 65
nbinsphi = 128
nthreads = 48
method="Tree"
lowmem = True
tree_resos = [0.,1.]
rmin_pixsize = 40
nmax = 15
mapradii = np.geomspace(1,32,21)
[15]:
fourpcf_fine = orpheus.GGGGCorrelation_NoTomo(min_sep=min_sep, max_sep=max_sep,nbinsr=nbinsr,nmaxs=nmax,nbinsphi=nbinsphi,
                                              method=method, nthreads=nthreads,verbosity=2)

Processing the catalog we see that there are printed fairly detailed updates that show how much time is spent in the allocation of the Gn and ind the updates of the Upsilonn. As a rough estimate the fraction of redundant computations done within the memory-optimized implementatoin is given as Time_per_Gn/Time_per_Upsnbatch. In the current setup this is about 25 per cent. For more details on the memory-optimised implementation see appendix A2 in Porth+ (2025).

[16]:
%%time
M4correlators = fourpcf_fine.process(shapecat, lowmem=lowmem, mapradii=mapradii, statistics=['M4'])

mmstar = M4correlators[0][:,0]
mapmx = orpheus.GGGGCorrelation_NoTomo.MMStar2MapMx_fourth(mmstar)
Using batchsize of 998 for radial bins
Doing region 0/63496 for thetabatch 0/48
Computed Gn for first gal in region 0/63496 for thetabatch 0/48 in 0.0138 seconds
Allocated Ups for first gal in region 0/63496 for thetabatch 0/48 in 1.4243 seconds for 998 theta-combis
Done region 0/63496 for thetabatch 0/48
Doing region 634/63496 for thetabatch 0/48
Computed Gn for first gal in region 634/63496 for thetabatch 0/48 in 0.0065 seconds
Allocated Ups for first gal in region 634/63496 for thetabatch 0/48 in 0.0736 seconds for 998 theta-combis
Done region 634/63496 for thetabatch 0/48
Doing region 1268/63496 for thetabatch 0/48
Computed Gn for first gal in region 1268/63496 for thetabatch 0/48 in 0.0072 seconds
Allocated Ups for first gal in region 1268/63496 for thetabatch 0/48 in 0.0728 seconds for 998 theta-combis
Done region 1268/63496 for thetabatch 0/48
Doing region 1902/63496 for thetabatch 0/48
Computed Gn for first gal in region 1902/63496 for thetabatch 0/48 in 0.0059 seconds
Allocated Ups for first gal in region 1902/63496 for thetabatch 0/48 in 0.0726 seconds for 998 theta-combis
Done region 1902/63496 for thetabatch 0/48
Doing region 2536/63496 for thetabatch 0/48
Computed Gn for first gal in region 2536/63496 for thetabatch 0/48 in 0.0076 seconds
Allocated Ups for first gal in region 2536/63496 for thetabatch 0/48 in 0.0729 seconds for 998 theta-combis
Done region 2536/63496 for thetabatch 0/48
Doing region 3170/63496 for thetabatch 0/48
Computed Gn for first gal in region 3170/63496 for thetabatch 0/48 in 0.0070 seconds
Allocated Ups for first gal in region 3170/63496 for thetabatch 0/48 in 0.0757 seconds for 998 theta-combis
Done region 3170/63496 for thetabatch 0/48
Doing region 3804/63496 for thetabatch 0/48
Computed Gn for first gal in region 3804/63496 for thetabatch 0/48 in 0.0085 seconds
Allocated Ups for first gal in region 3804/63496 for thetabatch 0/48 in 0.0743 seconds for 998 theta-combis
Done region 3804/63496 for thetabatch 0/48
Doing region 4438/63496 for thetabatch 0/48
Computed Gn for first gal in region 4438/63496 for thetabatch 0/48 in 0.0107 seconds
Allocated Ups for first gal in region 4438/63496 for thetabatch 0/48 in 0.0730 seconds for 998 theta-combis
Done region 4438/63496 for thetabatch 0/48
Doing region 5072/63496 for thetabatch 0/48
Computed Gn for first gal in region 5072/63496 for thetabatch 0/48 in 0.0143 seconds
Allocated Ups for first gal in region 5072/63496 for thetabatch 0/48 in 0.0719 seconds for 998 theta-combis
Done region 5072/63496 for thetabatch 0/48
Doing region 5706/63496 for thetabatch 0/48
Computed Gn for first gal in region 5706/63496 for thetabatch 0/48 in 0.0119 seconds
Allocated Ups for first gal in region 5706/63496 for thetabatch 0/48 in 0.0729 seconds for 998 theta-combis
Done region 5706/63496 for thetabatch 0/48
Doing region 6340/63496 for thetabatch 0/48
Computed Gn for first gal in region 6340/63496 for thetabatch 0/48 in 0.0129 seconds
Allocated Ups for first gal in region 6340/63496 for thetabatch 0/48 in 0.0748 seconds for 998 theta-combis
Done region 6340/63496 for thetabatch 0/48
Doing region 6974/63496 for thetabatch 0/48
Computed Gn for first gal in region 6974/63496 for thetabatch 0/48 in 0.0128 seconds
Allocated Ups for first gal in region 6974/63496 for thetabatch 0/48 in 0.0742 seconds for 998 theta-combis
Done region 6974/63496 for thetabatch 0/48
Doing region 7608/63496 for thetabatch 0/48
Computed Gn for first gal in region 7608/63496 for thetabatch 0/48 in 0.0133 seconds
Allocated Ups for first gal in region 7608/63496 for thetabatch 0/48 in 0.0733 seconds for 998 theta-combis
Done region 7608/63496 for thetabatch 0/48
Doing region 8242/63496 for thetabatch 0/48
Computed Gn for first gal in region 8242/63496 for thetabatch 0/48 in 0.0134 seconds
Allocated Ups for first gal in region 8242/63496 for thetabatch 0/48 in 0.0721 seconds for 998 theta-combis
Done region 8242/63496 for thetabatch 0/48
Doing region 8876/63496 for thetabatch 0/48
Computed Gn for first gal in region 8876/63496 for thetabatch 0/48 in 0.0145 seconds
Allocated Ups for first gal in region 8876/63496 for thetabatch 0/48 in 0.0727 seconds for 998 theta-combis
Done region 8876/63496 for thetabatch 0/48
Doing region 9510/63496 for thetabatch 0/48
Computed Gn for first gal in region 9510/63496 for thetabatch 0/48 in 0.0144 seconds
Allocated Ups for first gal in region 9510/63496 for thetabatch 0/48 in 0.0728 seconds for 998 theta-combis
Done region 9510/63496 for thetabatch 0/48
Doing region 10144/63496 for thetabatch 0/48
Computed Gn for first gal in region 10144/63496 for thetabatch 0/48 in 0.0143 seconds
Allocated Ups for first gal in region 10144/63496 for thetabatch 0/48 in 0.0742 seconds for 998 theta-combis
Done region 10144/63496 for thetabatch 0/48
Doing region 10778/63496 for thetabatch 0/48
Computed Gn for first gal in region 10778/63496 for thetabatch 0/48 in 0.0150 seconds
Allocated Ups for first gal in region 10778/63496 for thetabatch 0/48 in 0.0738 seconds for 998 theta-combis
Done region 10778/63496 for thetabatch 0/48
Doing region 11412/63496 for thetabatch 0/48
Computed Gn for first gal in region 11412/63496 for thetabatch 0/48 in 0.0159 seconds
Allocated Ups for first gal in region 11412/63496 for thetabatch 0/48 in 0.0723 seconds for 998 theta-combis
Done region 11412/63496 for thetabatch 0/48
Doing region 12046/63496 for thetabatch 0/48
Computed Gn for first gal in region 12046/63496 for thetabatch 0/48 in 0.0152 seconds
Allocated Ups for first gal in region 12046/63496 for thetabatch 0/48 in 0.0739 seconds for 998 theta-combis
Done region 12046/63496 for thetabatch 0/48
Doing region 12680/63496 for thetabatch 0/48
Computed Gn for first gal in region 12680/63496 for thetabatch 0/48 in 0.0157 seconds
Allocated Ups for first gal in region 12680/63496 for thetabatch 0/48 in 0.0737 seconds for 998 theta-combis
Done region 12680/63496 for thetabatch 0/48
Doing region 13314/63496 for thetabatch 0/48
Computed Gn for first gal in region 13314/63496 for thetabatch 0/48 in 0.0164 seconds
Allocated Ups for first gal in region 13314/63496 for thetabatch 0/48 in 0.0724 seconds for 998 theta-combis
Done region 13314/63496 for thetabatch 0/48
Doing region 13948/63496 for thetabatch 0/48
Computed Gn for first gal in region 13948/63496 for thetabatch 0/48 in 0.0183 seconds
Allocated Ups for first gal in region 13948/63496 for thetabatch 0/48 in 0.0738 seconds for 998 theta-combis
Done region 13948/63496 for thetabatch 0/48
Doing region 14582/63496 for thetabatch 0/48
Computed Gn for first gal in region 14582/63496 for thetabatch 0/48 in 0.0185 seconds
Allocated Ups for first gal in region 14582/63496 for thetabatch 0/48 in 0.0715 seconds for 998 theta-combis
Done region 14582/63496 for thetabatch 0/48
Doing region 15216/63496 for thetabatch 0/48
Computed Gn for first gal in region 15216/63496 for thetabatch 0/48 in 0.0162 seconds
Allocated Ups for first gal in region 15216/63496 for thetabatch 0/48 in 0.0747 seconds for 998 theta-combis
Done region 15216/63496 for thetabatch 0/48
Doing region 15850/63496 for thetabatch 0/48
Computed Gn for first gal in region 15850/63496 for thetabatch 0/48 in 0.0175 seconds
Allocated Ups for first gal in region 15850/63496 for thetabatch 0/48 in 0.0737 seconds for 998 theta-combis
Done region 15850/63496 for thetabatch 0/48
Doing region 16484/63496 for thetabatch 0/48
Computed Gn for first gal in region 16484/63496 for thetabatch 0/48 in 0.0165 seconds
Allocated Ups for first gal in region 16484/63496 for thetabatch 0/48 in 0.0742 seconds for 998 theta-combis
Done region 16484/63496 for thetabatch 0/48
Doing region 17118/63496 for thetabatch 0/48
Computed Gn for first gal in region 17118/63496 for thetabatch 0/48 in 0.0174 seconds
Allocated Ups for first gal in region 17118/63496 for thetabatch 0/48 in 0.0729 seconds for 998 theta-combis
Done region 17118/63496 for thetabatch 0/48
Doing region 17752/63496 for thetabatch 0/48
Computed Gn for first gal in region 17752/63496 for thetabatch 0/48 in 0.0183 seconds
Allocated Ups for first gal in region 17752/63496 for thetabatch 0/48 in 0.0730 seconds for 998 theta-combis
Done region 17752/63496 for thetabatch 0/48
Doing region 18386/63496 for thetabatch 0/48
Computed Gn for first gal in region 18386/63496 for thetabatch 0/48 in 0.0162 seconds
Allocated Ups for first gal in region 18386/63496 for thetabatch 0/48 in 0.0735 seconds for 998 theta-combis
Done region 18386/63496 for thetabatch 0/48
Doing region 19020/63496 for thetabatch 0/48
Computed Gn for first gal in region 19020/63496 for thetabatch 0/48 in 0.0175 seconds
Allocated Ups for first gal in region 19020/63496 for thetabatch 0/48 in 0.0727 seconds for 998 theta-combis
Done region 19020/63496 for thetabatch 0/48
Doing region 19654/63496 for thetabatch 0/48
Computed Gn for first gal in region 19654/63496 for thetabatch 0/48 in 0.0177 seconds
Allocated Ups for first gal in region 19654/63496 for thetabatch 0/48 in 0.0743 seconds for 998 theta-combis
Done region 19654/63496 for thetabatch 0/48
Doing region 20288/63496 for thetabatch 0/48
Computed Gn for first gal in region 20288/63496 for thetabatch 0/48 in 0.0192 seconds
Allocated Ups for first gal in region 20288/63496 for thetabatch 0/48 in 0.0727 seconds for 998 theta-combis
Done region 20288/63496 for thetabatch 0/48
Doing region 20922/63496 for thetabatch 0/48
Computed Gn for first gal in region 20922/63496 for thetabatch 0/48 in 0.0179 seconds
Allocated Ups for first gal in region 20922/63496 for thetabatch 0/48 in 0.0734 seconds for 998 theta-combis
Done region 20922/63496 for thetabatch 0/48
Doing region 21556/63496 for thetabatch 0/48
Computed Gn for first gal in region 21556/63496 for thetabatch 0/48 in 0.0168 seconds
Allocated Ups for first gal in region 21556/63496 for thetabatch 0/48 in 0.0735 seconds for 998 theta-combis
Done region 21556/63496 for thetabatch 0/48
Doing region 22190/63496 for thetabatch 0/48
Computed Gn for first gal in region 22190/63496 for thetabatch 0/48 in 0.0168 seconds
Allocated Ups for first gal in region 22190/63496 for thetabatch 0/48 in 0.0739 seconds for 998 theta-combis
Done region 22190/63496 for thetabatch 0/48
Doing region 22824/63496 for thetabatch 0/48
Computed Gn for first gal in region 22824/63496 for thetabatch 0/48 in 0.0173 seconds
Allocated Ups for first gal in region 22824/63496 for thetabatch 0/48 in 0.0739 seconds for 998 theta-combis
Done region 22824/63496 for thetabatch 0/48
Doing region 23458/63496 for thetabatch 0/48
Computed Gn for first gal in region 23458/63496 for thetabatch 0/48 in 0.0167 seconds
Allocated Ups for first gal in region 23458/63496 for thetabatch 0/48 in 0.0738 seconds for 998 theta-combis
Done region 23458/63496 for thetabatch 0/48
Doing region 24092/63496 for thetabatch 0/48
Computed Gn for first gal in region 24092/63496 for thetabatch 0/48 in 0.0193 seconds
Allocated Ups for first gal in region 24092/63496 for thetabatch 0/48 in 0.0722 seconds for 998 theta-combis
Done region 24092/63496 for thetabatch 0/48
Doing region 24726/63496 for thetabatch 0/48
Computed Gn for first gal in region 24726/63496 for thetabatch 0/48 in 0.0174 seconds
Allocated Ups for first gal in region 24726/63496 for thetabatch 0/48 in 0.0724 seconds for 998 theta-combis
Done region 24726/63496 for thetabatch 0/48
Doing region 25360/63496 for thetabatch 0/48
Computed Gn for first gal in region 25360/63496 for thetabatch 0/48 in 0.0181 seconds
Allocated Ups for first gal in region 25360/63496 for thetabatch 0/48 in 0.0731 seconds for 998 theta-combis
Done region 25360/63496 for thetabatch 0/48
Doing region 25994/63496 for thetabatch 0/48
Computed Gn for first gal in region 25994/63496 for thetabatch 0/48 in 0.0180 seconds
Allocated Ups for first gal in region 25994/63496 for thetabatch 0/48 in 0.0727 seconds for 998 theta-combis
Done region 25994/63496 for thetabatch 0/48
Doing region 26628/63496 for thetabatch 0/48
Computed Gn for first gal in region 26628/63496 for thetabatch 0/48 in 0.0167 seconds
Allocated Ups for first gal in region 26628/63496 for thetabatch 0/48 in 0.0734 seconds for 998 theta-combis
Done region 26628/63496 for thetabatch 0/48
Doing region 27262/63496 for thetabatch 0/48
Computed Gn for first gal in region 27262/63496 for thetabatch 0/48 in 0.0153 seconds
Allocated Ups for first gal in region 27262/63496 for thetabatch 0/48 in 0.0730 seconds for 998 theta-combis
Done region 27262/63496 for thetabatch 0/48
Doing region 27896/63496 for thetabatch 0/48
Computed Gn for first gal in region 27896/63496 for thetabatch 0/48 in 0.0123 seconds
Allocated Ups for first gal in region 27896/63496 for thetabatch 0/48 in 0.0731 seconds for 998 theta-combis
Done region 27896/63496 for thetabatch 0/48
Doing region 28530/63496 for thetabatch 0/48
Computed Gn for first gal in region 28530/63496 for thetabatch 0/48 in 0.0139 seconds
Allocated Ups for first gal in region 28530/63496 for thetabatch 0/48 in 0.0742 seconds for 998 theta-combis
Done region 28530/63496 for thetabatch 0/48
Doing region 29164/63496 for thetabatch 0/48
Computed Gn for first gal in region 29164/63496 for thetabatch 0/48 in 0.0151 seconds
Allocated Ups for first gal in region 29164/63496 for thetabatch 0/48 in 0.0731 seconds for 998 theta-combis
Done region 29164/63496 for thetabatch 0/48
Doing region 29798/63496 for thetabatch 0/48
Computed Gn for first gal in region 29798/63496 for thetabatch 0/48 in 0.0177 seconds
Allocated Ups for first gal in region 29798/63496 for thetabatch 0/48 in 0.0736 seconds for 998 theta-combis
Done region 29798/63496 for thetabatch 0/48
Doing region 30432/63496 for thetabatch 0/48
Computed Gn for first gal in region 30432/63496 for thetabatch 0/48 in 0.0178 seconds
Allocated Ups for first gal in region 30432/63496 for thetabatch 0/48 in 0.0727 seconds for 998 theta-combis
Done region 30432/63496 for thetabatch 0/48
Doing region 31066/63496 for thetabatch 0/48
Computed Gn for first gal in region 31066/63496 for thetabatch 0/48 in 0.0173 seconds
Allocated Ups for first gal in region 31066/63496 for thetabatch 0/48 in 0.0743 seconds for 998 theta-combis
Done region 31066/63496 for thetabatch 0/48
Doing region 31700/63496 for thetabatch 0/48
Computed Gn for first gal in region 31700/63496 for thetabatch 0/48 in 0.0169 seconds
Allocated Ups for first gal in region 31700/63496 for thetabatch 0/48 in 0.0746 seconds for 998 theta-combis
Done region 31700/63496 for thetabatch 0/48
Doing region 32334/63496 for thetabatch 0/48
Computed Gn for first gal in region 32334/63496 for thetabatch 0/48 in 0.0167 seconds
Allocated Ups for first gal in region 32334/63496 for thetabatch 0/48 in 0.0743 seconds for 998 theta-combis
Done region 32334/63496 for thetabatch 0/48
Doing region 32968/63496 for thetabatch 0/48
Computed Gn for first gal in region 32968/63496 for thetabatch 0/48 in 0.0167 seconds
Allocated Ups for first gal in region 32968/63496 for thetabatch 0/48 in 0.0743 seconds for 998 theta-combis
Done region 32968/63496 for thetabatch 0/48
Doing region 33602/63496 for thetabatch 0/48
Computed Gn for first gal in region 33602/63496 for thetabatch 0/48 in 0.0154 seconds
Allocated Ups for first gal in region 33602/63496 for thetabatch 0/48 in 0.0754 seconds for 998 theta-combis
Done region 33602/63496 for thetabatch 0/48
Doing region 34236/63496 for thetabatch 0/48
Computed Gn for first gal in region 34236/63496 for thetabatch 0/48 in 0.0180 seconds
Allocated Ups for first gal in region 34236/63496 for thetabatch 0/48 in 0.0733 seconds for 998 theta-combis
Done region 34236/63496 for thetabatch 0/48
Doing region 34870/63496 for thetabatch 0/48
Computed Gn for first gal in region 34870/63496 for thetabatch 0/48 in 0.0167 seconds
Allocated Ups for first gal in region 34870/63496 for thetabatch 0/48 in 0.0754 seconds for 998 theta-combis
Done region 34870/63496 for thetabatch 0/48
Doing region 35504/63496 for thetabatch 0/48
Computed Gn for first gal in region 35504/63496 for thetabatch 0/48 in 0.0158 seconds
Allocated Ups for first gal in region 35504/63496 for thetabatch 0/48 in 0.0720 seconds for 998 theta-combis
Done region 35504/63496 for thetabatch 0/48
Doing region 36138/63496 for thetabatch 0/48
Computed Gn for first gal in region 36138/63496 for thetabatch 0/48 in 0.0131 seconds
Allocated Ups for first gal in region 36138/63496 for thetabatch 0/48 in 0.0737 seconds for 998 theta-combis
Done region 36138/63496 for thetabatch 0/48
Doing region 36772/63496 for thetabatch 0/48
Computed Gn for first gal in region 36772/63496 for thetabatch 0/48 in 0.0152 seconds
Allocated Ups for first gal in region 36772/63496 for thetabatch 0/48 in 0.0727 seconds for 998 theta-combis
Done region 36772/63496 for thetabatch 0/48
Doing region 37406/63496 for thetabatch 0/48
Computed Gn for first gal in region 37406/63496 for thetabatch 0/48 in 0.0150 seconds
Allocated Ups for first gal in region 37406/63496 for thetabatch 0/48 in 0.0720 seconds for 998 theta-combis
Done region 37406/63496 for thetabatch 0/48
Doing region 38040/63496 for thetabatch 0/48
Computed Gn for first gal in region 38040/63496 for thetabatch 0/48 in 0.0156 seconds
Allocated Ups for first gal in region 38040/63496 for thetabatch 0/48 in 0.0719 seconds for 998 theta-combis
Done region 38040/63496 for thetabatch 0/48
Doing region 38674/63496 for thetabatch 0/48
Computed Gn for first gal in region 38674/63496 for thetabatch 0/48 in 0.0118 seconds
Allocated Ups for first gal in region 38674/63496 for thetabatch 0/48 in 0.0727 seconds for 998 theta-combis
Done region 38674/63496 for thetabatch 0/48
Doing region 39308/63496 for thetabatch 0/48
Computed Gn for first gal in region 39308/63496 for thetabatch 0/48 in 0.0112 seconds
Allocated Ups for first gal in region 39308/63496 for thetabatch 0/48 in 0.0733 seconds for 998 theta-combis
Done region 39308/63496 for thetabatch 0/48
Doing region 39942/63496 for thetabatch 0/48
Computed Gn for first gal in region 39942/63496 for thetabatch 0/48 in 0.0120 seconds
Allocated Ups for first gal in region 39942/63496 for thetabatch 0/48 in 0.0723 seconds for 998 theta-combis
Done region 39942/63496 for thetabatch 0/48
Doing region 40576/63496 for thetabatch 0/48
Computed Gn for first gal in region 40576/63496 for thetabatch 0/48 in 0.0167 seconds
Allocated Ups for first gal in region 40576/63496 for thetabatch 0/48 in 0.0722 seconds for 998 theta-combis
Done region 40576/63496 for thetabatch 0/48
Doing region 41210/63496 for thetabatch 0/48
Computed Gn for first gal in region 41210/63496 for thetabatch 0/48 in 0.0179 seconds
Allocated Ups for first gal in region 41210/63496 for thetabatch 0/48 in 0.0729 seconds for 998 theta-combis
Done region 41210/63496 for thetabatch 0/48
Doing region 41844/63496 for thetabatch 0/48
Computed Gn for first gal in region 41844/63496 for thetabatch 0/48 in 0.0175 seconds
Allocated Ups for first gal in region 41844/63496 for thetabatch 0/48 in 0.0739 seconds for 998 theta-combis
Done region 41844/63496 for thetabatch 0/48
Doing region 42478/63496 for thetabatch 0/48
Computed Gn for first gal in region 42478/63496 for thetabatch 0/48 in 0.0148 seconds
Allocated Ups for first gal in region 42478/63496 for thetabatch 0/48 in 0.0737 seconds for 998 theta-combis
Done region 42478/63496 for thetabatch 0/48
Doing region 43112/63496 for thetabatch 0/48
Computed Gn for first gal in region 43112/63496 for thetabatch 0/48 in 0.0156 seconds
Allocated Ups for first gal in region 43112/63496 for thetabatch 0/48 in 0.0727 seconds for 998 theta-combis
Done region 43112/63496 for thetabatch 0/48
Doing region 43746/63496 for thetabatch 0/48
Computed Gn for first gal in region 43746/63496 for thetabatch 0/48 in 0.0154 seconds
Allocated Ups for first gal in region 43746/63496 for thetabatch 0/48 in 0.0724 seconds for 998 theta-combis
Done region 43746/63496 for thetabatch 0/48
Doing region 44380/63496 for thetabatch 0/48
Computed Gn for first gal in region 44380/63496 for thetabatch 0/48 in 0.0167 seconds
Allocated Ups for first gal in region 44380/63496 for thetabatch 0/48 in 0.0741 seconds for 998 theta-combis
Done region 44380/63496 for thetabatch 0/48
Doing region 45014/63496 for thetabatch 0/48
Computed Gn for first gal in region 45014/63496 for thetabatch 0/48 in 0.0179 seconds
Allocated Ups for first gal in region 45014/63496 for thetabatch 0/48 in 0.0720 seconds for 998 theta-combis
Done region 45014/63496 for thetabatch 0/48
Doing region 45648/63496 for thetabatch 0/48
Computed Gn for first gal in region 45648/63496 for thetabatch 0/48 in 0.0181 seconds
Allocated Ups for first gal in region 45648/63496 for thetabatch 0/48 in 0.0734 seconds for 998 theta-combis
Done region 45648/63496 for thetabatch 0/48
Doing region 46282/63496 for thetabatch 0/48
Computed Gn for first gal in region 46282/63496 for thetabatch 0/48 in 0.0177 seconds
Allocated Ups for first gal in region 46282/63496 for thetabatch 0/48 in 0.0736 seconds for 998 theta-combis
Done region 46282/63496 for thetabatch 0/48
Doing region 46916/63496 for thetabatch 0/48
Computed Gn for first gal in region 46916/63496 for thetabatch 0/48 in 0.0172 seconds
Allocated Ups for first gal in region 46916/63496 for thetabatch 0/48 in 0.0724 seconds for 998 theta-combis
Done region 46916/63496 for thetabatch 0/48
Doing region 47550/63496 for thetabatch 0/48
Computed Gn for first gal in region 47550/63496 for thetabatch 0/48 in 0.0177 seconds
Allocated Ups for first gal in region 47550/63496 for thetabatch 0/48 in 0.0720 seconds for 998 theta-combis
Done region 47550/63496 for thetabatch 0/48
Doing region 48184/63496 for thetabatch 0/48
Computed Gn for first gal in region 48184/63496 for thetabatch 0/48 in 0.0174 seconds
Allocated Ups for first gal in region 48184/63496 for thetabatch 0/48 in 0.0728 seconds for 998 theta-combis
Done region 48184/63496 for thetabatch 0/48
Doing region 48818/63496 for thetabatch 0/48
Computed Gn for first gal in region 48818/63496 for thetabatch 0/48 in 0.0177 seconds
Allocated Ups for first gal in region 48818/63496 for thetabatch 0/48 in 0.0727 seconds for 998 theta-combis
Done region 48818/63496 for thetabatch 0/48
Doing region 49452/63496 for thetabatch 0/48
Computed Gn for first gal in region 49452/63496 for thetabatch 0/48 in 0.0169 seconds
Allocated Ups for first gal in region 49452/63496 for thetabatch 0/48 in 0.0722 seconds for 998 theta-combis
Done region 49452/63496 for thetabatch 0/48
Doing region 50086/63496 for thetabatch 0/48
Computed Gn for first gal in region 50086/63496 for thetabatch 0/48 in 0.0169 seconds
Allocated Ups for first gal in region 50086/63496 for thetabatch 0/48 in 0.0723 seconds for 998 theta-combis
Done region 50086/63496 for thetabatch 0/48
Doing region 50720/63496 for thetabatch 0/48
Computed Gn for first gal in region 50720/63496 for thetabatch 0/48 in 0.0161 seconds
Allocated Ups for first gal in region 50720/63496 for thetabatch 0/48 in 0.0731 seconds for 998 theta-combis
Done region 50720/63496 for thetabatch 0/48
Doing region 51354/63496 for thetabatch 0/48
Computed Gn for first gal in region 51354/63496 for thetabatch 0/48 in 0.0168 seconds
Allocated Ups for first gal in region 51354/63496 for thetabatch 0/48 in 0.0731 seconds for 998 theta-combis
Done region 51354/63496 for thetabatch 0/48
Doing region 51988/63496 for thetabatch 0/48
Computed Gn for first gal in region 51988/63496 for thetabatch 0/48 in 0.0152 seconds
Allocated Ups for first gal in region 51988/63496 for thetabatch 0/48 in 0.0743 seconds for 998 theta-combis
Done region 51988/63496 for thetabatch 0/48
Doing region 52622/63496 for thetabatch 0/48
Computed Gn for first gal in region 52622/63496 for thetabatch 0/48 in 0.0153 seconds
Allocated Ups for first gal in region 52622/63496 for thetabatch 0/48 in 0.0755 seconds for 998 theta-combis
Done region 52622/63496 for thetabatch 0/48
Doing region 53256/63496 for thetabatch 0/48
Computed Gn for first gal in region 53256/63496 for thetabatch 0/48 in 0.0143 seconds
Allocated Ups for first gal in region 53256/63496 for thetabatch 0/48 in 0.0758 seconds for 998 theta-combis
Done region 53256/63496 for thetabatch 0/48
Doing region 53890/63496 for thetabatch 0/48
Computed Gn for first gal in region 53890/63496 for thetabatch 0/48 in 0.0108 seconds
Allocated Ups for first gal in region 53890/63496 for thetabatch 0/48 in 0.0767 seconds for 998 theta-combis
Done region 53890/63496 for thetabatch 0/48
Doing region 54524/63496 for thetabatch 0/48
Computed Gn for first gal in region 54524/63496 for thetabatch 0/48 in 0.0117 seconds
Allocated Ups for first gal in region 54524/63496 for thetabatch 0/48 in 0.0724 seconds for 998 theta-combis
Done region 54524/63496 for thetabatch 0/48
Doing region 55158/63496 for thetabatch 0/48
Computed Gn for first gal in region 55158/63496 for thetabatch 0/48 in 0.0121 seconds
Allocated Ups for first gal in region 55158/63496 for thetabatch 0/48 in 0.0734 seconds for 998 theta-combis
Done region 55158/63496 for thetabatch 0/48
Doing region 55792/63496 for thetabatch 0/48
Computed Gn for first gal in region 55792/63496 for thetabatch 0/48 in 0.0109 seconds
Allocated Ups for first gal in region 55792/63496 for thetabatch 0/48 in 0.0734 seconds for 998 theta-combis
Done region 55792/63496 for thetabatch 0/48
Doing region 56426/63496 for thetabatch 0/48
Computed Gn for first gal in region 56426/63496 for thetabatch 0/48 in 0.0120 seconds
Allocated Ups for first gal in region 56426/63496 for thetabatch 0/48 in 0.0726 seconds for 998 theta-combis
Done region 56426/63496 for thetabatch 0/48
Doing region 57060/63496 for thetabatch 0/48
Computed Gn for first gal in region 57060/63496 for thetabatch 0/48 in 0.0109 seconds
Allocated Ups for first gal in region 57060/63496 for thetabatch 0/48 in 0.0728 seconds for 998 theta-combis
Done region 57060/63496 for thetabatch 0/48
Doing region 57694/63496 for thetabatch 0/48
Computed Gn for first gal in region 57694/63496 for thetabatch 0/48 in 0.0124 seconds
Allocated Ups for first gal in region 57694/63496 for thetabatch 0/48 in 0.0722 seconds for 998 theta-combis
Done region 57694/63496 for thetabatch 0/48
Doing region 58328/63496 for thetabatch 0/48
Computed Gn for first gal in region 58328/63496 for thetabatch 0/48 in 0.0128 seconds
Allocated Ups for first gal in region 58328/63496 for thetabatch 0/48 in 0.0728 seconds for 998 theta-combis
Done region 58328/63496 for thetabatch 0/48
Doing region 58962/63496 for thetabatch 0/48
Computed Gn for first gal in region 58962/63496 for thetabatch 0/48 in 0.0118 seconds
Allocated Ups for first gal in region 58962/63496 for thetabatch 0/48 in 0.0743 seconds for 998 theta-combis
Done region 58962/63496 for thetabatch 0/48
Doing region 59596/63496 for thetabatch 0/48
Computed Gn for first gal in region 59596/63496 for thetabatch 0/48 in 0.0121 seconds
Allocated Ups for first gal in region 59596/63496 for thetabatch 0/48 in 0.0725 seconds for 998 theta-combis
Done region 59596/63496 for thetabatch 0/48
Doing region 60230/63496 for thetabatch 0/48
Computed Gn for first gal in region 60230/63496 for thetabatch 0/48 in 0.0109 seconds
Allocated Ups for first gal in region 60230/63496 for thetabatch 0/48 in 0.0734 seconds for 998 theta-combis
Done region 60230/63496 for thetabatch 0/48
Doing region 60864/63496 for thetabatch 0/48
Computed Gn for first gal in region 60864/63496 for thetabatch 0/48 in 0.0106 seconds
Allocated Ups for first gal in region 60864/63496 for thetabatch 0/48 in 0.0723 seconds for 998 theta-combis
Done region 60864/63496 for thetabatch 0/48
Doing region 61498/63496 for thetabatch 0/48
Computed Gn for first gal in region 61498/63496 for thetabatch 0/48 in 0.0105 seconds
Allocated Ups for first gal in region 61498/63496 for thetabatch 0/48 in 0.0736 seconds for 998 theta-combis
Done region 61498/63496 for thetabatch 0/48
Doing region 62132/63496 for thetabatch 0/48
Computed Gn for first gal in region 62132/63496 for thetabatch 0/48 in 0.0097 seconds
Allocated Ups for first gal in region 62132/63496 for thetabatch 0/48 in 0.0681 seconds for 998 theta-combis
Done region 62132/63496 for thetabatch 0/48
Doing region 62766/63496 for thetabatch 0/48
Computed Gn for first gal in region 62766/63496 for thetabatch 0/48 in 0.0084 seconds
Allocated Ups for first gal in region 62766/63496 for thetabatch 0/48 in 0.0678 seconds for 998 theta-combis
Done region 62766/63496 for thetabatch 0/48
Doing region 63400/63496 for thetabatch 0/48
Computed Gn for first gal in region 63400/63496 for thetabatch 0/48 in 0.0077 seconds
Allocated Ups for first gal in region 63400/63496 for thetabatch 0/48 in 0.0633 seconds for 998 theta-combis
Done region 63400/63496 for thetabatch 0/48
Done allocating 4pcfs for thetabatch 7/48
Done allocating 4pcfs for thetabatch 3/48
Done allocating 4pcfs for thetabatch 22/48
Done allocating 4pcfs for thetabatch 19/48
Done allocating 4pcfs for thetabatch 26/48
Done allocating 4pcfs for thetabatch 2/48
Done allocating 4pcfs for thetabatch 41/48
Done allocating 4pcfs for thetabatch 5/48
Done allocating 4pcfs for thetabatch 8/48
Done allocating 4pcfs for thetabatch 39/48
Done allocating 4pcfs for thetabatch 18/48
Done allocating 4pcfs for thetabatch 27/48
Done allocating 4pcfs for thetabatch 30/48
Done allocating 4pcfs for thetabatch 25/48
Done allocating 4pcfs for thetabatch 37/48
Done allocating 4pcfs for thetabatch 35/48
Done allocating 4pcfs for thetabatch 34/48
Done allocating 4pcfs for thetabatch 6/48
Done allocating 4pcfs for thetabatch 29/48
Done allocating 4pcfs for thetabatch 10/48
Done allocating 4pcfs for thetabatch 31/48
Done allocating 4pcfs for thetabatch 11/48
Done allocating 4pcfs for thetabatch 42/48
Done allocating 4pcfs for thetabatch 12/48
Done allocating 4pcfs for thetabatch 1/48
Done allocating 4pcfs for thetabatch 14/48
Done allocating 4pcfs for thetabatch 9/48
Done allocating 4pcfs for thetabatch 16/48
Done allocating 4pcfs for thetabatch 44/48
Done allocating 4pcfs for thetabatch 17/48
Done allocating 4pcfs for thetabatch 33/48
Done allocating 4pcfs for thetabatch 24/48
Done allocating 4pcfs for thetabatch 28/48
Done allocating 4pcfs for thetabatch 36/48
Done allocating 4pcfs for thetabatch 32/48
Done allocating 4pcfs for thetabatch 23/48
Done allocating 4pcfs for thetabatch 13/48
Done allocating 4pcfs for thetabatch 15/48
Done allocating 4pcfs for thetabatch 21/48
Done allocating 4pcfs for thetabatch 40/48
Done allocating 4pcfs for thetabatch 20/48
Done allocating 4pcfs for thetabatch 4/48
Done allocating 4pcfs for thetabatch 45/48
Done allocating 4pcfs for thetabatch 38/48
Done allocating 4pcfs for thetabatch 43/48
Done allocating 4pcfs for thetabatch 46/48
Done allocating 4pcfs for thetabatch 0/48
Done allocating 4pcfs for thetabatch 47/48
CPU times: user 6d 14h 30min 11s, sys: 2min 34s, total: 6d 14h 32min 45s
Wall time: 3h 28min 50s

As a comparison we also compute the fourth-order aperture statistics using the direct estimator. Note that as this estimators weighs the data intrinsically different as compared to the 4PCF estimator, we do not expect perfect agreement, but the two curves should nevertheless trace each other. In the plots we further plot an individual line for each coveage cutoff which should give a hint of the expected spread between the two estimators.

[63]:
%%time
direct = orpheus.Direct_MapnEqual(order_max=4,Rmin=mapradii[0],Rmax=mapradii[-1],nbinsr=len(mapradii),accuracies=8,ap_weights='InvShot')
shapecat.create_mask()
mapstat_direct, _ = direct.process(shapecat)
Done 21/21 aperture radiiCPU times: user 11min 15s, sys: 831 ms, total: 11min 15s
Wall time: 49.3 s

Similar to the case of coarse binning above we now compute the gaussian counterpart. This can be achieved twofold; either by directly transforming the shear 2PCFs to the second-order aperture statistics or by inferring the connected 4PCF from the 2PCFs and computing the full integral as it was done for the full 4PCF. To show that both methods converge we will do both.

  • For the first case we directly proceed with the measured 2PCF from above

  • For the second case we use the intermal method estimateMap4disc that automatically runs through the aforementioned pipeline. To ensure a good binning we further subdivide the original radial bins by a factor of three (in each dimension), hence emulating the continuously allocated bins used within the full 4PCF.

[18]:
%%time
map4_disc_from_map2 = 3*ggcorr.computeMap2(mapradii)[0,0]**2
CPU times: user 27 ms, sys: 2 µs, total: 27 ms
Wall time: 3.5 ms
[19]:
%%time
mmstar_disc, mapmx_disc = fourpcf_fine.estimateMap4disc(cat=shapecat, radii=mapradii, nsubr=3, basis='both')
Using batchsize of 5721 for radial bins
CPU times: user 11h 51min 39s, sys: 627 ms, total: 11h 51min 40s
Wall time: 15min 17s

Finally, let us plot the recovered aperture statistics.

  • When looking at the MM*-basis we find a significant disconnected part at small scales and that the real parts all trace each other – this gives a first hint that the integration is somewhat converged. Secondly we confirm the imaginary parts (which contribute to the parity-violating aperture mass correlators) to be approcximately zero. Finally, when comparing the disconnected pieces obtained from the full 5D integral and the product of Map2 obtained via the 2pcf we again conclude a well-converged integration (as one would have expected given the results of Silvestre-Rosello+ (2025)).

  • When plotting the connected part in the MapMx-basis we find good agreement between the 4PCF pipeline and the measurement from the direct estimator and we find the B-modes, as well as the parity violating modes to be consistent with zero.

  • To assess the differences between the two estimators more clearly we further plot the ratio of the cuves in the above figure.

    • The discrepancies on the large scales are mainly due to increasingly different area probed by the two estimators.

    • Similarly, on small scales, we observe a decreased amplitude which can be traced back to the employed lower integration cutoff, but it also has a random contribution stemming from the different spatial averages performed by the direct and the 4PCF-based estimator. In particular, for the former we use an inverse-shot-noise weighting which is not optimal given that we do not have shape noise present in the mocks. We note that once sufficiently many tracers (either by a larger nbar or a larger area) are included, the latter contribution decreases (cf rhs of Fig 3 in Porth+ (2025), where also shape noise was included).

[67]:
# Plot MM* basis
for elcomp in range(8):
    plt.semilogx(mapradii,mapradii**1.5*mmstar[elcomp].real, 'b-',label=(elcomp==0)*r"$Re\left\langle M^n (M^*)^{4-n}\right\rangle$")
    plt.semilogx(mapradii,mapradii**1.5*mmstar[elcomp].imag, 'r-',label=(elcomp==0)*r"$Im\left\langle M^n (M^*)^{4-n}\right\rangle$")
    plt.semilogx(mapradii,mapradii**1.5*mmstar_disc[elcomp].real, 'k-',label=(elcomp==0)*r"$Re\left\langle M^n (M^*)^{4-n}\right\rangle_c$")
plt.semilogx(mapradii,mapradii**1.5*map4_disc_from_map2, 'c--', label=r"$3 \left\langle M_{\rm{ap}}^{4}\right\rangle^2$")
plt.axhline(0,color='k',ls='--')
plt.xlabel('Aperture radius [arcmin]')
plt.ylabel(r'$\theta^{1.5} \ \times \ \left\langle M^n (M^*)^{4-n}\right\rangle$')
plt.legend(loc='upper right')
plt.show()

# Plot MapMx basis
for elcov in range(5):
    plt.semilogx(mapradii,mapradii**1.5*(mapstat_direct[:,elcov,3]-3*mapstat_direct[:,elcov,1]**2),'b--',label=(elcov==0)*r"$\left\langle M_{\rm{ap}}^{4}\right\rangle_c$  (Direct)")
plt.semilogx(mapradii,mapradii**1.5*(mapmx[0]-map4_disc_from_map2), 'b-', label=r"$\left\langle M_{\rm{ap}}^{4}\right\rangle_c$")
for elcomp in range(1,4):
    plt.semilogx(mapradii,mapradii**1.5*mapmx[elcomp], 'r-', label=(elcomp==1)*r"$\left\langle M_{\rm{ap}}^{3}  M_{\times}\right\rangle$")
for elcomp in range(5,11):
    plt.semilogx(mapradii,mapradii**1.5*mapmx[elcomp], 'g-', label=(elcomp==5)*r"$\left\langle M_{\rm{ap}}^{2}  M_{\times}^2 \right\rangle$")
for elcomp in range(11,15):
    plt.semilogx(mapradii,mapradii**1.5*mapmx[elcomp], 'c-', label=(elcomp==11)*r"$\left\langle M_{\rm{ap}}  M_{\times}^3 \right\rangle$")
plt.semilogx(mapradii,mapradii**1.5*mapmx[15], 'orange', label=r"$\left\langle M_{\times}^4 \right\rangle$")
#plt.semilogx(mapradii,mapradii**1.5*mapmx_disc[0], 'k-', label=r"$\left\langle M_{\rm{ap}}^{4}\right\rangle_{\rm{disc.}}$")
#plt.semilogx(mapradii,mapradii**1.5*map4_disc_from_map2, 'c--', label=r"$3 \left\langle M_{\rm{ap}}^{4}\right\rangle^2$")
#plt.semilogx(mapradii,mapradii**1.5*3*mapstat_direct[:,1,1]**2,'b--',label=r"$3 \left\langle M_{\rm{ap}}^{2}\right\rangle (Direct)$")
plt.axhline(0,color='k',ls='--')
plt.xlabel('Aperture radius [arcmin]')
plt.ylabel(r'$\theta^{1.5} \ \times \ \left\langle M_{\rm{ap}}^{n}  M_{\times}^{4-n} \right\rangle$')
plt.legend(loc='upper right')
plt.show()

# Plot Ratio between measurement
for elcov in range(5):
    plt.semilogx(mapradii,(mapmx[0]-map4_disc_from_map2)/(mapstat_direct[:,elcov,3]-3*mapstat_direct[:,elcov,1]**2),'b-',
                 label=(elcov==0)*r"$\left\langle M_{\rm{ap}}^{4}\right\rangle_{\mathrm{c}}$: 4PCF/Direct")
for elcomp in range(8):
    plt.semilogx(mapradii,mmstar_disc[elcomp]/map4_disc_from_map2,'r-',alpha=0.2)
plt.semilogx(mapradii,np.mean(mmstar_disc,axis=0)/map4_disc_from_map2,'r-',lw=3,label=r"$\left\langle M_{\rm{ap}}^{4}\right\rangle_{\mathrm{disc.}}$: 4PCF/2PCF")
plt.axhline(1,color='k',ls='--')
plt.fill_between(x=mapradii,y1=0.98,y2=1.02,color='grey',alpha=0.3)
plt.ylim(0.9,1.05)
plt.xlabel('Aperture radius [arcmin]')
plt.ylabel('Ratio ')
plt.legend(loc='upper left')
plt.show()

../_images/notebooks_GGGG_tutorial_30_0.png
../_images/notebooks_GGGG_tutorial_30_1.png
../_images/notebooks_GGGG_tutorial_30_2.png
[ ]: