Scale Carrick field

This commit is contained in:
rstiskalek 2024-03-10 11:20:11 +00:00
parent 5cbcdf96dd
commit 9a3e937afd

View file

@ -130,7 +130,20 @@ def get_field(simname, nsim, kind, MAS, grid):
return np.load(fpath).astype(np.float32)
elif kind == "velocity":
fpath = join(folder, "twompp_velocity_carrick2015.npy")
return np.load(fpath).astype(np.float32)
field = np.load(fpath).astype(np.float32)
# Because the Carrick+2015 data is in the following form:
# "The velocities are predicted peculiar velocities in the CMB
# frame in Galactic Cartesian coordinates, generated from the
# \(\delta_g^*\) field with \(\beta^* = 0.43\) and an external
# dipole \(V_\mathrm{ext} = [89,-131,17]\) (Carrick et al Table 3)
# has already been added.""
field[0] -= 89
field[1] -= -131
field[2] -= 17
field /= 0.43
return field
else:
raise ValueError(f"Unknown field kind: `{kind}`.")
else: