
cos_theta , sizes = [] , []
for i, ha lo_ id in enumer at e ( hl) :
if hs [i ] < mi n_n p or ha lo_ id not in spin s : con tinue
L = spins [ hal o_i d ]
Lmag = np . linalg . norm ( L )
if Lma g < 1e -30: cont inu e
cos _t heta . a ppend ( np . dot (L , z_ hat ) / Lmag )
sizes . app end ( hs [ i ])
return np . array ( cos _t het a ) , np . arr ay ( si zes )
def main () :
q , pos , v_base , grx , gry , v_rms = g enera te _i cs ( CFG )
v_curl = ad d_c url ( v_base , grx , gry , v_rms , CFG )
hl , hs , labe ls = fi nd_ha lo s (pos , CFG )
print ( f" E xt rac te d { len ( hl ) } Ha los (Np >= {CFG [’ min_ hal o ’]}) ")
spins _c url = co mpute_spi ns ( pos , v_curl , hl , labels , CFG [ ’ box ’])
spins _n ull = co mpute_spi ns ( pos , v_base , hl , labels , CFG [ ’ box ’])
z_hat = np . array ([0 , 0, 1])
ct_c , sz _c = anal yz e_ al ig nm ent ( spins _curl , hl , hs , 20 , z_hat )
ct_n , sz _n = anal yz e_ al ig nm ent ( spins _null , hl , hs , 20 , z_hat )
bias_c = np . mean ( ct_c > 0) * 100
bias_n = np . mean ( ct_n > 0) * 100
print ( f" Curl Bias : { b ias _c :.1 f }% | Null Bias : { bi as_ n :.1 f }% ")
if __na me_ _ == ’ __ main_ _ ’:
main ()
References
[1] P. J. E. Peebles, “Origin of the angular momentum of galaxies,” Astrophys. J. 155,
393 (1969).
[2] S. D. M. White, “Angular momentum growth in protogalaxies,” Astrophys. J. 286,
38 (1984).
[3] J. Barnes and G. Efstathiou, “Angular momentum from tidal torques,” Astrophys.
J. 319, 575 (1987).
[4] I. Labb´e et al., “A population of red candidate massive galaxies ∼600 Myr after the
Big Bang,” Nature 616, 266 (2023).
[5] S. L. Finkelstein et al., “A long time ago in a galaxy far, far away: CEERS discovery,”
Astrophys. J. Lett. 940, L55 (2022).
[6] E. Tempel, R. Stoica, and E. Saar, “Evidence for spin alignment of spiral and elliptical
galaxies,” MNRAS 428, 1827 (2013).
[7] J. Blue Bird et al., “ALFALFA and galaxy spin alignment,” MNRAS 492, 153 (2020).
[8] S. Codis, R. Gavazzi, and C. Pichon, “Spin alignments within the cosmic web,”
MNRAS 481, 4753 (2018).
[9] C. Welker et al., “The SAMI Galaxy Survey: mass as the driver of spin-filament
alignment,” MNRAS 491, 2864 (2020).
12