Lightcone Geometries¶
Class providing lightcone geometries—the spatial and temporal selection function that defines which galaxies from the simulation volume are observable by a survey. A lightcone selects objects whose simulated positions intersect the observer’s past light cone, accounting for periodic box replication. Implementations provide the minimum and maximum comoving lookback time, test whether a node lies within the cone, compute the position and velocity at lightcone crossing, and return the solid angle of the survey.
Default implementation: geometryLightconeNull
Methods¶
timeMinimum→double precisionReturns the minimum time in the lightcone.
timeMaximum→double precisionReturns the maximum time in the lightcone.
isInLightcone→logicalReturns true if the provided node lies within the lightcone.
type (treeNode), intent(inout) :: nodelogical , intent(in ), optional :: atPresentEpochdouble precision , intent(in ), optional :: radiusBuffer
replicationCount→integer(c_size_t)Returns the number of times the given nodes appears in the lightcone .
type (treeNode), intent(inout) :: node
solidAngle→double precisionReturns the solid angle subtended by the lightcone (in units of steradians).
position→double precision, dimension(3)Returns the position vector of a
node(in units of Mpc) in the lightcone coordinate system.type (treeNode), intent(inout), target :: nodeinteger(c_size_t), intent(in ) :: instance
velocity→double precision, dimension(3)Returns the velocity vector of a
node(in units of km/s) in the lightcone coordinate system.type (treeNode), intent(inout) :: nodeinteger(c_size_t), intent(in ) :: instance
timeLightconeCrossing→double precisionReturns the next time in the interval from the current node time to
timeEndat which any replicant of this node will cross the lightcone. If no crossing occurs during this interval a very large value is returned instead.type (treeNode), intent(inout), target :: nodedouble precision , intent(in ) :: timeStart , timeEnddouble precision , intent(inout), dimension(:), allocatable, optional :: timesCrossing
positionLightconeCrossing→double precision, dimension(3)Returns the position of the node at the time of lightcone crossing—which must have been previously identified via the
timeLightconeCrossingmethod.type(treeNode), intent(inout) :: node
velocityLightconeCrossing→double precision, dimension(3)Returns the velocity of the node at the time of lightcone crossing—which must have been previously identified via the
timeLightconeCrossingmethod.type(treeNode), intent(inout) :: node
geometryLightconeCylindrical¶
A lightcone geometry class which assumes a cylindrical “cone”, i.e. defined such that a point \((x,y,z)\) is in the survey if \(\sqrt{x^2+y^2} < r\), where \(r\) is the radius of the “cone”.
Methods
sampleNode
Parameters
[rBoundaries](default[+0.0d0,+1.0d0]) — A two-element array \([r_\mathrm{min}, r_\mathrm{max}]\) specifying the radial extent of the cylindrical computational domain, where \(r=0\) is the cylinder axis.[zBoundaries](default[-1.0d0,+1.0d0]) — A two-element array \([z_\mathrm{min}, z_\mathrm{max}]\) specifying the vertical extent of the cylindrical computational domain along the symmetry axis.[countCells](default[3_c_size_t,3_c_size_t]) — A two-element integer array specifying the number of grid cells along the \(r\) and \(z\) dimensions of the cylindrical computational domain, controlling the spatial resolution of the radiative transfer calculation.[convergencePercentile](default0.99d0) — The percentile of cells (between 0 and 1) used in assessing convergence; only this fraction of cells must satisfy the convergence threshold, allowing outlier cells to be excluded.[convergenceThreshold](default2.0d0) — The threshold value for the convergence measure; the domain is considered converged when the specified percentile of cells has a convergence metric below this value.[convergenceRatioThreshold](default1.1d0) — The threshold for the ratio of the convergence criterion between successive iterations; convergence is accepted when this ratio falls below the threshold, indicating the solution is no longer changing significantly.[rBoundaries](default[0.0d0,1.0d0]) — A two-element array \([r_\mathrm{min}, r_\mathrm{max}]\) specifying the radial extent of the cylindrical integration domain.[zBoundaries](default[-1.0d0,+1.0d0]) — A two-element array \([z_\mathrm{min}, z_\mathrm{max}]\) specifying the vertical extent of the cylindrical integration domain along the symmetry axis.[radiusCylinderComoving]— The comoving radius of the cylinder to populate.[radiusBufferComoving](default1.0d0) — The comoving buffer radius to add around the cylinder. This is used to ensure that the sample within the cylinder is complete.[massHaloLens](default-1.0d0) — The mass of the primary lens halo (or a negative value for no lens).[redshiftLens](default-1.0d0) — The redshift of the primary lens halo (or a negative value for no lens).
geometryLightconeNull¶
A null implementation of the lightcone geometry class. The lightcone has zero solid angle/volume, so no galaxy ever lies within it.
(Default implementation)
Parameters
[dimensionless](default.true.) — If true the null profile is considered to be dimensionless.
geometryLightconeSquare¶
A lightcone geometry class which assumes a square field of view., i.e. defined such that a point \((x,y,z)\) is in the survey angular mask if \(|\hbox{atan2}(y,x)| < \psi/2\) and \(|\hbox{atan2}(z,x)| < \psi/2\) where \(\hbox{atan2}()\) is the quadrant-aware inverse tangent function, and \(\psi\) is the angular size of the field, we compute the solid angle of the lightcone as follows. Define a spherical coordinate system \((\theta,\phi)\) with the pole (\(\theta=0\)) aligned with the \(x\)-axis. The solid angle of the field is then
which is
or
The final integral can be evaluated (using Mathematica for example) to give
where \(a=\tan(\psi/2)\) and \(x=\tan^{-1}[\sqrt{2}\tan (\psi/2)]\).
Various sub-parameters specify the details of the lightcone geometry. The lengthReplication parameter should give the length of the simulation box (the box will be replicated to span the volume covered by the lightcone), with the lengthUnitsInSI parameter giving the length unit in SI units and lengthHubbleExponent giving the exponent of \(h\) that appears in the length unit. The angularSize parameter of fieldOfView should gives the length of the side of the square field of view in degrees. The origin element must contain the \(x\), \(y\), \(z\) coordinates of the origin of the lightcone within the simulation box, while the unitVectorX parameters must give unit vectors which point along the lightcone (for X\(=1\)), and in the two directions perpendicular to the lightcone (for X\(=2\) and 3). The redshift parameters must list the redshifts of available outputs.
Methods
positionAtOutputreplicantsperiodicRangenodePositionReplicantnodeVelocityReplicantreplicantLightConeCrossingisInFieldOfView
Parameters
[nodeIndicesReport]— A list of node indices for which reporting should be performed.[origin]— The 3D Cartesian position vector (in Mpc) of the observer’s location from which the square lightcone extends along the direction defined by the unit vectors.[unitVector1]— The first (radial) unit vector defining the lightcone geometry.[unitVector2]— The second (angular) unit vector defining the lightcone geometry.[unitVector3]— The third (angular) unit vector defining the lightcone geometry.[lengthReplication]— The length of the simulation box being used to construct the lightcone.[lengthUnitsInSI]— The units of the box length in the SI system.[lengthHubbleExponent]— The exponent of the “little-\(h\)” parameter used in the definition of the box length.[angularSize]— The angular size (i.e. side length) of the square field of view of the lightcone (in units of degrees).[timeEvolvesAlongLightcone](default.true.) — Iftrue, cosmic time evolves along the lightcone as expected. Otherwise, time is fixed at the present epoch throughout the lightcone. This allows construction of lightcones with no evolution.