-
Notifications
You must be signed in to change notification settings - Fork 14
CoLoRe-2LPT: 2LPT velocities added for particles, tracers and beams #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
damonge
wants to merge
1
commit into
master
Choose a base branch
from
colore-2lpt
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,91 @@ | ||
| global: | ||
| { | ||
| #Output prefix. Output will be in prefix_<node ID>.<fits/txt> | ||
| prefix_out= "/lustre/home/mruizh/2lpt_paper/codes/CoLoRe-master/new_out/out"; | ||
| #Output format. Select HDF5, FITS or ASCII | ||
| output_format= "FITS"; | ||
| #Output Gaussian overdensity field at z=0? | ||
| output_density= false | ||
| #Path to power spectrum at z=0. Power spectrum file must | ||
| #be in CAMB format: k (h/Mpc), P(k) (Mpc/h)^3. | ||
| pk_filename= "/lustre/home/mruizh/CoLoRe_2LPT/CoLoRe_2LPT/input_files/Pk_Abacus_Cosmology_z0.txt" | ||
| #This redshift range also defines the size of the box | ||
| z_min= 1.6 | ||
| z_max= 3.79 | ||
| #RNG seed note that output will depend on number of nodes, etc not only | ||
| #on the RNG seed | ||
| seed= 1 | ||
| #Set to true if you want to generate the theory prediction for the 3D power spectrum | ||
| #of the different tracers. | ||
| write_pred=false | ||
| #Intervals of redshift at which the prediction will be produced. | ||
| pred_dz=0.1 | ||
| #If write_pred is true, set this to true if you just want to generate the prediction | ||
| #and then exit. This is also useful if you want to inspect the memory requirements | ||
| #before a run. | ||
| just_write_pred= false | ||
| } | ||
|
|
||
| field_par: | ||
| { | ||
| #Extra Gaussian smoothing scale [Mpc/h] (set to a | ||
| #negative value if you don't want any smoothing) | ||
| r_smooth= -1 | ||
| #Do you want to smooth the Newtonian potential as well? | ||
| smooth_potential= false | ||
| #Will use a Cartesian grid with n_grid^3 cells | ||
| n_grid= 4096 | ||
| #Density field type | ||
| # 0-lognormal | ||
| # 1-1LPT | ||
| # 2-2LPT | ||
| dens_type= 2 | ||
| #If dens_type==1 or 2, buffer size (fraction per particle) | ||
| lpt_buffer_fraction= 0.6 | ||
| #If dens_type==1 or 2, scheme to interpolate particle | ||
| #positions into a grid | ||
| # 0-NGP | ||
| # 1-CIC | ||
| # 2-TSC | ||
| lpt_interp_type= 1 | ||
| lpt_vzty= 1 | ||
| #Set to 1 if you want to output the LPT particle positions | ||
| output_lpt= 0 | ||
| } | ||
|
|
||
| cosmo_par: | ||
| { | ||
| #Non-relativistic matter | ||
| omega_M= 0.3153 | ||
| #Dark energy | ||
| omega_L= 0.6847 | ||
| #Baryons | ||
| omega_B= 0.049301692328524445 | ||
| #Hubble parameter (in units of 100 km/s/Mpc) | ||
| h= 0.6736 | ||
| #Dark energy equation of state | ||
| w= -1.0 | ||
| #Primordial scalar spectral index, used only to extrapolate | ||
| #P(k) at low k end (-3 used at high k end) | ||
| ns= 0.9649 | ||
| #Power spectrum normalization. The input power spectrum will be | ||
| #renormalized to this sigma8 | ||
| sigma_8= 0.8111 | ||
| } | ||
|
|
||
| #For each galaxy population, create a section called srcsX, starting with X=1 | ||
| srcs1: | ||
| { | ||
| #Path to N(z) file. Should contain two columns | ||
| # 1-> z, 2-> dN(z)/dz*dOmega | ||
| # with dN/dzdOmega in units of deg^-2 | ||
| nz_filename= "/lustre/home/mruizh/CoLoRe_2LPT/CoLoRe_2LPT/input_files/Nz_qso_130618_2_colore1_hZs.txt" | ||
| #Path to bias file. Should contain two columns | ||
| # 1-> z, 2-> b(z) | ||
| bias_filename= "/lustre/home/mruizh/CoLoRe_2LPT/CoLoRe_2LPT/input_files/Bz_clustering.txt" | ||
| threshold_filename= "/lustre/home/mruizh/CoLoRe_2LPT/CoLoRe_2LPT/input_files/Tz_clustering.txt" | ||
| #Do you want to include shear ellipticities? | ||
| include_lensing= false | ||
| #Do you want to store line-of-sight skewers for each object? | ||
| store_skewers= true | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -110,6 +110,8 @@ | |
| #define BG_KZ_CSTM 1012 | ||
| #define BG_BZ_CSTM 1013 | ||
| #define BG_NORM_CSTM 1014 | ||
| #define BG_F1 1015 | ||
| #define BG_F2 1016 | ||
|
|
||
| //Density field parameters | ||
| #define DZ_SIGMA 0.05 | ||
|
|
@@ -248,6 +250,8 @@ typedef struct { | |
| double growth_d2_arr[NA]; //Array of density growth factors used to compute D_d(r) | ||
| double growth_v_arr[NA]; //Array of velocity growth factors used to compute D_v(r) | ||
| double growth_pd_arr[NA]; //Array of potential derivative factors used to compute \dot{\phi} | ||
| double growth_f1_arr[NA]; // Array of 1 order growth rates used to compute f_d(r) | ||
| double growth_f2_arr[NA]; // Array of 2 order growth rates used to compute f_d(r) | ||
| double ihub_arr[NA]; //Array of 1/H(z) | ||
| double glob_idr; //1/dr, where dr is the radial comoving distance interval used in the arrays above | ||
| // Power spectra | ||
|
|
@@ -267,6 +271,7 @@ typedef struct { | |
| int smooth_potential; //Do we smooth the newtonian potential as well? | ||
| int dens_type; //Method to produce the density field | ||
| int lpt_interp_type; | ||
| int lpt_vzty; // Use 2LPT velocities (only makes sense if dens_type is 2LPT) | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Slightly pedantic: could we call this |
||
| double lpt_buffer_fraction; //Fraction of memory saved for buffer particles | ||
| int output_lpt; | ||
| unsigned int seed_rng; //RNG seed | ||
|
|
@@ -284,6 +289,12 @@ typedef struct { | |
| dftw_complex *grid_dens_f; //Fourier-space grid for the density field | ||
| flouble *grid_dens; //Real-space grid for the density field | ||
| dftw_complex *grid_npot_f; //Fourier-space grid for the Newtonian potential | ||
| flouble *grid_velx; //Real-space grid for the x component of the 2lpt velocity field | ||
| flouble *grid_vely; //Real-space grid for the y component of the 2lpt velocity field | ||
| flouble *grid_velz; //Real-space grid for the z component of the 2lpt velocity field | ||
| dftw_complex *grid_velx_f; //Fourier-space grid for the x component of the 2lpt velocity field (not used right?) | ||
| dftw_complex *grid_vely_f; //Fourier-space grid for the y component of the 2lpt velocity field (not used right?) | ||
| dftw_complex *grid_velz_f; //Fourier-space grid for the z component of the 2lpt velocity field (not used right?) | ||
| flouble *grid_npot; //Real-space grid for the Newtonian potential | ||
| flouble *slice_left; //Dummy array to store grid cells coming from the left node | ||
| flouble *slice_right; //Dummy array to store grid cells coming from the right node | ||
|
|
@@ -448,6 +459,7 @@ flouble *compute_lensing_spacing(ParamCoLoRe *par); | |
| ParamCoLoRe *read_run_params(char *fname,int test_memory); | ||
| void write_density_grid(ParamCoLoRe *par,char *prefix_dens); | ||
| void write_lpt(ParamCoLoRe *par,unsigned long long npart,flouble *x,flouble *y,flouble *z); | ||
| void write_lpt_wvel(ParamCoLoRe *par,unsigned long long npart,flouble *x,flouble *y,flouble *z, flouble *vx, flouble *vy, flouble *vz); //Same as above but including 2lpt velocities (merge) | ||
| void write_srcs(ParamCoLoRe *par); | ||
| void write_imap(ParamCoLoRe *par); | ||
| void write_cstm(ParamCoLoRe *par); | ||
|
|
||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say undo these changes to leave the makefile as it was before for simplicity (unless any of these changes affect your modifications, but I think that's not the case)