temet.load package
Submodules
temet.load.auxcat module
Loading I/O - postprocessing auxcats, and the full list of specified auxcatalogs.
- auxCat(sP, fields=None, pSplit=None, reCalculate=False, searchExists=False, indRange=None, subhaloIDs=None, onlyMeta=False, expandPartial=False)
Load field(s) from the auxiliary group catalog, computing missing datasets on demand.
- Parameters:
sP (
simParams
) – simulation instance.pSplit (list[int]) – standard parallelization 2-tuple of [cur_job_number, num_jobs_total].
reCalculate (bool) – force redo of computation now, even if data is already saved in catalog.
searchExists (bool) – return None if data is not already computed, i.e. do not calculate right now.
indRange (list[int][2]) – if a tuple/list, load only the specified range of data (field and e.g. subhaloIDs).
subhaloIDs (ndarray[int]) – if a tuple/list, load only the requests subhaloIDs (assumed sparse).
onlyMeta (bool) – load only attributes and coverage information.
expandPartial (bool) – if data was only computed for a subset of all subhalos, expand this now into a total nSubs sized array.
- Returns:
A catalog dict with three entries for each
field
, which are ‘field’ (ndarray), ‘field_attrs’ (dict of metadata), and ‘subhaloIDs’, which correspond to the first dimension of the ‘field’ array.- Return type:
Note
Catalogs constructed without pSplit parallelism will be saved sparse if possible, with an array whose size is smaller than sP.numSubhalos and with subhaloIDs providing the mapping. However, catalogs constructed with pSplit parallelism will usually be expanded to full rather than sparse representations (denoted by writeSparseCalcFullSize). In this second case, unprocessed always have a result of np.nan which should always be filtered out, each with a corresponding entry of -1 in subhaloIDs.
temet.load.data module
Load external data files (observational points, etc) as well as AREPO .txt diagnostic files.
- behrooziSMHM(sP, logHaloMass=None, redshift=0.1)
Load from data files: Behroozi+ (2013) abundance matching, stellar mass / halo mass relation.
- behrooziSFRAvgs()
Load from data files: Behroozi+ (2013) average SFR histories in halo mass bins.
- behrooziObsSFRD()
Load observational data point compilation of SFRD(z) from Behroozi+ (2013).
- behrooziUM(sim)
Load from data files: Behroozi+ (2019) Universe Machine DR1. Stellar mass / halo mass relation.
- zhang21(sim, redshift=None)
Load from data files: Zhang+21 (TRINITY semi-empirical model for SMBHs).
- bouwensSFRD2014()
Load observational data points from Bouwens+ (2014): arXiv:1211.2230.
- eniaSFRD2022()
Load observational data points from Enia+ (2022): arXiv:2202.00019.
- mosterSMHM(sP, redshift=0.0)
Load from data files: Moster+ (2013) abundance matching, stellar mass / halo mass relation.
- kravtsovSMHM(sP)
Load from data files: Kravtsov+ (2014) abundance matching, stellar mass / halo mass relation.
- kormendyHo2013()
Best fit black hole / stellar bulge mass relations and observed points from Kormendy & Ho (2013).
- mcconnellMa2013()
Best fit black hole / stellar bulge mass relations from McConnell & Ma (2013).
- bogdan2018()
Load observational data points from Bogdan+ (2018), SMBH masses of BCGs.
- baldry2012SizeMass()
Load observational data points from Baldry+ (2012).
- lange2016SizeMass()
Load observational data points from Lange+ (2016) GAMA.
- shen2003SizeMass()
Load observational data points from Shen+ (2013). Table 1 and Eqns 17-19 (Fig 11).
- mowla2019()
Load observational data points from Mowla+ (2019) COSMOS-DASH.
- baldry2008SMF()
Load observational data points from Baldry+ (2008).
- baldry2012SMF()
Load observational data points from Baldry+ (2012).
- liWhite2009SMF(little_h=0.704)
Load observational data ponts from Li & White (2009). Triple-Schechter fit of Table 1.
- bernardi2013SMF()
Load observational data points from Bernardi+ (2013).
- dsouza2015SMF()
Load observational data points from D’Souza+ (2015) Fig 7.
- song2015SMF(redshift)
Load observational data points from Song+ (2015).
- grazian2015SMF(redshift)
Load observational data points from Grazian+ (2015).
- caputi2015SMF(redshift)
Load observational data points from Caputi+ (2015).
- davidzon2017SMF(redshift)
Load observational data points from Davidzon+ (2017).
- gallazzi2005(sP)
Load observational data points (M-Z and ages) from Gallazzi+ (2005).
- bernardi10()
Load observational data points (stellar ages) from Bernardi+ (2010).
- woo2008(sP)
Load observational data points (M-Z of local group dwarfs) from Woo+ (2008).
- kirby2013()
Load observational data points (M-Z of local group dwarfs) from Kirby+ (2013).
- giodini2009(sP)
Load observational data points (gas/stellar mass fractions in r500crit) from Giodini+ (2009).
- gonzalez2013()
Load observational data points (gas/stellar mass fractions) from Gonzalez+ (2013).
- lovisari2015(sP)
Load observational data points (gas/total mass within r500crit) from Lovisari+ (2015).
- lovisari2020()
Load observational data points (gas/total mass within r500c) from Lovisari+ (2020).
- zafar2013()
Load observational data points (HI absorption, f_HI(N) z=[1.51,5.0]) from Zafar+ (2013), sub-DLAs.
- noterdaeme2012()
Load observational data points (HI absorption, f_HI(N)) from Noterdaeme+ (2012), DLA range.
- noterdaeme2009()
Load observational data points (HI absorption, f_HI(N)) from Noterdaeme+ (2009), DLA range.
- kim2013cddf()
Load observational data points (HI absorption, f_HI(N)) from Kim+ (2013), Lya forest range.
- prochaska10cddf()
Load observational data (f_HI(N) cddf) from Prochaska+ (2010), LLS range.
- rafelski2012(sP, redshiftRange=[2.5, 3.5])
Load observational data (DLA metallicities) from Rafelski+ (2012). z>1.5.
- zahid2012(pp04=False, redshift=0)
Load observational data (gas MZR) from Zahid+ (2012).
- zahid2014(pp04=False, redshift=0.08)
Load observational data (gas MZR fit) from Zahid+ (2014).
- tremonti2004()
Load observational data (gas MZR) from Tremonti+ (2004).
- guo2016(O3O2=False)
Load observational data (gas MZR dwarfs z~0.6) from Guo+ (2016).
- thomChen2008()
OVI CDDF (0.12 < z < 0.5) from Thom & Chen (2008), extracted from Figure 5 panel (a).
- tripp2008()
OVI CDDF (z < 0.5) from Tripp+ (2008), extracted from Figure 11.
- danforth2008()
OVI CDDF (z < 0.4) from Danforth+ (2008), extracted from Figure 5 top-right panel.
- danforth2016()
Load observational data (OVI CDDF low-redshift) from Danforth+ (2015), Table 5.
- muzahid2011()
Load observational data (OVI CDDF z~2.3) from Muzahid+ (2011).
- bekeraite16VF()
Load observational data points from Bekeraite+ (2016) Fig 3 extracted.
- anderson2015(sP)
Load observational x-ray data from Anderson+ (2015). Table 3.
- werk2013(onlydict=False, tumlinsonOVI=True, coveringFractions=False, ionName='O VI')
Load observational COS-Halos data from Werk+ (2013).
- johnson2015(surveys=['IMACS', 'SDSS'], coveringFractions=False)
Load observational data/compendium from Johnson+ (2015). Only the given surveys, i.e. exclude the COS-Halos points which are also included in this table.
- berg2019(coveringFractions=False)
Load observational RDR survey data from Berg+ (2019).
- chen2018zahedy2019()
Load observational COS-LRG survey data from Chen+ (2018) and Zahedy+ (2019).
- rossetti17planck()
Load observational data points from Rosetti+ (2017) Table 1, Planck clusters.
- pintoscastro19(sP)
Load observational data (halo mass distribution) from Pintos-Castro+2019 from HSC.
- hilton21act()
Load the ACT cluster sample from Hilton+2021. (https://astro.ukzn.ac.za/~mjh/ACTDR5/v1.0b3/) Official: https://lambda.gsfc.nasa.gov/product/act/actpol_dr5_szcluster_catalog_get.html
- planck13xx()
Load the Y500-M500 data points from Planck2013 XX (arXiv 1303.5080)
- adami18xxl()
Load the XMM-Newton “XXL Survey 365 Cluster” sample from Adami+2018. (https://arxiv.org/abs/1810.03849)
- bleem15spt(sP)
Load the Y500-M500 data points from Bleem+ (2015) fiducial SPT-SZ 2500d sample.
- bleem20spt(sP)
Load the SPT-ECS sample from Bleem+2020. (https://arxiv.org/abs/1910.04121)
- piffaretti11rosat()
Load the ROSAT All-Sky MCXC cluster sample from Piffareeti+2011 (http://arxiv.org/abs/1007.1916)
- arnaud21chexmate()
Load the CHEX-MATE cluster sample from Arnaud+2011 (https://arxiv.org/abs/2010.11972)
- cassano13()
Load observational data points from Cassano+ (2013) Tables 1 and 2, radio/x-ray/SZ clusters.
- catinella2018()
Load observational x-ray data from Catinella+ (2018) xCOLDGASS survey. Table 1.
- foersterSchreiber2018()
Load observational data from Foerster Schreiber+ (2018) SINS AO survey.
- chen10()
Load observational data points from Chen+ (2010) Fig 17, outflow velocity vs SFR (literature compilation).
- rubin14()
Load observational data points from Rubin+ (2014) Tables 2-4, outflows based on MgII/FeII at z~0.5.
- heckman15()
Load observational data points from Heckman+ (2015) Tables 1-2, outflows of ionized gas at low-z.
- robertsborsani18()
Load observational data points from Roberts-Borsani+ (2018) Fig 9 (left), outflows based on NaD from SDSS.
- cicone16()
Load observational data points from Cicone+ (2016). Fig 15 (upper left), OIII v0.1 outflow velocities vs SFR (SDSS).
- davies18()
Load observational data points from Davies+ (2018). Figs 7 and 8, H-alpha z~2 outflows (SINS/zC-SINF).
- bordoloi14(surfdens=False)
Load observational data points from Bordoloi+ (2014) Fig 10,11, Table 1, outflows based on MgII in zCOSMOS (z~1).
- bordoloi16()
Load observational data points from Bordoloi+ (2016), sub-components of a lensed z=1.7 galaxy.
- erb12()
Load observational data points from Erb+ (2012) Fig 13 (lower left), outflows based on FeII at 1<z<1 (stack points).
- fiore17()
Load observational data points from Fiore+ (2017) Table B1, AGN-driven outflow properties (literature compilation).
- chisholm15(v90=False)
Load observational data points from Chisholm+ (2015), SF-driven outflow properties based on SiII (COS).
- genzel14()
Load observational data points from Genzel+ (2014), outflow properties from SINS/zC-SINF (z=2-3).
- leung17()
Load observational data points from Leung+ (2017), outflow properties from MOSDEF (z~2).
- rupke05()
Load observational data points from Rupke+ (2005c), outflow properties of LIRGS (z<0.5).
- rupke17()
Load observational data points from Rupke+ (2017), outflow properties related to BHs (z<0.3).
- rupke19()
Load observational data points from Rupke+ (2019), Makani with KCWI.
- spence18(vel05=False)
Load observational data points from Spence+ (2018), outflow properties (z<0.2).
- toba17()
Load observational data points from Toba+ (2017), BH outflow properties.
- fluetsch18(ionized=False)
Load observational data points from Fluetsch+ (2018) Tables 1+2, AGN-driven outflow properties (partial literature compilation).
- obuljen2019()
Load observational fits to M_HI/M_halo relation from Obuljen+ (2019). Fig 8 / Eqn 1.
- decia2018()
Load observational data (elemental dust depletions) from De Cia+ (2018).
- zhu13mgii()
Load MgII absorption data from Zhu & Menard (2013).
- pratt09()
Load observational data points from Pratt+ (2009), REXCESS X-ray cluster survey.
- vikhlinin09()
Load observational data points from Vikhlinin+ (2009), Chandra/ROSAT X-ray cluster survey.
- bulbul19()
Load observational data points from Bulbul+ (2019), XMM X-ray obs of SPT-SZ selected clusters.
- mantz16()
Load observational data points from Mantz+ (2016) “Weighing the Giants” X-ray clusters.
- nagarajan19()
Load observational data points from Nagarajan+ (2019) Y500 vs M500.
- chiu18()
Load observational data points from Chiu+ (2018) SPT cluster properties.
- curti23()
Load observational data points from Curti+2023 JWST JADES galaxy properties.
- nakajima23()
Load observational data points from Nakajima+23 JWST CEERS galaxy properties.
- loadSDSSData(loadFields=None, redshiftBounds=[0.0, 0.1], petro=False)
Load some CSV->HDF5 files dumped from the SkyServer.
- loadSDSSFits(redshiftBounds=[0.0, 0.1])
Load the fit results of the SDSS fiber spectrum MCMC chains.
- sfrTxt(sP)
Load and parse sfr.txt.
temet.load.groupcat module
Loading I/O - fof/subhalo group cataloges.
- catalog_field(arg=None, **kwargs)
Decorator factory to save custom catalog field deriving functions into the registry.
- gcPath(basePath, snapNum, chunkNum=0, noLocal=False, checkExists=False)
Find and return absolute path to a group catalog HDF5 file. Can be used to redefine illustris_python version (il.groupcat.gcPath = load.groupcat.gcPath).
- groupCat(sP, sub=None, halo=None, group=None, fieldsSubhalos=None, fieldsHalos=None, sq=True)
Load HDF5 fof+subfind group catalog for a given snapshot, one or more fields, possibly custom.
fieldsSubhalos : read only a subset of Subgroup fields from the catalog fieldsHalos : read only a subset of Group fields from the catalog sub : shorthand for fieldsSubhalos halo,group : shorthands for fieldsHalos sq : squeeze single field return into a numpy array instead of within a dict
- groupCat_subhalos(sP, fields)
Wrapper for above.
- groupCat_halos(sP, fields)
Wrapper for above.
- groupCatSingle(sP, haloID=None, subhaloID=None)
Return complete group catalog information for one halo or subhalo.
- groupCatSingle_subhalo(sP, obj_id)
Wrapper for above.
- groupCatSingle_halo(sP, obj_id)
Wrapper for above.
- groupCatHeader(sP, fileName=None)
Load complete group catalog header.
- groupCatHasField(sP, objType, field)
True or False, does group catalog for objType=[‘Group’,’Subhalo’] have field?
- groupCatFields(sP, objType)
Return list of all fields in the group catalog for either halos or subhalos.
- groupCatNumChunks(basePath, snapNum)
Find number of file chunks in a group catalog.
- groupCatOffsetList(sP)
Make the offset table for the group catalog files, to be able to quickly determine within which file a given group/subgroup number exists.
- groupCatOffsetListIntoSnap(sP)
Make the offset table (by type) for every group/subgroup, such that the global location of the particle/cell members of any group/subgroup can be quickly located.
temet.load.groupcat_fields_aux module
Definitions of custom catalog fields, based on auxCat/ and postprocessing/ datasets.
- isolated_flag_(sim, partType, field, args)
Isolated flag (1 if ‘isolated’, according to criterion, 0 if not, -1 if unprocessed).
- d5_mstar_gthalf(sim, partType, field, args)
Environment: distance to 5th nearest neighbor (subhalo).
- delta5_mstar_gthalf(sim, partType, field, args)
Environment: overdensity based on 5th nearest neighbor (subhalo).
- num_ngb_gthalf(sim, partType, field, args)
Environment: counts of nearby neighbor subhalos.
- color_(sim, partType, field, args)
Photometric/broadband colors (e.g. ‘color_C_gr’, ‘color_A_ur’).
- mag_(sim, partType, field, args)
Photometric/broadband magnitudes (e.g. ‘mag_C_g’, ‘mag_A_r’).
- mass_ovi(sim, partType, field, args)
Total gas mass in sub-species: OVI.
- mass_ovii(sim, partType, field, args)
Total gas mass in sub-species: OVII.
- mass_oviii(sim, partType, field, args)
Total gas mass in sub-species: OVIII.
- mass_o(sim, partType, field, args)
Total gas mass in sub-species: O.
- mass_z(sim, partType, field, args)
Total gas mass in sub-species: Z.
- mass_halogas(sim, partType, field, args)
Total halo (0.15 < r/rvir < 1.0) gas mass.
- mass_halogasfof(sim, partType, field, args)
Total halo (0.15 < r/rvir < 1.0) gas mass. FoF-scope, centrals only.
- mass_halogas_cold(sim, partType, field, args)
Total halo (0.15 < r/rvir < 1.0) gas mass. Only cold (log T < 4.5 K), star-forming gas at eEOS temp.
- mass_halogas_sfcold(sim, partType, field, args)
Total halo (0.15 < r/rvir < 1.0) gas mass. Only cold (log T < 4.5 K), star-forming gas at cold temp.
- mass_halogasfof_sfcold(sim, partType, field, args)
Total halo (0.15 < r/rvir < 1.0) gas mass. FoF-scope, centrals only. Only cold (log T < 4.5 K), star-forming gas at cold temp.
- mass_smbh(sim, partType, field, args)
Largest SMBH mass in each subhalo. Avoids summing multiple SMBH masses, if more than one present.
- smbh_mdot(sim, partType, field, args)
Largest SMBH Mdot in each subhalo. Avoids summing multiple SMBHs, if more than one present.
- smbh_lum(sim, partType, field, args)
Bolometric luminosity of largest SMBH in each subhalo. Avoids summing multiple SMBHs, if more than one present.
- sfr_10myr(sim, partType, field, args)
Star formation rate (full subhalo) averaged over the past 10 Myr.
- szy_r500c_3d(sim, partType, field, args)
Sunyaev Zeldovich y-parameter within r500c (3d).
- szy_r500c_2d(sim, partType, field, args)
Sunyaev Zeldovich y-parameter within r500c (2d).
- xraylum_r500c_2d(sim, partType, field, args)
X-ray luminosity (0.5-2.0 keV) within r500c (2d).
- xray_peak_offset_2d(sim, partType, field, args)
Spatial offset between X-ray (0.5-2.0 keV) emission peak and galaxy (SubhaloPos). In 2D projection.
- lum_civ1551_outercgm(sim, partType, field, args)
CIV 1551 luminosity in the outer CGM.
- lum_civ1551_innercgm(sim, partType, field, args)
CIV 1551 luminosity in the inner CGM.
- lum_heii1640_outercgm(sim, partType, field, args)
HeII 1640 luminosity in the outer CGM.
- lum_heii1640_innercgm(sim, partType, field, args)
HeII 1640 luminosity in the inner CGM.
- z_stars_masswt(sim, partType, field, args)
Stellar metallicity (no radial restriction), mass weighted.
- z_gas_sfrwt(sim, partType, field, args)
Gas-phase metallicity (no radial restriction), mass weighted.
- veldisp(sim, partType, field, args)
Stellar velocity dispersion (3D), within the stellar half mass radius.
- veldisp1d(sim, partType, field, args)
Stellar velocity dispersion (1D, from 3D), within the stellar half mass radius.
- veldisp1d_05re(sim, partType, field, args)
Stellar velocity dispersion (1D, from 3D), within 0.5 times the stellar half mass radius.
- veldisp1d_10pkpc(sim, partType, field, args)
Stellar velocity dispersion (1D, in z-direction), within 10pkpc.
- veldisp1d_4pkpc2d(sim, partType, field, args)
Stellar velocity dispersion (1D, in z-direction), within 4pkpc (~SDSS fiber low-z) in 2D.
- veldisp_gas_01r500c_xray(sim, partType, field, args)
Gas velocity dispersion (1D, in z-direction), weighted by 0.2-2 keV X-ray luminosity, within 0.1r500c.
- rshock(sim, partType, field, args)
Virial shock radius, fiducial model choice.
- rshock_rvir(sim, partType, field, args)
Virial shock radius, fiducial model choice. Normalized.
- rshock_(sim, partType, field, args)
Virial shock radius. [pkpc or rvir].
- zform(sim, partType, field, args)
Formation redshift, at which the subhalo had half of its current mass.
- massfrac_exsitu(sim, partType, field, args)
Postprocessing/StellarAssembly: ex-situ or in-situ stellar mass fraction. Within the stellar half mass radius, unless ‘2’ in field name, in which case within 2*rhalf.
- num_mergers_(sim, partType, field, args)
Postprocessing/MergerHistory: number of major/minor mergers, within different time ranges.
- mergers_mean_fgas(sim, partType, field, args)
Postprocessing/MergerHistory: mean property (‘cold’ i.e. star-forming gas fraction) of mergers. Weighted by the maximum stellar mass of the secondary progenitors.
- mergers_mean_z(sim, partType, field, args)
Postprocessing/MergerHistory: mean property (redshift) of all mergers this subhalo gas undergone. Weighted by the maximum stellar mass of the secondary progenitors.
- mergers_mean_mu(sim, partType, field, args)
Postprocessing/MergerHistory: mean property (stellar mass ratio) of mergers. Weighted by the maximum stellar mass of the secondary progenitors.
- lgal_(sim, partType, field, args)
Postprocessing/L-Galaxies: (H15) run on dark matter only analog, automatically cross-matched to the TNG run such that return has the same shape as sP.numSubhalos (unmatched TNG subs = NaN). Examples: LGal_StellarMass, LGal_HotGasMass, LGal_Type, LGal_XrayLum, … Note: if ‘_orig’ appended, e.g. LGal_StellarMass_orig, then no matching, full LGal return.
- coolcore_flag(sim, partType, field, args)
Postprocessing/CCcriteria: flag (0=SCC, 1=WCC, 2=NCC) based on Lehle+24 central cooling time fiducial definition.
- coolcore_tcool(sim, partType, field, args)
Postprocessing/CCcriteria: Lehle+23 central cooling time.
- coolcore_entropy(sim, partType, field, args)
Postprocessing/CCcriteria: Lehle+23 central cooling time.
temet.load.groupcat_fields_custom module
Definitions of custom catalog fields.
- subhalo_id(sim, partType, field, args)
Subhalo ID/index.
- central_flag(sim, partType, field, args)
Subhalo central flag (1 if central, 0 if not).
- contam_frac(sim, partType, field, args)
Subhalo contamination fraction (low-res DM to total DM particle count).
- mhalo_lim(sim, pt, f)
Limits for halo masses.
- mhalo_200(sim, partType, field, args)
Parent halo total mass (\(\rm{M_{200,crit}}\)). Only defined for centrals: satellites are assigned a value of nan (excluded by default), unless ‘_parent’ is specified in the field name, in which case satellites are given the same host halo mass as their central.
- mhalo_500(sim, partType, field, args)
Parent halo total mass (\(\rm{M_{500,crit}}\)). Only defined for centrals: satellites are assigned a value of nan (excluded by default).
- mhalo_vir(sim, partType, field, args)
Parent halo total mass (\(\rm{M_{vir}}\)). Defined by \(\rm{M_{\Delta}}\) where \(\Delta\) is the overdensity based on spherical tophat collapse. Only defined for centrals: satellites are assigned a value of nan (excluded by default).
- rhalo_200(sim, partType, field, args)
Parent halo virial radius (\(\rm{R_{200,crit}}\)). Only defined for centrals: satellites are assigned a value of nan (excluded by default).
- rhalo_500(sim, partType, field, args)
Parent halo \(\rm{R_{500,crit}}\) radius. Only defined for centrals: satellites are assigned a value of nan (excluded by default).
- vhalo(sim, partType, field, args)
Parent halo virial velocity (\(\rm{V_{200}}\)). Only defined for centrals: satellites are assigned a value of nan (excluded by default).
- halo_numsubs(sim, partType, field, args)
Total number of subhalos in parent dark matter halo. A value of one implies only a central subhalo exists, while a value of two indicates a central and one satellite, and so on. Only defined for centrals: satellites are assigned a value of nan (excluded by default).
- virtemp(sim, partType, fields, args)
Virial temperature of the parent halo (satellites have NaN).
- distance(sim, partType, field, args)
Radial distance of satellites to center of parent halo (centrals have zero).
- mhalo_subfind(sim, partType, field, args)
Parent dark matter (sub)halo total mass, defined by the gravitationally bound mass as determined by Subfind.
- mstar1(sim, partType, field, args)
Galaxy stellar mass, measured within the stellar half mass radius.
- mstar2(sim, partType, field, args)
Galaxy stellar mass, measured within twice the stellar half mass radius.
- mstar_tot(sim, partType, field, args)
Galaxy stellar mass, total subhalo/subfind value.
- mgas1(sim, partType, field, args)
Galaxy gas mass (all phases), measured within the stellar half mass radius.
- mgas2(sim, partType, field, args)
Galaxy gas mass (all phases), measured within twice the stellar half mass radius.
- mstar_100pkpc(sim, partType, field, args)
Galaxy stellar mass, measured within a fixed 3D aperture of 100 physical kpc.
- mstar_30pkpc(sim, partType, field, args)
Galaxy stellar mass, measured within a fixed 3D aperture of 30 physical kpc.
- mstar_5pkpc(sim, partType, field, args)
Galaxy stellar mass, measured within a fixed 3D aperture of 5 physical kpc.
- mgas_5pkpc(sim, partType, field, args)
Galaxy gas mass, measured within a fixed 3D aperture of 5 physical kpc.
- mdm_5pkpc(sim, partType, field, args)
Galaxy dark matter mass, measured within a fixed 3D aperture of 5 physical kpc.
- mtot_5pkpc(sim, partType, field, args)
Galaxy total mass (gas + stars + DM + BHs), measured within a fixed 3D aperture of 5 physical kpc.
- mstar_mtot_ratio_5pkpc(sim, partType, field, args)
Ratio of galaxy stellar mass, to total mass, both measured within a 3D aperture of 5 physical kpc.
- mstar2_mhalo200_ratio(sim, partType, field, args)
Galaxy stellar mass to halo mass ratio, the former defined as within twice the stellar half mass radius, the latter as M_200_Crit.
- mstar30pkpc_mhalo200_ratio(sim, partType, field, args)
Galaxy stellar mass to halo mass ratio, the former measured within a fixed 3D aperture of 30 physical kpc, the latter taken as M_200_Crit.
- mstar_r500(sim, partType, field, args)
Subhalo stellar mass (i.e. central+ICL, but no sats), measured within \(\rm{R_{500c}}\).
- mgas_r500(sim, partType, field, args)
Subhalo gas mass (all phases), measured within \(\rm{R_{500c}}\).
- mgas_halo(sim, partType, field, args)
Halo-scale gas mass, measured within each FoF.
- mhi(sim, partType, field, args)
Galaxy atomic HI gas mass (BR06 molecular H2 model), measured within the entire subhalo (all gravitationally bound gas).
- mhi2(sim, partType, field, args)
Galaxy atomic HI gas mass (BR06 molecular H2 model), measured within twice the stellar half mass radius.
- mhi_30pkpc(sim, partType, field, args)
Galaxy atomic HI gas mass (BR06 molecular H2 model), measured within a fixed 3D aperture of 30 physical kpc.
- mhi_halo(sim, partType, field, args)
Halo-scale atomic HI gas mass (BR06 molecular H2 model), measured within each FoF.
- sfr(sim, partType, field, args)
Galaxy star formation rate (instantaneous, within 30pkpc aperture).
- sfr2(sim, partType, field, args)
Galaxy star formation rate (instantaneous, within twice the stellar half mass radius).
- ssfr(sim, partType, field, args)
Galaxy specific star formation rate [1/yr] (sSFR, instantaneous, both SFR and M* within 2rhalfstars).
- ssfr_30pkpc(sim, partType, field, args)
Galaxy specific star formation rate [1/yr] (sSFR, instantaneous, SFR within 2rhalfstars, M* within 30kpc).
- ssfr_gyr(sim, partType, field, args)
Galaxy specific star formation rate [1/Gyr] (sSFR, instantaneous, both SFR and M* within 2rhalfstars).
- ssfr_30pkpc_gyr(sim, partType, field, args)
Galaxy specific star formation rate [1/Gyr] (sSFR, instantaneous, SFR within 2rhalfstars, M* within 30kpc).
- vcirc(sim, partType, field, args)
Maximum value of the spherically-averaged 3D circular velocity curve (i.e. galaxy circular velocity).
- velmag(sim, partType, field, args)
The magnitude of the current velocity of the subhalo through the box, in the simulation reference frame.
- spinmag(sim, partType, field, args)
The magnitude of the subhalo spin vector, computed as the mass weighted sum of all subhalo particles/cells.
- size_stars(sim, partType, field, args)
Stellar half mass radius.
- m_v(sim, partType, field, args)
V-band magnitude (StellarPhotometrics from snapshot). No dust.
- color_uv(sim, partType, field, args)
Integrated photometric/broadband galaxy colors, from snapshot. No dust.
temet.load.snap_fields module
Metadata for (original) snapshot fields.
temet.load.snap_fields_custom module
Definitions of custom snapshot fields.
- mass_msun(sim, partType, field, args)
Particle/cell mass in solar masses.
- mass(sim, partType, field, args)
Particle/cell mass in code units, supporting constant-mass DM particles.
- velmag(sim, partType, field, args)
Magnitude of the gas velocity 3-vector.
- subfind_vol(sim, partType, field, args)
Particle ‘volume’ based on SubfindHsml of the N=64 nearest DM particles.
- gravpot(sim, partType, field, args)
Gravitational potential (from stored value in snapshot).
- vesc(sim, partType, field, args)
Escape velocity, based on the stored gravitational Potential.
- dt(sim, partType, field, args)
Particle/cell total actual/effective timestep, from stored snapshot value.
- temp(sim, partType, field, args)
Gas temperature.
- temp_old(sim, partType, field, args)
Gas temperature (uncorrected values for TNG runs).
- temp_sfcold(sim, partType, field, args)
Gas temperature, where star-forming gas is set to the sub-grid (constant) cold-phase temperature, instead of eEOS ‘effective’ temperature.
- temp_sfhot(sim, partType, field, args)
Gas temperature, where star-forming gas is set to the sub-grid (constant) hot-phase temperature, instead of the eEOS ‘effective’ temperature. Use with caution.
- twophase_coldfrac(sim, partType, field, args)
Cold-phase mass (or density) fraction, for the SH03 two-phase ISM model. Note: is exactly 0.0 for non-starforming (SFR==0) gas cells, and typically of order ~0.9 for SFR>0 cells.
- ne(sim, partType, field, args)
Electron number density, derived from (fractional) ElectronAbundance, handling runs without cooling.
- ne_twophase(sim, partType, field, args)
Electron number density, where for star-forming gas cells we override the naive snapshot value, which is unphysically high, with a value based on the SH03 hot-phase mass only.
- nh(sim, partType, field, args)
Hydrogen number density, derived from total Density.
- xhi(sim, partType, field, args)
Neutral hydrogen fraction, relative to the total gas mass. No H2 model applied.
- numdens(sim, partType, field, args)
Total gas number density, derived from total Density.
- dens_critratio(sim, partType, field, args)
Mass density to critical density.
- dens_critb(sim, partType, field, args)
Mass density to critical baryon density.
- entropy(sim, partType, field, args)
Gas entropy, derived from (u,dens).
- bmag(sim, partType, field, args)
Magnitude of the gas magnetic field 3-vector in Gauss.
- bmag_ug(sim, partType, field, args)
Magnitude of the gas magnetic field 3-vector in micro-Gauss.
- b2(sim, partType, field, args)
Magnitude squared of the gas magnetic field 3-vector (in code units).
- va(sim, partType, field, args)
Magnetic Alfven-wave velocity.
- cs(sim, partType, field, args)
Gas sound speed (hydro only version).
- volume(sim, partType, field, args)
Gas cell volume.
- volume_cm3(sim, partType, field, args)
Gas cell volume [cm^3].
- volume_kpc3(sim, partType, field, args)
Gas cell volume [kpc^3].
- cellsize(sim, partType, field, args)
Gas cell ‘size’ i.e. ‘cell radius’, defined as the radius of the volume equivalent sphere.
- cellsize_kpc(sim, partType, field, args)
Gas cell size [kpc].
- cellsize_ckpc(sim, partType, field, args)
Gas cell size [comoving kpc].
- hsml(sim, partType, field, args)
Smoothing length i.e. characteristic size, possibly for visualization purposes.
- f_b(sim, partType, field, args)
Baryon fraction, defined as (gas+stars)/(gas+stars+DM), all estimated locally, then normalized to the cosmic baryon fraction.
- pressure(sim, partType, field, args)
Gas thermal pressure.
- pressure_mag(sim, partType, field, args)
Gas magnetic pressure.
- pressure_ratio(sim, partType, field, args)
Ratio of gas magnetic to thermal pressure (\(\beta^{-1}\)).
- beta(sim, partType, field, args)
Ratio of gas thermal to magnetic pressure (plasma \(\beta\)).
- pressure_tot(sim, partType, field, args)
Total (thermal+magnetic) gas pressure.
- u_kinetic(sim, partType, field, args)
Kinetic, as opposed to thermal, energy density.
- uratio_mag_ke(sim, partType, field, args)
Ratio of gas magnetic to kinetic energy density.
- tcool(sim, partType, field, args)
Gas cooling time (computed from saved GFM_CoolingRate), is np.nan if cell has net heating.
- coolrate(sim, partType, field, args)
Gas specific cooling rate (computed from saved GFM_CoolingRate), is np.nan if cell has net heating.
- heatrate(sim, partType, field, args)
Gas specific heating rate (computed from saved GFM_CoolingRate), is np.nan if cell has net cooling.
- netcoolrate(sim, partType, field, args)
Gas net specific cooling rate (computed from saved GFM_CoolingRate).
- coolrate_powell(sim, partType, field, args)
Gas ‘cooling rate’ of Powell source term, specific (computed from saved DivB, GFM_CoolingRate).
- dt_hydro(sim, partType, field, args)
Gas cell hydrodynamical (Courant) timestep.
- tdep(sim, partType, field, args)
Gas cell depletion time: cells with zero sfr given nan.
- tau0_(sim, partType, field, args)
Optical depth to a certain line, at line center.
- metaldens(sim, partType, field, args)
Total metal mass density.
- metaldens_(sim, partType, field, args)
Metal mass density for a given species, e.g. ‘metaldens_O’.
- sz_y(sim, partType, field, args)
(Thermal) Sunyaev-Zeldovich y-parameter (per gas cell).
- ksz_y(sim, partType, field, args)
(Kinetic) Sunyaev-Zeldovich y-parameter (per gas cell).
- frm_x(sim, partType, field, args)
Faraday rotation measure -integrand- (ne*B_parallel) in [rad m^-2]. Must be integrated through all cells along a line of sight, as sum(integrand*dl) where dl is the pathlength through each cell in pc. Requires the B-field component ‘along the line-of-sight’ which must be axis-aligned and specified.
- p_sync(sim, partType, field, args)
Radio synchrotron power (simple model).
- halpha_lum(sim, partType, field, args)
H-alpha line luminosity, simple model: linear conversion from SFR.
- s850um_flux(sim, partType, field, args)
850 micron (sub-mm) flux (simple model).
- xray_lum(sim, partType, field, args)
Bolometric x-ray luminosity, simple bremsstrahlung (free-free) emission model only.
- xray_lum_apec(sim, partType, field, args)
X-ray luminosity/flux/counts (the latter for a given instrumental configuration). If a decimal point ‘.’ in field, using my APEC-based tables, otherwise using XSPEC-based tables (from Nhut).
- n_hi(sim, partType, field, args)
Experimental: assign a N_HI (column density) to every cell based on a (xy) grid projection.
- hi_mass(sim, partType, field, args)
Hydrogen model: atomic H (neutral subtracting molecular) mass calculation.
- h2_mass(sim, partType, field, args)
Hydrogen model: molecular H (neutral subtracting atomic) mass calculation.
- mass_h_popping(sim, partType, field, args)
Pre-computed atomic (HI) and molecular (H2) gas cell masses (from Popping+2019).
- numdens_h_popping(sim, partType, field, args)
Pre-computed atomic (HI) and molecular (H2) gas cell number densities (from Popping+2019).
- mass_h_diemer(sim, partType, field, args)
Pre-computed atomic (HI) and molecular (H2) gas cell masses (from Diemer+2019).
- numdens_h_diemer(sim, partType, field, args)
Pre-computed atomic (HI) and molecular (H2) gas cell number densities (from Diemer+2019).
- cloudy_mass_(sim, partType, field, args)
CLOUDY-based photoionization calculation: total ionic mass (e.g. ‘O VI mass’, ‘Mg II mass’), for any known ion name and excited level number. Note: uses spaces in field name.
- cloudy_frac_(sim, partType, field, args)
CLOUDY-based photoionization calculation: ionic mass fraction (e.g. ‘O VI frac’, ‘Mg II frac’), for a given ion name and excited level number. Note: uses spaces in field name.
- cloudy_numdens_(sim, partType, field, args)
CLOUDY-based photoionization calculation: ionic number density (e.g. ‘O VI numdens’, ‘Mg II numdens’), for a given ion name and excited level number. Note: uses spaces in field name.
- cloudy_flux_(sim, partType, field, args)
CLOUDY-based photoionization calculation: ion line emission flux (e.g. ‘H-alpha flux’, ‘O–6-1037.62A’), for a given line name. Note: uses spaces in field name.
- cloudy_lum_(sim, partType, field, args)
CLOUDY-based photoionization calculation: ion line luminosity (e.g. ‘MgII lum’, ‘CVI lum’), for a given line name. Note: uses spaces in field name.
- ionmassratio_(sim, partType, field, args)
Ratio between two ionic masses, e.g. ‘ionmassratio_O6_O8’.
- wind_dedt(sim, partType, field, args)
TNG/SH03 wind model: feedback energy injection rate.
- wind_dpdt(sim, partType, field, args)
TNG/SH03 wind model: feedback momentum injection rate.
- wind_vel(sim, partType, field, args)
TNG/SH03 wind model: launch velocity.
- wind_eta(sim, partType, field, args)
TNG/SH03 wind model: mass loading factor (at launch).
- z_solar(sim, partType, field, args)
Metallicity in solar units.
- sn_iaii_ratio_fe(sim, partType, field, args)
GFM_MetalsTagged: ratio of iron mass [linear] produced in SNIa versus SNII.
- sn_iaii_ratio_metals(sim, partType, field, args)
GFM_MetalsTagged: ratio of total metal mass [linear] produced in SNIa versus SNII.
- sn_ia_agb_ratio_metals(sim, partType, field, args)
GFM_MetalsTagged: ratio of total metal mass [linear] produced in SNIa versus AGB.
- numratio_(sim, partType, field, args)
Metal abundance number density ratio e.g. ‘numratio_Si_H’, relative to solar, e.g. [Si/H] = log(n_Si/n_H)_cell - log(n_Si/n_H)_solar
- massratio_(sim, partType, field, args)
Metal abundance mass ratio e.g. ‘massratio_Si_H’, absolute (not relative to solar).
- metalmass(sim, partType, field, args)
Total metal mass (convert GFM_Metals from fraction to mass).
- metalmass_(sim, partType, field, args)
Metal mass for a given species (convert GFM_Metals from fraction to mass), e.g. ‘metalmass_O’ or ‘metalmass_Mg’ or ‘metalmass_Fe_msun’.
- star_age(sim, partType, field, args)
Age of stellar population (conversion of GFM_StellarFormationTime).
- z_form(sim, partType, field, args)
Formation redshift of stellar population (conversion of GFM_StellarFormationTime).
- bh_lbol(sim, partType, field, args)
Black hole bolometric luminosity (optionally with obscuration).
- bh_lbol_basic(sim, partType, field, args)
Black hole bolometric luminosity (simple model, optionally with obscuration).
- bh_lumedd(sim, partType, field, args)
Black hole Eddington luminosity.
- bh_eddratio(sim, partType, field, args)
Black hole bolometric luminosity (optionally with obscuration).
- bh_mode(sim, partType, field, args)
Black hole accretion/feedback mode (0=low/kinetic, 1=high/quasar).
- bh_dedt(sim, partType, field, args)
Black hole feedback energy injection rate.
- pos_rel(sim, partType, field, args)
3D (xyz) position, relative to the halo/subhalo center.
- vel_rel(sim, partType, field, args)
3D (xyz) velocity, relative to the halo/subhalo motion.
- vel_rel_mag(sim, partType, field, args)
Magnitude of velocity, relative to the halo/subhalo motion.
- rad(sim, partType, field, args)
3D radial distance from (parent) halo center.
- rad_label(sim, pt, f)
- rad_units(sim, pt, f)
- rad_kpc(sim, partType, field, args)
3D radial distance from (parent) halo center in [kpc].
- dist_2dz(sim, partType, field, args)
2D distance (i.e. impact parameter), projecting along z-hat, from (parent) halo center.
- vrad(sim, partType, field, args)
Radial velocity, relative to the central subhalo and its motion, including hubble correction. Optionally normalized by the halo virial velocity. Convention: negative = in, positive = out.
- angmom(sim, partType, field, args)
Angular momentum, relative to the central subhalo and its motion, including hubble correction, either the 3-vector or the specific magnitude (if field contains ‘_mag’).
- menc(sim, partType, field, args)
Enclosed mass, i.e. total halo mass within the radial distance of each particle/cell.
- menc_msun(sim, partType, field, args)
Enclosed mass, in solar masses.
- tff(sim, partType, field, args)
Gravitational free-fall time.
- tcool_tff(sim, partType, field, args)
Ratio of gas cooling time to gravitational free-fall time.
- delta_rho(sim, partType, field, args)
Ratio of density to local mean density, delta_rho/<rho>, based on a spherically symmetric, halo-centric mass density profile. This is a special case of the below.
- delta_(sim, partType, field, args)
Ratio of any particle/cell property to its local average, based on a spherically symmetric, halo-centric radial profile.
- subhalo_id(sim, partType, field, args)
Parent subhalo ID, per particle/cell.
- halo_id(sim, partType, field, args)
Parent halo ID, per particle/cell.
- parent_subhalo_(sim, partType, field, args)
Any property of the parent subhalo, per particle/cell.
- parent_halo_(sim, partType, field, args)
Any property of the parent halo, per particle/cell.
temet.load.snapshot module
Loading I/O - snapshots of AREPO cosmological simulations.
- snap_field(arg=None, **kwargs)
Decorator factory to save custom snapshot field deriving functions into the registry.
- subboxVals(subbox)
Return sbNum (integer) and sbStr1 and sbStr2 for use in locating subbox files.
- snapPath(basePath, snapNum, chunkNum=0, subbox=None, checkExists=False)
Find and return absolute path to a snapshot HDF5 file. Can be used to redefine illustris_python version (il.snapshot.snapPath = load.snapshot.snapPath).
- snapNumChunks(basePath, snapNum, subbox=None)
Find number of file chunks in a snapshot, by checking for existence of files inside directory.
- snapshotHeader(sP, fileName=None)
Load complete snapshot header.
- snapHasField(sP, partType, field)
True or False, does snapshot data for partType have field?
- snapFields(sP, partType)
Return list of all fields for this particle type.
- snapConfigVars(sP)
Load Config.sh flags and values as stored in the /Config/ group of modern snapshots.
- snapParameterVars(sP)
Load param.txt flags and values as stored in the /Parameters/ group of modern snapshots.
- snapOffsetList(sP)
Make the offset table (by type) for the snapshot files, to be able to quickly determine within which file(s) a given offset+length will exist.
- haloOrSubhaloSubset(sP, haloID=None, subhaloID=None)
Return the offset and length as a subset dict{} for a given haloID/subhaloID, as needed by il.snapshot.loadSubset().
- snapshotSubset(sP, partType, fields, inds=None, indRange=None, haloID=None, subhaloID=None, mdi=None, sq=True, haloSubset=False, float32=False)
For a given snapshot load one or more field(s) for one particle type. The four arguments
inds
,indRange
,haloID
, andsubhaloID
are all optional, but at most one can be specified.- Parameters:
sP (
simParams
) – simulation instance.partType – e.g. [0,1,2,4] or (‘gas’,’dm’,’tracer’,’stars’).
fields – e.g. [‘ParticleIDs’,’Coordinates’,’temp’,…].
inds (ndarray[int]) – known indices requested, optimize the load.
indRange (list[int][2]) – same, but specify only min and max indices (–inclusive–!).
haloID (int) – if input, load particles only of the specified fof halo.
subhaloID (int) – if input, load particles only of the specified subalo.
mdi (int or None) – multi-dimensional index slice load (only used in recursive calls, don’t input directly)
sq (bool) – squeeze single field return into a numpy array instead of within a dict.
haloSubset (bool) – return particle subset of only those in all FoF halos (no outer fuzz).
float32 (bool) – load any float64 datatype datasets directly as float32 (optimize for memory).
- Returns:
ndarray or dict
- snapshotSubsetParallel(sP, partType, fields, inds=None, indRange=None, haloID=None, subhaloID=None, sq=True, haloSubset=False, float32=False, nThreads=8)
Identical to
snapshotSubset()
except split filesystem load over a number of concurrent python+h5py reader processes and gather the result.
- snapshotSubsetLoadIndicesChunked(sP, partType, field, inds, sq=True, verbose=False)
If we only want to load a set of inds, and this is a small fraction of the total snapshot, then we do not ever need to do a global load or allocation, thus reducing the peak memory usage during load by a factor of nChunks or sP.numPart[partType]/inds.size, whichever is smaller. Note: currently only for a single field, could be generalized to multiple fields. Note: this effectively captures the multiblock I/O strategy of the previous codebase as well, with only a small efficiency loss since we do not exactly compute bounding local indRanges for contiguous index subsets, but rather process nChunks discretely.
Module contents
Handle loading of all known data types from stored files. Covers direct simulation outputs (snapshots, group catalogs) as well as post-processing data catalogs (auxCats), as well as observational data.