Classes
LinearMesh(Plin, BoxSize, Nmesh[, seed, …]) |
A MeshSource object that generates a RealField density mesh from a linear power spectrum function \(P(k)\). |
nbodykit.source.mesh.linear.LinearMesh(Plin, BoxSize, Nmesh, seed=None, unitary_amplitude=False, inverted_phase=False, remove_variance=None, comm=None)[source]¶A MeshSource object that generates a RealField density
mesh from a linear power spectrum function \(P(k)\).
| Parameters: |
|
|---|
Attributes
actions |
A list of actions to apply to the density field when interpolating to the mesh. |
attrs |
A dictionary storing relevant meta-data about the CatalogSource. |
Methods
apply(func[, kind, mode]) |
Return a view of the mesh, with actions updated to |
paint([mode, Nmesh]) |
Paint the density on the mesh and apply any transformation functions specified in actions. |
preview([axes, Nmesh, root]) |
Gather the mesh into as a numpy array, with (reduced) resolution. |
save(output[, dataset, mode]) |
Save the mesh as a BigFileMesh on disk, either in real or complex space. |
to_complex_field() |
Return a ComplexField, generating from the linear power spectrum. |
to_field([mode, out]) |
Return the mesh as a pmesh Field object, either in Fourier space or configuration space, based on mode. |
to_real_field([out, normalize]) |
Convert the mesh source to the configuration-space field, returning a pmesh.pm.RealField object. |
view() |
Return a “view” of the MeshSource, in the spirit of numpy’s ndarray view. |
to_complex_field()[source]¶Return a ComplexField, generating from the linear power spectrum.
Note
The density field is normalized to \(1+\delta\) such that the mean of the return field in real space is unity.
| Returns: | an array-like object holding the generated linear density field in Fourier space |
|---|---|
| Return type: | pmesh.pm.ComplexField |