-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
30ae7c8
commit 7891d78
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
************** | ||
Density fields | ||
************** | ||
|
||
3D fields | ||
--------- | ||
|
||
The 3D density fields are located in the New York cluster (see :ref:`data_access`) under the ``3D_cubes`` folder. | ||
|
||
There are different folders for the different cosmologies. Inside each cosmology folder there are the folder containing the data for the different realizations. Inside each of those folders the 3D density fields can be found with names as ``df_m_X_Y_z=Z.npy``, where X can be 64, 128, 256, or 512, and it represents the grid size of the cube. Y represents the mass assignment scheme used to construct the density field, and can be something like CIC (cloud-in-cell) or PCS (piece-wise spline). Z represents the redshift of the density field. For instance, ``df_m_256_CIC_z=0.npy`` contains the 3D density field on a grid with :math:`256^3` voxels constructed using the CIC mass-assignment scheme at :math:`z=0`. | ||
|
||
.. note:: | ||
|
||
These fields are constructed in real-space. Please reach us if you need them in redshift-space. | ||
|
||
The files can be read simply as | ||
|
||
.. code-block:: python | ||
import numpy as np | ||
df = np.load('/home/fvillaescusa/Quijote/3D_cubes/Om_p/df_m_128_PCS_z=0.npy') | ||
2D fields | ||
--------- | ||
|
||
2D fields (say images) can be constructed from the above 3D fields by taking a slice and projected it into 2D. For instance: | ||
|
||
.. code-block:: python | ||
import numpy as np | ||
# read the 3D density field | ||
df_3D = np.load('/home/fvillaescusa/Quijote/3D_cubes/Om_p/df_m_128_PCS_z=0.npy') | ||
# take a slice of 4 voxels width, i.e. 1000/128*4 = 31.25 Mpc/h | ||
# along z-direction and project into 2D by computing the mean value | ||
df_2D = np.mean(df_3D[:,:,0:4], axis=2) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters