temet.catalog
Catalog-based analysis and post-processing (auxcat creation) for cosmological simulations.
The functions here are rarely called directly. Instead they are typically invoked from within a particular auxCat request.
temet.catalog.box
Cosmological simulations - auxiliary (whole box-based) catalogs for additional derived properties.
- wholeBoxColDensGrid(sP, pSplit, species, gridSize=None, onlySFR=False, allSFR=False)
Compute a 2D grid of gas column densities [cm^-2] covering the entire simulation box.
For example to derive the neutral hydrogen CDDF. Strategy is a chunked load of the snapshot files, for each using SPH-kernel deposition to distribute the mass of the requested species (e.g. HI, CIV) in all gas cells onto the grid.
- Parameters:
sP (
simParams) – simulation instance.pSplit (list[int]) – standard parallelization 2-tuple of [cur_job_number, num_jobs_total].
species (str) – the gas species/sub-component to grid.
gridSize (int or None) – if specified, override the default grid cell size [code units].
onlySFR (bool) – if True, only include SFR > 0 gas cells.
allSFR (bool) – if True, assume that all gas with SFR > 0 gas a unity fraction of the given species. E.g. for H2, assume star formation gas cells are entirely made of molecular hydrogen.
- Returns:
a 2-tuple composed of
result (
ndarray): 2d array, gridded column densities.attrs (dict): metadata.
- wholeBoxCDDF(sP, pSplit, species, gridSize=None, omega=False)
Compute the column density distribution function (CDDF, i.e. histogram) given a full box column density grid.
- Parameters:
sP (
simParams) – simulation instance.pSplit (list[int]) – standard parallelization 2-tuple of [cur_job_number, num_jobs_total].
species (str) – the gas species/sub-component to grid.
gridSize (int or None) – if specified, override the default grid cell size [code units].
omega (bool) – if True, then instead compute the single number Omega_species = rho_species / rho_crit,0.
- Returns:
a 2-tuple composed of
result (
ndarray): 1d array, the CDDF.attrs (dict): metadata.
Note
There is unfortunate duplication/lack of generality between this function and
wholeBoxColDensGrid()(e.g. in the projection depth specification) which is always called. To define a new catalog for a CDDF, it must be specified twice: the actual grid, and the CDDF.
temet.catalog.common
Cosmological simulations - common utilities for auxiliary catalog calculation.
- pSplitBounds(sP, pSplit, minStellarMass=None, minHaloMass=None, indivStarMags=False, partType=None, cenSatSelect=None, equalSubSplit=True)
Determine an efficient split of subhalos (and global snapshot index range needed) to process for a pSplit task.
- Parameters:
sP (
simParams) – simulation instance.pSplit (list[int]) – standard parallelization 2-tuple of [cur_job_number, num_jobs_total].
minStellarMass (float) – apply lower limit on
mstar_30pkpc_log.minHaloMass (float) – apply lower limit on
mhalo_200_log.indivStarMags (bool) – make sure return covers the full PartType4 size.
partType (str or None) – if not None, use this to decide particle-based split, otherwise use ‘gas’.
cenSatSelect (str or None) – if not None, restrict to ‘cen’, ‘sat’, or ‘all’.
equalSubSplit (bool) – subdivide a pSplit based on equal numbers of subhalos, rather than particles.
- Returns:
a 3-tuple composed of
subhaloIDsTodo (list[int]): the list of subhalo IDs to process by this task.
indRange (dict): the index range for the particle load required to cover these subhalos.
nSubsSelection (int): the number of subhalos to be processed.
- findHalfLightRadius(rad, vals, frac=0.5, mags=True)
Find radius that encloses half of the total quantity, e.g. half light or half mass radii.
Linearly interpolate in rr (squared radii) to find the half light radius, given a list of values[i] corresponding to each particle at rad[i].
- Parameters:
- Returns:
half-light radius in 3D or 2D (if rad is input 3D or 2D).
- Return type:
temet.catalog.gasflows
Cosmological simulations - auxiliary catalogs for analyzing gas (in/out)flows.
- instantaneousMassFluxes(sP, pSplit=None, ptType='gas', scope='subhalo_wfuzz', massField='Masses', rawMass=False, fluxMass=True, fluxKE=False, fluxP=False, proj2D=False, v200norm=False)
Derive radial mass, energy, or momentum flux rates (outflowing/inflowing).
For every subhalo, use the instantaneous kinematics of gas to derive radial mass, energy, or momemtum flux rates (outflowing/inflowing), and compute high dimensional histograms of this gas mass/energy/mom flux as a function of (rad,vrad,dens,temp,metallicity), as well as a few particular 2D marginalized histograms of interest and 1D marginalized histograms. To run, choose one of:
rawMass,fluxMass,fluxKE, orfluxP(see below).- Parameters:
sP (
simParams) – simulation instance.pSplit (list[int][2]) – standard parallelization 2-tuple of [cur_job_number, num_jobs_total].
ptType (str) – particle/cell type, can be either ‘gas’ (PartType0) or ‘wind’ (PartType4).
scope (str) – analysis scope, can be one of ‘subhalo’, ‘subhalo_wfuzz’, or ‘global’ (slow).
massField (str) – if not ‘Masses’ (total gas cell mass), then use instead this field and derive fluxes only for this mass subset (e.g. ‘Mg II mass’).
rawMass (bool) – histogrammed quantity is mass [msun] (per bin, e.g. mass in a given radial+vrad bin).
fluxMass (bool) – histogrammed quantity is radial mass flux [msun/yr] (default behavior, used in paper).
fluxKE (bool) – histogrammed quantity is radial kinetic energy flux [10^30 erg/s].
fluxP (bool) – histogrammed quantity is radial momentum flux [10^30 g*cm/s^2].
proj2D (bool) – if True, then all ‘rad’ bins become ‘rad2d’ bins (projected distance, z-axis direction, i.e. these are -annular- apertures on the sky), and all ‘vrad’ bins become ‘vlos’ bins (1D line of sight velocity). In this case, only rawMass is supported, since we have no shell volume element to normalize by. Additionally, a ‘down the barrel’ geometry is assumed, e.g. only material in front of the galaxy contributes.
v200norm (bool) – if True, then all velocities are binned in thresholds which are fractions of v200 of the halo, rather than in absolute physical [km/s] units.
- Returns:
a 2-tuple composed of:
result (
ndarray): 1d or 2d array, containing result(s) for each processed subhalo.attrs (dict): metadata.
- Return type:
- radialMassFluxes(sP, scope, ptType, thirdQuant=None, fourthQuant=None, firstQuant='rad', secondQuant='vrad', massField='Masses', selNum=None, fluxKE=False, fluxP=False, rawMass=False, inflow=False, v200norm=False)
Compute the total mass, energy, or momentum outflow or inflow fluxes (i.e. rates) in arbitrary bins.
Principally, fluxes are computed in radial and radial velocity bins, but are optionally also binned by a third and fourth quantity (e.g. temperature, metallicity, density, or angular position theta). Loads the radialMassFlux aux catalogs and computes the total mass flux rate (msun/yr), energy flux rate (10^30 erg/s), or momentum flux rate (10^30 g*cm/s^2), according to fluxKE/fluxP.
- Parameters:
sP (
simParams) – simulation instance.scope (str) – ‘subhalo’, ‘subhalo_wfuzz’, or ‘global’ (see auxCat documentation).
ptType (str) – ‘Gas’ or ‘Wind’.
firstQuant (str) – first quantity to bin by, typically ‘rad’.
secondQuant (str) – second quantity to bin by, typically ‘vrad’.
thirdQuant (str or None) – if provided, then should be one of temp,z_solar,numdens,theta, in which case the returned flux is not [Nsubs,nRad,nVradcuts] but instead [Nsubs,nRad,nVradcuts,nThirdQuantBins]. That is, the dependence on this parameter is given instead of integrated over, and the return has one more dimension.
fourthQuant (str or None) – as for thirdQuant, and then return is then 5D.
massField (str) – if not ‘Masses’ (total gas cell mass), then use instead this field and derive fluxes only for this mass subset (e.g. ‘Mg II mass’).
selNum (int or None) – if provided, then directly use this ‘bin_X’ from the auxCat, instead of searching for the appropriate one based on the quants.
fluxKE (bool) – compute energy loading factors instead of mass loadings.
fluxP (bool) – compute momentum loading factors instead of mass loadings.
rawMass (bool) – if True, then return total mass in each bin [msun], rather than mass flux rates [msun/yr].
inflow (bool) – if True, then compute inflow rates (vrad < 0) rather than outflow rates (vrad > 0).
v200norm (bool) – if True, then all velocities are binned in thresholds which are fractions of v200 of the halo, rather than in absolute physical [km/s] units.
- massLoadingsSN(sP, pSplit, sfr_timescale=100, scope='SubfindWithFuzz', thirdQuant=None, massField='Masses', fluxKE=False, fluxP=False, v200norm=False)
Compute mass, energy, or momemtum loading factors.
For every subhalo, compute one of: * mass loading factor
eta_M^SN = eta_M = Mdot_out / SFR. * energy loading factoreta_E^SN = Edot_out / Edot_SFR(if fluxKE == True) * momentum loading factoreta_P^SN = Pdot_out / Pdot_SFR(if fluxP == True) In the case of mass loadings, the outflow rates are derived using the instantaneous kinematic/flux method.- Parameters:
sP (
simParams) – simulation instance.pSplit (list[int][2]) – standard parallelization 2-tuple of [cur_job_number, num_jobs_total].
sfr_timescale (float) – the star formation rates can be instantaneous or smoothed over some appropriate timescale.
scope (str) – analysis scope, can be one of ‘subhalo’, ‘subhalo_wfuzz’, or ‘global’ (slow).
thirdQuant (str) – if not None, then can be one of (temp,z_solar,numdens,theta), in which the dependence on this parameter is given instead of integrated over, and the return has one more dimension.
massField (str) – if not ‘Masses’ (total gas cell mass), then use instead this field and derive fluxes only for this mass subset (e.g. ‘Mg II mass’).
fluxKE (bool) – compute energy loading factors instead of mass loadings.
fluxP (bool) – compute momentum loading factors instead of mass loadings.
v200norm (bool) – if True, then all velocities are binned in thresholds which are fractions of v200 of the halo, rather than in absolute physical [km/s] units.
- Returns:
a 2-tuple composed of:
result (ndarray[float][nSubsInAuxCat,nRadBins,nVradCuts]): 3d array, containing result(s) for each processed subhalo.
attrs (dict): metadata.
- Return type:
- outflowVelocities(sP, pSplit, percs=(25, 50, 75, 90, 95, 99), scope='SubfindWithFuzz', massField='Masses', proj2D=False, v200norm=False)
Compute an outflow velocity for every subhalo.
Return has shape [nSubsInAuxCat,nRadBins+1,nPercentiles], where the final radial bin considers gas at all radii (in the scope). If proj2D is True, then we compute the line-of-sight projected velocities.
temet.catalog.group
Cosmological simulations - auxiliary (group-based) catalogs for additional derived properties.
- fofRadialSumType(sP, pSplit, ptProperty, rad, method='B', ptType='all')
Compute total/sum of a particle property (e.g. mass) for particles within an available SO radius.
Use one of four methods:
Method A: do individual halo loads per halo, one loop over all halos.
Method B: do a full snapshot load per type, then halo loop and slice per FoF, to cut down on I/O ops.
Method C: per type: full snapshot load, spherical aperture search per FoF (brute-force global).
Method D: per type: full snapshot load, construct octtree, spherical aperture search per FoF (global).
- Parameters:
sP (
simParams) – simulation instance.pSplit (list[int]) – standard parallelization 2-tuple of [cur_job_number, num_jobs_total].
ptProperty (str) – particle/cell quantity to apply reduction operation to.
rad (str) – a radius available in the group catalog, e.g. ‘Group_R_Crit200’ [code units].
method (str) – see above. Note! Methods A and B restrict this calculation to FoF particles only, whereas method C does a full particle search over the entire box in order to compute the total/sum for each FoF halo.
ptType (str) – if ‘all’, then sum over all types (dm, gas, and stars), otherwise just for the single specified type.
- Returns:
a 2-tuple composed of
result (
ndarray): 1d array, result for each subhalo.attrs (dict): metadata.
Warning
This was an early example of a catalog generating function, and is left mostly for reference as a particularly simple example. In practice, its functionality can be superseded by
subhaloRadialReduction().
temet.catalog.maps
Cosmological simulations - auxiliary (map-based) catalogs for additional derived properties.
- projections(sP, partType='gas', partField='coldens_msunkpc2', conf=0, method='sphMap_globalZoomOrig', cenSatSelect='cen', m200_min=14.0, saveImages=False)
Generate projections for a given configuration, save results into a single postprocessing file.
- Parameters:
sP (
simParams) – simulation instance.partType (str) – particle type to project (e.g. ‘gas’, ‘stars’).
partField (str) – field to project (e.g. ‘coldens_msunkpc2’).
conf (int) – projection configuration index (0-3).
method (str) – mapping method to use. If ‘sphMap_globalZoomOrig’, all particles from original zoom run are used (TNG-Cluster only). Otherwise, ‘sphMap’ or ‘sphMap_global’ are reasonable choices.
cenSatSelect (str) – ‘cen’, ‘sat’, or ‘all’ to select central, satellite, or all subhalos.
m200_min (float) – minimum M200c [log10(Msun)] for halos to include. If None, include all halos.
saveImages (bool) – if True, render and save actual plot images as well.
- summarize_projection_2d(sim, pSplit=None, quantity='sz_yparam', projConf='2r200_d=r200', op='sum', aperture='r500')
Calculate summary statistic(s) from existing projections in 2D, e.g. Y_{r500,2D} for SZ.
temet.catalog.profile
Cosmological simulations - auxiliary catalogs (of radial profiles).
- healpix_shells_points(nRad, Nside, radMin=0.0, radMax=5.0)
Return a set of spherical shell sample points as defined by healpix.
- subhaloRadialProfile(sP, pSplit, ptType, ptProperty, op, scope, weighting=None, proj2D=None, ptRestrictions=None, subhaloIDsTodo=None, radMin=-1.0, radMax=3.7, radBinsLog=True, radNumBins=100, radRvirUnits=False, Nside=None, Nngb=None, minHaloMass=None, minStellarMass=None, cenSatSelect='cen')
Compute subhalo radial profiles (e.g. total/sum, weighted mean) of a particle/cell property (e.g. mass).
- Parameters:
sP (
simParams) – simulation instance.pSplit (list[int]) – standard parallelization 2-tuple of [cur_job_number, num_jobs_total].
ptType (str) – particle type, e.g. ‘gas’, ‘stars’, ‘dm’, ‘bhs’.
ptProperty (str) – particle/cell quantity to apply reduction operation to.
op (str) – reduction operation to apply. ‘min’, ‘max’, ‘mean’, ‘median’, and ‘sum’ for example.
scope (str) – which particles/cells are included for each profile. If
scope=='global', then all snapshot particles are used, and we do the accumulation in a chunked snapshot load. Self/other halo terms are decided based on subfind membership, unless scope==’global_fof’, then on group membership. Ifscope=='fof'or ‘subfind’ then restrict to FoF/subhalo particles only, respectively, and do a restricted load according to pSplit. In this case, only the self-halo term is computed. Ifscope=='subfind_global'then only the other-halo term is computed, approximating the particle distribution using an already computed subhalo-based accumlation auxCat, e.g. ‘Subhalo_Mass_OVI’. Ifscope=='global_spatial', then use pSplit to decompose the work via a spatial subset of the box, such that we are guaranteed to have access to all the particles/cells within radMax of all halos being processed, to enable more complex global scope operations. Ifscope=='global_tngcluster', then use the file structure of the reconstructed TNG-Cluster simulation to achieve global scope profiles.weighting (str) – if not None, then use this additional particle/cell property as the weight.
proj2D (list or None) – if not None, do 3D profiles, otherwise 2-tuple specifying (i) integer coordinate axis in [0,1,2] to project along or ‘face-on’ or ‘edge-on’, and (ii) depth in code units (None for full box).
ptRestrictions (dict) – apply cuts to which particles/cells are included. Each key,val pair in the dict specifies a particle/cell field string in key, and a [min,max] pair in value, where e.g. np.inf can be used as a maximum to enforce a minimum threshold only.
subhaloIDsTodo (list) – if not None, then process this explicit list of subhalos.
radMin (int) – minimum radius for profiles, should be [log] if radBinsLog == True, else [linear]. should be [code units] if radRvirUnits == False, else [dimensionless rvir units].
radMax (int) – maximum radius for profiles, as above.
radBinsLog (bool) – if True, input radMin and radMax are in log, otherwise linear.
radNumBins (int) – number of radial bins for profiles.
radRvirUnits (bool) – if True, radMin and radMax are in units of rvir of each halo. Note that in this case binning is always linear, whereas if False, binning is always logarithmic.
Nside (int or None) – if not None, should be a healpix parameter (2,4,8,etc). In this case, we do not compute a spherically averaged radial profile per halo, but instead a spherical healpix sampled set of shells/radial profiles, where the quantity sampling at each point uses a SPH-kernel with
Nngb.Nngb (int or None) – must be specified, if and only if
Nsideis also specified. The neighbor number.minHaloMass (str or float) – minimum halo mass to compute, in log msun (optional).
minStellarMass (str or float) – minimum stellar mass of subhalo to compute in log msun (optional).
cenSatSelect (str) – exclusively process ‘cen’, ‘sat’, or ‘all’.
- Returns:
a 2-tuple composed of
result (
ndarray): 2d array, radial profile for each subhalo.attrs (dict): metadata.
Note
For scopes global and global_fof, four profiles are saved: [all, self-halo, other-halo, diffuse], otherwise only a single ‘all’ profile is computed.
temet.catalog.subhalo
Cosmological simulations - auxiliary (subhalo-based) catalogs for additional derived properties.
- subhaloRadialReduction(sP, pSplit, ptType, ptProperty, op, rad, ptRestrictions=None, weighting=None, scope='subfind', minStellarMass=None, minHaloMass=None, cenSatSelect=None)
Compute a reduction operation of a particle/cell property for each subhalo.
- Parameters:
sP (
simParams) – simulation instance.pSplit (list[int]) – standard parallelization 2-tuple of [cur_job_number, num_jobs_total].
ptType (str) – particle type e.g. ‘gas’, ‘stars’, ‘dm’, ‘bhs’.
ptProperty (str) – particle/cell quantity to apply reduction operation to.
op (str) – reduction operation to apply. ‘sum’, ‘mean’, ‘max’ or custom user-defined string.
rad (float or str) – if a scalar, then [physical kpc], otherwise a string label for a given radial restriction specification e.g. ‘rvir’ or ‘2rhalfstars’ (see
_radialRestriction()).ptRestrictions (dict) – apply cuts to which particles/cells are included. Each key,val pair in the dict specifies a particle/cell field string in key, and a [min,max] pair in value, where e.g. np.inf can be used as a maximum to enforce a minimum threshold only.
weighting (str) – if not None, then use this additional particle/cell property as the weight.
scope (str) – Calculation is restricted to subhalo particles only if
scope=='subfind'(default), or FoF particles ifscope=='fof'. Ifscope=='global', currently a full non-chunked snapshot load and brute-force distance computations to all particles for each subhalo (can change to tree method).minStellarMass (str or float) – minimum stellar mass of subhalo to compute in log msun (optional).
minHaloMass (str or float) – minimum halo mass to compute, in log msun (optional).
cenSatSelect (str) – exclusively process ‘cen’, ‘sat’, or ‘all’.
- Returns:
a 2-tuple composed of
result (
ndarray): 1d array, value for each subhalo.attrs (dict): metadata.
- subhaloStellarPhot(sP, pSplit, iso=None, imf=None, dust=None, Nside=1, rad=None, modelH=True, bands=None, sizes=False, indivStarMags=False, fullSubhaloSpectra=False, redshifted=False, emlines=False, seeing=None, minStellarMass=None, minHaloMass=None)
Compute the total band-magnitudes (or half-light radii if
sizes==True), per subhalo.Under a given assumption of an iso(chrone) model, imf model, dust model, and radial restrction. If using a dust model, can include multiple projection directions per subhalo.
- Parameters:
sP (
simParams) – simulation instance.pSplit (list[int]) – standard parallelization 2-tuple of [cur_job_number, num_jobs_total].
iso (str) – isochrone library, as in
cosmo.stellarPop.spsinitialization.imf (str) – stellar IMF, as in
cosmo.stellarPop.spsinitialization.dust (str or None) – dust model, as in
cosmo.stellarPop.spsinitialization.Nside (int or str or None) – if None, then no 2D projections are done, should be used if e.g. if no viewing angle dependent dust is requested. If an integer, then a Healpix specification, which defines the multiple viewing angles per subhalo. If str, one of ‘efr2d’ (several edge-on and face-on viewing angles), or ‘z-axis’ (single projection per subhalo along z).
rad (float or str) – if a scalar, then [physical kpc], otherwise a string label for a given radial restriction specification e.g. ‘rvir’ or ‘2rhalfstars’ (see
_radialRestriction()).modelH (bool) – use our model for neutral hydrogen masses (for extinction), instead of snapshot values.
bands (list[str] or None) – over-ride default list of broadbands to compute.
sizes (bool) – instead of band-magnitudes, save half-light radii.
indivStarMags (bool) – save the magnitudes for every PT4 (wind->NaN) in all subhalos.
fullSubhaloSpectra (bool) – save a full spectrum vs wavelength for every subhalo.
redshifted (bool) – all the stellar spectra/magnitudes are computed at sP.redshift and the band filters are then applied, resulting in apparent magnitudes. If False (default), stars are assumed to be at z=0, spectra are rest-frame and magnitudes are absolute (if dust is unresolved) or apparent (if dust is resolved).
emlines (bool) – include nebular emission lines.
seeing (float or None) – if not None, then instead of a binary inclusion/exclusion of each star particle based on the
radaperture, include all stars weighted by the fraction of their light which enters theradaperture, assuming it is spread by atmospheric seeing into a Gaussian with a sigma of seeing [units of arcseconds at sP.redshift].minStellarMass (str or float) – minimum stellar mass of subhalo to compute in log msun (optional).
minHaloMass (str or float) – minimum halo mass to compute, in log msun (optional).
- Returns:
a 2-tuple composed of
result (
ndarray): 1d array, value for each subhalo.attrs (dict): metadata.
- subhaloCatNeighborQuant(sP, pSplit, quant, op, rad=None, proj2D=None, subRestrictions=None, subRestrictionsRel=None, minStellarMass=None, minHaloMass=None, cenSatSelect=None)
For every subhalo, search for and compute a reduction operation over spatially nearby neighbors.
The search radius is globally constant and/or varies per subhalo (using tree search). Alternatively, perform an adaptive search such that we find at least N>=1 neighbor, and similarly compute a reduction operation over their properties.
- Parameters:
sP (
simParams) – simulation instance.pSplit (list[int]) – standard parallelization 2-tuple of [cur_job_number, num_jobs_total].
quant (str) – subhalo quantity to apply reduction operation to.
op (str) – reduction operation to apply. ‘min’, ‘max’, ‘mean’, ‘median’, and ‘sum’ compute over the requested quant for all nearby subhalos within the search, excluding this subhalo. ‘closest_rad’ returns the distance of the closest neighbor satisfying the requested restrictions. ‘d[3,5,10]_rad’ returns the distance to the 3rd, 5th, or 10th nearest neighbor, respectively. ‘closest_quant’ returns the quant of this closest neighbor. ‘count’ returns the number of identified neighbors.
rad (str, float, or list) – physical kpc if float, or a string as recognized by
_radialRestriction(), or if a list/tuple, then we compute radial profiles for each subhalo instead of a single value, in which case the tuple provides the profile parameters {radMin,radMax,radNumBins,radBinsLog,radRvirUnits} as in subhaloRadialProfile().proj2D (list or None) – if not None, do 3D profiles, otherwise 2-tuple specifying (i) integer coordinate axis in [0,1,2] to project along or ‘face-on’ or ‘edge-on’, and (ii) depth in code units (None for full box).
subRestrictions (list) – apply cuts to which subhalos are searched over. Each item in the list is a 3-tuple consisting of (field name, min value, max value), where e.g. np.inf can be used as a maximum to enforce a minimum threshold only. This is the only option which modifies the search target sample, as opposite to the search origin sample.
subRestrictionsRel (list) – as above, but every field is understood to be relative to the current subhalo value, which is the normalization, e.g. (‘mstar2’,’gt’,1.0) requires that neighbors have a strictly larger value, while (‘mstar2’,’gt’,0.5) requires neighbors have a value half as large or smaller.
minStellarMass (str or float) – minimum stellar mass of subhalo to compute in log msun (optional).
minHaloMass (str or float) – minimum halo mass to compute, in log msun (optional).
cenSatSelect (str) – exclusively process ‘cen’, ‘sat’, or ‘all’.
- Returns:
a 2-tuple composed of
result (
ndarray): 1d or 2d array, containing result(s) for each processed subhalo.attrs (dict): metadata.
temet.catalog.temporal
Cosmological simulations - auxiliary catalogs of time-evolution (merger trees, tracers, etc).
- mergerTreeQuant(sP, pSplit, treeName, quant, smoothing=None)
For every subhalo, compute an assembly/related quantity using a merger tree.
- Parameters:
sP (
simParams) – simulation instance.pSplit (list[int]) – standard parallelization 2-tuple of [cur_job_number, num_jobs_total].
treeName (str) – specify merger tree.
quant (str) – specify subhalo quantity (available in merger tree) or custom user-defined quantity.
smoothing (None or list) – if not None, then smooth the quantity along the time dimension according to the tuple specification
[method,windowSize,windowVal,order]wheremethodshould bemm(moving median ofwindowSize),ma(moving average ofwindowSize), orpoly(poly fit oforderN). The window size is given in units ofwindowValwhich can be onlysnap.
- Returns:
a 2-tuple composed of
result (
ndarray): 1d array, value for each subhalo.attrs (dict): metadata.
- tracerTracksQuant(sP, pSplit, quant, op, time, norm=None)
For every subhalo, compute a assembly/accretion/related quantity using the tracker track catalogs.
- Parameters:
sP (
simParams) – simulation instance.pSplit (list[int]) – standard parallelization 2-tuple of [cur_job_number, num_jobs_total].
quant (str) – specify tracer tracks catalog quantity.
op (str) – statistical operation to apply across all the child tracers of the subhalo.
time (str or None) – sample quantity at what time? e.g. ‘acc_time_1rvir’.
norm (str or None) – normalize quantity by a second quantity, e.g. ‘tvir_tacc’.
- Returns:
a 2-tuple composed of
result (
ndarray): 1d array, value for each subhalo.attrs (dict): metadata.