mirror of
https://github.com/Richard-Sti/csiborgtools_public.git
synced 2025-06-08 18:01:11 +00:00
New matches (#69)
* Remove old file * Add velocity plotting * add smooth scale * Fix bug * Improve paths * Edit plotting * Add smoothed density * Update boundaries * Add basics * Further docs * Remove blank * Better catalog broadcasting * Update high res size * Update plotting routines * Update routine * Update plotting * Fix field saving name * Add better colormap for environemnt
This commit is contained in:
parent
73687fd8cc
commit
35ccfb5c67
9 changed files with 343 additions and 169 deletions
|
@ -305,7 +305,7 @@ class VelocityField(BaseField):
|
|||
vel *= mass.reshape(-1, 1) / mpart
|
||||
|
||||
for i in range(3):
|
||||
MASL.MA(pos, rho_vel[i], self.boxsize, self.MAS, W=vel[i, :],
|
||||
MASL.MA(pos, rho_vel[i], self.boxsize, self.MAS, W=vel[:, i],
|
||||
verbose=False)
|
||||
if end == nparts:
|
||||
break
|
||||
|
@ -417,11 +417,8 @@ class TidalTensorField(BaseField):
|
|||
Returns
|
||||
-------
|
||||
environment : 3-dimensional array of shape `(grid, grid, grid)`
|
||||
The environment of each grid cell. Possible values are:
|
||||
- 0: void
|
||||
- 1: sheet
|
||||
- 2: filament
|
||||
- 3: knot
|
||||
The environment of each grid cell. Possible values are 0 (void),
|
||||
1 (sheet), 2 (filament), 3 (knot).
|
||||
"""
|
||||
environment = numpy.full(eigvals.shape[:-1], numpy.nan,
|
||||
dtype=numpy.float32)
|
||||
|
|
|
@ -356,8 +356,8 @@ class Paths:
|
|||
fname = f"parts_{str(nsim).zfill(5)}.h5"
|
||||
return join(fdir, fname)
|
||||
|
||||
def field(self, kind, MAS, grid, nsim, in_rsp):
|
||||
"""
|
||||
def field(self, kind, MAS, grid, nsim, in_rsp, smooth_scale=None):
|
||||
r"""
|
||||
Path to the files containing the calculated density fields in CSiBORG.
|
||||
|
||||
Parameters
|
||||
|
@ -373,6 +373,8 @@ class Paths:
|
|||
IC realisation index.
|
||||
in_rsp : bool
|
||||
Whether the calculation is performed in redshift space.
|
||||
smooth_scale : float
|
||||
Smoothing scale in :math:`\mathrm{Mpc}/h`
|
||||
|
||||
Returns
|
||||
-------
|
||||
|
@ -387,6 +389,9 @@ class Paths:
|
|||
if in_rsp:
|
||||
kind = kind + "_rsp"
|
||||
fname = f"{kind}_{MAS}_{str(nsim).zfill(5)}_grid{grid}.npy"
|
||||
if smooth_scale is not None and smooth_scale > 0:
|
||||
smooth_scale = float(smooth_scale)
|
||||
fname = fname.replace(".npy", f"smooth{smooth_scale}.npy")
|
||||
return join(fdir, fname)
|
||||
|
||||
def halo_counts(self, simname, nsim):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue