mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +00:00
If preReShift is specified, also moves back particles to Z=0 in the case of no light cone transformation
This commit is contained in:
parent
39d10fdd6b
commit
5ad0bed91c
1 changed files with 2 additions and 1 deletions
|
@ -125,6 +125,7 @@ void metricTransform(SimuData *data, int axis, bool reshift, bool pecvel, double
|
||||||
float z_old = z;
|
float z_old = z;
|
||||||
|
|
||||||
double reduced_red = (z + baseComovingDistance)*100./LIGHT_SPEED;
|
double reduced_red = (z + baseComovingDistance)*100./LIGHT_SPEED;
|
||||||
|
double reduced_base = (reshift ? (baseComovingDistance*100./LIGHT_SPEED) : 0);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -134,7 +135,7 @@ void metricTransform(SimuData *data, int axis, bool reshift, bool pecvel, double
|
||||||
else if (cosmo_flag)
|
else if (cosmo_flag)
|
||||||
z = (z_vs_D.compute(reduced_red)-z_base)*LIGHT_SPEED/100.;
|
z = (z_vs_D.compute(reduced_red)-z_base)*LIGHT_SPEED/100.;
|
||||||
else
|
else
|
||||||
z = reduced_red*LIGHT_SPEED/100.0;
|
z = (reduced_red-reduced_base)*LIGHT_SPEED/100.0;
|
||||||
|
|
||||||
if (expfact)
|
if (expfact)
|
||||||
expfact[i] = z / z_old;
|
expfact[i] = z / z_old;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue