temet.projects

Analysis and plotting which is project specific.

For the most part, each module herein contains the code to fully replicate one published paper. In this case, the single paperPlots() at the bottom will produce the full set of figures.

temet.projects.color

TNG flagship paper: galaxy colors, color bimodality.

https://arxiv.org/abs/1707.03395

galaxyColorPDF(sPs, pdf, bands=('u', 'i'), simColorsModels=('p07c_cf00dust_res_conv_ns1_rad30pkpc',), simRedshift=0.0, splitCenSat=False, cenOnly=False, stellarMassBins=None, addPetro=False, minDMFrac=None)

PDF of galaxy colors (by default: (u-i)), with no dust corrections (Vog 14b Fig 13).

calcMstarColor2dKDE(bands, gal_Mstar, gal_color, Mstar_range, mag_range, sP=None, simColorsModel=None, kCorrected=True)

Calculate and cache (slow) 2D KDE calculation of (Mstar,color) plane for sim or data.

Parameters:
  • bands (list[str,2]) – the two band names that define the color.

  • gal_Mstar (np.ndarray) – stellar masses of galaxies.

  • gal_color (np.ndarray) – colors of galaxies.

  • Mstar_range (list[float,2]) – min/max stellar mass range to consider.

  • mag_range (list[float,2]) – min/max color range to consider.

  • sP (simParams) – simulation instance. If None, then do observational points (SDSS z < 0.1).

  • simColorsModel (str or None) – required if sP is specified, the simulation color model to use.

  • kCorrected (bool) – whether the colors have been k-corrected. if False, then tag filename (assume this is handled prior in calcSDSSColors)

galaxyColor2DPDFs(sPs, pdf, simColorsModel='p07c_cf00dust_res_conv_ns1_rad30pkpc', splitCenSat=False, simRedshift=0.0)

2D contours of galaxy colors/Mstar plane, multiple bands.

viewingAngleVariation()

Variation of (one or two) galaxy colors as a function of viewing angle (Nside > 1). 1D Histogram.

colorFluxArrows2DEvo(sP, pdf, bands, toRedshift, cenSatSelect='cen', minCount=None, simColorsModel='p07c_cf00dust_res_conv_ns1_rad30pkpc', arrowMethod='arrow')

Plot ‘flux’ arrows in the (color,Mstar) plane showing the median evolution of all galaxies in each bin.

colorMassPlaneFitSummary(sPs, bands=('g', 'r'), simColorsModel='p07c_cf00dust_res_conv_ns1_rad30pkpc')

Plot a double panel of the red/blue mu and sigma fits vs stellar mass, simulation(s) vs SDSS.

colorMassPlaneFits(sP, bands=('g', 'r'), css='all', simColorsModel='p07c_cf00dust_res_conv_ns1_rad30pkpc')

Plot diagnostics of double gaussian fits in the color-mass plane with different methods.

colorTransitionTimescale(sPs, bands=('g', 'r'), simColorsModel='p07c_cf00dust_res_conv_ns1_rad30pkpc')

Plot the distribution of ‘color transition’ timescales (e.g. Delta_t_green).

colorTracksSchematic(sP, bands, simColorsModel='p07c_cf00dust_res_conv_ns1_rad30pkpc', pageNum=None)

Schematic diagram: smoothed contours in the color-mass plane and some individual galaxy evolution tracks.

paperPlots()

Construct all the final plots for the paper.

temet.projects.color_analysis

TNG galaxy color paper: analysis.

https://arxiv.org/abs/1707.03395

calcColorEvoTracks(sP, bands=('g', 'r'), simColorsModel='p07c_cf00dust_res_conv_ns1_rad30pkpc')

Calculate the evolution of galaxy colors in time using their MPBs.

Using already computed StellarPhot auxCat’s at several snapshots, load the MPBs and re-organize the band magnitudes into tracks in time for each galaxy. Do for one band combination, saving only the color, while keeping all viewing angles.

characterizeColorMassPlane(sP, bands=('g', 'r'), cenSatSelect='all', simColorsModel='p07c_cf00dust_res_conv_ns1_rad30pkpc', nBurnIn=10000, remakeFlag=True, newErrors=False)

Characterize the red and blue populations, e.g. their location, extent, and relative numbers.

colorTransitionTimes(sP, f_red, f_blue, maxRedshift, nBurnIn, bands=('g', 'r'), simColorsModel='p07c_cf00dust_res_conv_ns1_rad30pkpc')

Measure the various color boundary crossing times for all galaxies.

temet.projects.lrg

LRG small-scale cold clouds CGM paper (TNG50).

https://arxiv.org/abs/2005.09654

radialResolutionProfiles(sPs, saveName, redshift=0.5, cenSatSelect='cen', radRelToVirRad=False, haloMassBins=None, stellarMassBins=None)

Plot average/stacked radial gas cellsize profiles in stellar mass bins.

Specify one of haloMassBins or stellarMassBins. If radRelToVirRad, then [r/rvir] instead of [pkpc].

ionColumnsVsImpact2D(sP, haloMassBin, ion, radRelToVirRad=False, ycum=False, fullDepth=False)

Use gridded N_ion maps to plot a 2D pixel histogram of (N_ion vs impact parameter).

ionCoveringFractionVsImpact2D(sPs, haloMassBin, ion, Nthresh, sPs2=None, radRelToVirRad=False, fullDepth=False)

Use gridded N_ion maps to plot covering fraction f(N_ion>N_thresh) vs impact parameter.

lrgHaloVisualization(sP, haloIDs, conf=3, gallery=False, globalDepth=True, testClumpRemoval=False)

Configure single halo and multi-halo gallery visualizations.

lrgHaloVisResolution(sP, haloIDs, sPs_other)

Visualization: one halo, for four different resolution runs.

cloudEvoVis(sP, haloID, clumpID, sbNum, sizeParam=False)

Visualize a series of time-evolution frames tracking a single cloud.

cloudEvoVisFigure(sP, haloID, clumpID, sbNum, constSize=False)

Make figure for a series of time-evolution frames tracking a single cloud.

clumpDemographics(sPs, haloID, stackHaloIDs=None, trAnalysis=False)

Plot demographics of clump population for a single halo.

clumpTracerTracksLoad(sP, haloID, clumpID, sbNum=None, posOnly=False)

Load subbox time evolution tracks and analyze time evolution of clump cell/integral properties.

If sbNum is None, then use fullbox snapshot (time spacing), otherwise use specified subbox.

clumpTracerTracks(sP, haloID, clumpID, sbNum=None, posOnly=False)

Analyze and plot time evolution of cold clump properties vs time.

Intersect the LRG halo sample with the subbox catalogs, find which halos are available for high time resolution tracking, and then make our analysis and plots of the time evolution of clump cell/integral properties vs time.

clumpPropertiesVsHaloMass(sPs)

Run segmentation on a flat mass-selection of halos, plot clump properties / abundance vs halo mass.

clumpRadialProfiles(sP, haloID, selections, norm=False)

Compute and plot clump-centric radial profiles, for all clumps satisfying the selection in this halo.

paperPlots()

Produce all papers for the LRG-MgII (small-scale CGM structure) TNG50 paper.

temet.projects.mcst

MCST: exploratory plots / intro paper.

https://arxiv.org/abs/xxxx.xxxxx

smhm_relation(sims)

Diagnostic plot of stellar mass vs halo mass including empirical constraints.

sfr_vs_mstar(sims: list[simParams], yQuant: str) None

Diagnostic plot of SFR vs Mstar including observational data.

mbh_vs_mhalo(sims: list[simParams]) None

SMBH mass versus halo mass.

mbh_vs_mstar(sims: list[simParams]) None

SMBH mass versus stellar mass.

sizes_vs_mstar(sims)

Diagnostic plot of galaxy stellar size (half mass radius for now) versus stellar mass.

size_halpha_vs_mstar(sims)

Diagnostic plot of galaxy h-alpha (gas) size (half-light radius) versus stellar mass.

gas_mzr(sims)

Diagnostic plot of gas-phase mass-metallicity relation (MZR).

stellar_mzr(sims)

Diagnostic plot of stellar mass-metallicity relation (MZR).

phase_diagram(sim)

Driver.

diagnostic_numhalos_uncontaminated(sims)

Visualize number of non-contaminated halos vs redshift, and their contamination fractions.

diagnostic_snapshot_spacing(sims)

Visualize snapshot time spacing for different setups.

diagnostic_sfr_jeans_mass(sims, haloID=0)

Check that the per-cell Jeans mass is being calculated correctly during the simulation.

Load all gas properties, convert to proper, calculate the jeans mass and cell diameter yourself, calculate SFR yourself, plot against what the code is reporting (what is in the snap), should be 1-to-1, if not may be a factor of a or h missing.

blackhole_properties_vs_time(sim)

Plot SMBH mass growth and accretion rates vs time, from the txt files.

blackhole_position_vs_time(sim, snap_based=True)

Plot (relative) position of SMBHs vs time.

starformation_diagnostics(sims, supernovae=False, split_z=True, sizefac=1.0)

Plot PDFs of gas properties at the sites and moments of star formation (or supernovae).

select_ics()

Helper to select halos from TNG50 for resimulation.

paperPlots(a=False)

Plots for MCST intro paper. (if a == True, make all figures).

temet.projects.mcst_vis

MCST: visualizations / intro paper.

https://arxiv.org/abs/xxxx.xxxxx

vis_single_galaxy(sP, haloID=0, noSats=False)

Visualization: single image of a galaxy.

Note: cannot use for a movie since the face-on/edge-on rotations have random orientations each frame.

Visualization: gallery of images of galaxies (one per run).

vis_single_halo(sP, haloID=0, movie=False, galscale=False)

Visualization: single halo, multiple fields.

vis_movie(sP, haloID=0, frame=None)

Visualization: movie of a single halo. Use minimal SubLink MPB tracking.

Note: cannot use rotation for face-on/edge-on since it has random orientations each frame.

vis_movie_mpbsm(sims, haloID=0, conf=1)

Render movie of a zoom run using the final merger tree and MPB-smoothed halo tracking.

vis_highres_region(sP, partType='dm')

Visualize large-scale region that bounds all high-res DM.

vis_parent_box(sP, partType='dm')

Visualize large-scale region that bounds all high-res DM.

temet.projects.mg2emission

TNG50: MgII CGM emission paper.

https://arxiv.org/abs/2106.09023

singleHaloImageMGII(sP, subhaloInd, conf=1, size=100, rotation='edge-on', labelCustom=None, rVirFracs=(0.25,), fracsType='rVirial', font=16, cbars=True, psf=False)

MgII emission image test..

visMg2Gallery(sP, mStarBin, num, size=100, colorbar=True)

MgII emission: image gallery of example stamps in a given stellar mass bin.

visDustDepletionImpact(sP, subhaloInd)

MgII emission image test.

radialSBProfiles(sPs, massBins, minRedshift=None, psf=False, indiv=False, xlim=None, ylim=None)

Use grids to produce individual and stacked radial surface brightness profiles.

gridPropertyVsInclinations(sP, propName='mg2_lumsize')

Derive inclination-dependent properties using gridded maps.

Grid a number of halos, equally sampling across a stellar mass range, and for each of a few random inclinations, derive a property from the grid. Caching return.

inclinationPlotDriver(sP, quant='inclination_mg2_lumsize')

Driver for subhalos.median.

cumulativeLumVsVrad(sP)

Driver for snapshot.median().

mg2lum_vs_mass(sP, redshifts=None)

Driver for subhalos.median.

paperPlots()

Plots for the TNG50 MgII CGM emission paper.

inclination(sim, field)

Galaxy inclination.

We have some particular datsets which generate a property, per subhalo, for each of several random/selected inclinations. The return here is the only case in which it is multidimensional, with the first axis corresponding to subhaloID. This can transparently work through e.g. a cen/sat selection, and plotting. NOTE: do not mix inclination* fields with others, as they do not correspond.

inclination_mg2_lumsize(sim, field)

Half-light radii of MgII emission from the halo, as a function of inclination.

inclination_mg2_shape_(sim, field)

Axis ratio (shape) of MgII emission from the halo, as a function of inclination.

temet.projects.mockspec

The Synthetic Absorption Line Spectral Almanac (SALSA).

https://arxiv.org/abs/2510.19904 (Nelson+ 2026)

metalAbundancesVsSolar(sim, ion='Mg II')

Diagnostic plot of how much various metal abundances actual vary vs. the solar abundance ratio.

lightconeSpectraConfig(sim, max_redshift=5.0)

Combine available pathlengths through single snapshots to create a cosmologically long sightline.

To create a cosmological sightline, i.e. over a significant pathlength much larger than the box size, possible e.g. complete from z=0 to z=4, we need to combine available pathlengths as available at the discrete simulation snapshots. Compute the available snapshots, and the number of pathlengths to take from each.

Parameters:
  • sim (simParams) – simulation instance.

  • max_redshift (float) – all spectra go from redshift 0.0 to max_redshift, i.e. of the background quasar.

Returns:

a 3-tuple composed of

  • snaps (list[int]): the snapshot numbers which need to be used to cover the sightline.

  • num_boxes (ndarray[int]): the number of times a full-box pathlength needs to be replicated for each snapshot.

  • z_init (list[list[float]]): for each snapshot, a list of redshifts, corresponding to where each of the replications should be started.

lightconeSpectra(sim, instrument, ion, solar=False, add_lines=None)

Create a composite spectrum spanning a cosmological distance.

Parameters:
  • sim (simParams) – simulation instance.

  • instrument (str) – specify observational instrument (in temet.spectra.spectrum.instruments).

  • ion (str) – space-separated name of ion e.g. ‘Mg II’.

  • solar (bool) – if True, then adopt solar abundance ratio for the given species, instead of snap value.

  • add_lines (list[str] or None) – if not None, then a list of lines to include. otherwise, include all for this ion.

Returns:

a 2-tuple composed of

  • wave (ndarray): 1d array, observed-frame wavelength grid [Ang].

  • flux (ndarray): 1d array, normalized flux values, from 0 to 1.

plotLightconeSpectrum(sim, instrument, ion, add_lines=None, SNR=None)

Plot a single lightcone spectrum.

Parameters:
  • sim (simParams) – simulation instance.

  • instrument (str) – specify observational instrument (in temet.spectra.spectrum.instruments).

  • ion (str) – space-separated name of ion e.g. ‘Mg II’.

  • add_lines (list[str] or None) – if not None, then a list of lines to include. otherwise, include all for this ion.

  • SNR (float) – if not None, then add noise to achieve this signal to noise ratio.

optical_depth_map_2d(sim, line, instrument, SNR=10.0, tau_minmax=(0.0, 0.3))

Create 2D map of galaxy-centric apparent optical depth, as a function of transverse and LoS distance.

Inspired by the usual Steidel+/KBSS style (e.g. https://arxiv.org/abs/2503.20037).

Parameters:
  • sim (simParams) – simulation instance.

  • line (str) – string specifying the line transition.

  • instrument (str) – specify wavelength range and resolution, must be known in instruments dict.

  • SNR (float) – if not None, then add noise to achieve this signal to noise ratio.

  • tau_minmax (list[float]) – 2-tuple of min-max colorbar values for optical depth.

impact_parameter_profile(sim, line, instrument, spec=False, SNR=100)

Create a 1D profile of absorption EW vs impact parameter, for a given galaxy sample.

Parameters:
  • sim (simParams) – simulation instance.

  • line (str) – string specifying the line transition.

  • instrument (str) – specify wavelength range and resolution, must be known in instruments dict.

  • spec (list[str]) – if True, then add panels showing actual spectra for one of the galaxies.

  • SNR (float) – if not None, then add noise to achieve this signal to noise ratio.

doublet_ratio(sim, line1, line2, instrument)

Create a 2D histogram of doublet ratio vs equivalent width.

Parameters:
  • sim (simParams) – simulation instance.

  • line1 (str) – first line transition.

  • line2 (str) – second line transition.

  • instrument (str) – specify wavelength range and resolution, must be known in instruments dict.

mean_transmitted_flux(sim, line, instrument, redshifts)

Calculate and plot the mean transmitted flux as a function of redshift.

Parameters:
  • sim (simParams) – simulation instance.

  • line (str) – string specifying the line transition.

  • instrument (str) – specify wavelength range and resolution, must be known in instruments dict.

  • redshifts (list[float]) – 1D array of redshift bin edges.

vis_overview(sP, haloID=None)

Visualize large-scale box, and halo-scale zoom, in an ion column density.

ion_redshift_coverage(sim, single=False, all=True, lowz=False)

Schematic plot showing ion/redshift/instrument/etc coverage of available mock spectra files.

Parameters:
  • sim (simParams) – simulation instance.

  • single (bool) – show only 1 marker per ion/full snap, instead of per instrument/config.

  • all (bool) – show all possible, otherwise show only existing.

  • lowz (bool) – make a log-log plot that focuses on low redshift.

paperPlots()

Generate plots for the mock spectra paper.

temet.projects.outflows

Outflows paper (TNG50 presentation): plots.

https://arxiv.org/abs/1902.05554

sample_comparison_z2_sins_ao(sP)

Compare available galaxies vs. the SINS-AO sample of ~35 systems.

stackedRadialProfiles(sPs, field, cenSatSelect='cen', projDim='3D', xaxis='log_pkpc', reBand='jwst_f115w', haloMassBins=None, mStarBins=None, saveName=None, pdf=None)

Plot stacked radial profiles for several stellar mass bins and/or runs i.e. at different redshifts.

fit_vout()

For text discussion and fit equations relating to outflow velocities.

halo_selection(sP, minM200=11.5)

Make a quick halo selection above some mass limit.

Sorted based on energy injection in the low BH state between this snapshot and the previous.

outflowVel_obs_data(ax, p)

Passed to outflowVel() to add observational data to plot.

outflowRatesStacked_post(ax, p)

Passed to outflowRatesStacked() to write data to txt file.

outflowRates_post(ax, p)

Passed to outflowRates() to plot observational data and write data to txt file.

run()

Perform all the (possibly expensive) analysis for the paper.

paperPlots(sPs=None)

Construct all the final plots for the paper.

temet.projects.outflows_vis

Outflows paper (TNG50 presentation): related vis and movies.

https://arxiv.org/abs/1902.05554

galaxyMosaic_topN(numHalosInd, panelNum=1, hIDsPlot=None, redshift=2.0, rotation='face-on')

Mosaic of galaxy images, top N most massive.

numHalosInd: [0,1,2,3] controls the layout and the number N. panelNum: controls the field to render, gas vs. stars. hIDs: if not None, then plot exactly these FoF-halo IDs instead of the top N.

preRenderSubboxImages(sP, sbNum, selInd, minM200=11.5)

Pre-render a number of images for selInd in sP(sbNum), through all snapshots.

preRenderFullboxImages(sP, haloInds, snaps=None)

Pre-render a number of images for haloInds at sP, through all snapshots or some subset as specified.

visHaloTimeEvo(sP, data, haloPos, snapTimes, haloInd, extended=False, pStyle='white')

Visualize halo evolution data. 3x2 panel image sequence, or 5x3 if extended == True.

visHaloTimeEvoSubbox(sP, sbNum, selInd, minM200=11.5, extended=False, pStyle='black')

Visualize halo time evolution as a series of complex multi-panel images, for subbox-based tracking.

visHaloTimeEvoFullbox(sP, haloInd, extended=False, pStyle='white')

As above, but for full-box based tracking.

singleHaloDemonstrationImage(conf=1, overlay='lic_stream')

Projections of a single halo showing outflow characteristics (streamlines or LIC).

subboxOutflowTimeEvoPanels(conf=0, depth=10)

Track a halo through time and produce a series of time evolution panels.

outflowSingleVis()

High-resolution vis of a single panel from the above.

run()

Run.

temet.projects.oxygen

Oxygen (OVI, OVII and OVIII) TNG paper.

http://arxiv.org/abs/1712.00016

nOVIcddf(sPs, pdf, moment=0, simRedshift=0.2, boxDepth10=False, boxDepth125=False)

CDDF (column density distribution function) of O VI in the whole box at z~0.

(Schaye Fig 17) (Suresh+ 2016 Fig 11).

cddfRedshiftEvolution(sPs, saveName, ions, redshifts, moment=0, boxDepth10=False, colorOff=0)

Redshift evolution of the OVI CDDF.

totalIonMassVsHaloMass(sPs, saveName, ions=('OVI', 'OVII'), cenSatSelect='cen', redshift=None, vsHaloMass=True, secondTopAxis=False, toAvgColDens=False, colorOff=2, toyFacs=None)

Plot total (gravitationally bound) mass of various ions, or e.g. cold/hot CGM mass, versus halo or stellar mass.

If toAvgColDens, then plot average column density computed geometrically as (Mtotal/pi/rvir^2). If secondTopAxis, add the other (halo/stellar) mass as a secondary top axis, average relation.

stackedRadialProfiles(sPs, saveName, ions, redshift=0.0, cenSatSelect='cen', projDim='3D', radRelToVirRad=False, radRelToR500=False, massDensity=False, massDensityMsun=False, haloMassBins=None, stellarMassBins=None, xlim=(0.0, 3.0), combine2Halo=False, fieldTypes=('GlobalFoF',), emFlux=False, median=False)

Plot stacked radial number/mass density profiles for a series of halo or stellar mass bins.

One or more ions, one or more runs, at a given redshift. Specify one of haloMassBins or stellarMassBins.

Parameters:
  • sPs (list[simParams]) – list of simulation instances.

  • saveName (str) – output figure filename.

  • ions (list[str]) – list of ion names, e.g. [‘OVI’, ‘OVII’].

  • redshift (float) – redshift to plot.

  • cenSatSelect (str) – ‘cen’, ‘sat’, or ‘all’ to select central/satellite/all subhalos.

  • projDim (str) – ‘3D’ for radial profiles, or e.g. ‘2Dz_2Mpc’ for projected/column density profiles.

  • radRelToVirRad (bool) – plot in [r/rvir] instead of [pkpc].

  • radRelToR500 (bool) – plot in [r/r500] instead of [pkpc].

  • massDensity (bool) – plot y-axis as [g/cm^3] instead of [1/cm^3].

  • massDensityMsun (bool) – plot y-axis as [Msun/kpc^3] or [Msun/kpc^2] if 2D.

  • haloMassBins (list[2-tuple]) – list of 2-tuples, each a halo mass bin min max (log Msun) to use.

  • stellarMassBins (list[2-tuple]) – list of 2-tuples, each a stellar mass bin min max (log Msun) to use.

  • xlim (2-tuple) – x-axis limits.

  • combine2Halo (bool) – combine the other-halo and diffuse terms.

  • fieldTypes (list[str]) – list of field types to plot, e.g. [‘GlobalFoF’] (must correspond to auxcats).

  • emFlux (bool) – if True, then plot [photon/s/cm^2/ster].

  • median (bool) – if True, plot median profiles instead of mean.

ionTwoPointCorrelation(sPs, saveName, ions, redshift=0.0, order=0, colorOff=0)

Plot the real-space 3D two point correlation function of e.g. OVI mass.

obsSimMatchedGalaxySamples(sPs, saveName, config='COS-Halos')

Plot the COS-Halos (or other observed) galaxies data, and our mock sample.

obsColumnsDataPlot(sP, saveName, radRelToVirRad=False, config='COS-Halos')

Plot COS-Halos N_OVI data (or other CGM survey data), and our corresponding mock galaxy sample analysis.

obsColumnsDataPlotExtended(sP, saveName, config='COS-Halos')

Plot COS-Halos N_OVI data, and our mock COS-Halos galaxy sample analysis, with stacked offset 1d KDEs.

obsColumnsLambdaVsR(sP, saveName, configs='COS-Halos')

Plot statistical lambda value(s) as a function of impact parameter.

coveringFractionVsDist(sPs, saveName, ions, colDensThresholds, config='COS-Halos', conf=0)

Covering fraction of OVI versus impact parameter.

Show either COS-Halos data versus mock simulated sample, or physics variations with respect to fiducial model. colDensThresholds is a list in [1/cm^2] to compute.

test_lambda_statistic()

Test the behavior of the lambda statistic depending on the sim vs obs draws.

paperPlots()

Construct all the final plots for the paper.

temet.projects.rshock

Virial shock radius: methods based on spherical healpix shell samplings of gas properties.

plotHealpixShells(rad, data, label, rads=None, clim=None, ctName='viridis', saveFilename='plot.pdf')

Plot a series of healpix shell samplings.

healpixThresholdedRadius(sP, pSplit=None, ptType='Gas', quant='Temp', radMax=5, radNumBins=400, Nside=16)

Derive virial shock radius for all subhalos using a given algorithm.

local_gas_subset(sP, haloID=0, maxRadR200=5.2, useTree=True)

Obtain and cache a set of gas cells in the vicinity of a halo. Debugging only, independent of the auxCats.

virialShockRadiusSingle(sP, haloID, useExistingAuxCat=True)

Exploration: given gas information around a halo, use Healpix sampling to determine the virial shock radius.

plotRshockVsMass(sPs, quants=('Temp_400rad_16ns',), vsHaloMass=True, kpc=False, percInds=None, methodInds=None)

Plot a particular virial shock radius measurement vs halo/stellar mass.

visualizeHaloVirialShock(sP, haloID, conf=0, depthFac=1.0, dataCache=None)

Driver for a single halo vis example, highlighting the virial shock structure.

paperPlots()

Generate all plots for virial shock radius paper.

temet.projects.tngcluster

TNG-Cluster: introduction paper.

https://arxiv.org/abs/2311.06338

vis_fullbox_virtual(sP, conf=0)

Visualize the entire virtual reconstructed box.

Visualize a single halo in multiple fields, or a gallery of multiple halos.

mass_function(secondaries=False)

Plot halo mass function from the parent box (TNG300) and the zoom sample.

Parameters:

secondaries (bool) – if True, then also include non-targeted halos with no/little contamination.

sample_halomasses_vs_redshift(sPs)

Compare simulation vs observed cluster samples as a function of (redshift,mass).

bfield_strength_vs_halomass(sPs, redshifts)

Driver for subhalos.median.

stellar_mass_vs_halomass(sPs, conf=0)

Plot various stellar mass quantities vs halo mass.

gas_fraction_vs_halomass(sPs)

Plot f_gas vs halo mass.

sfr_vs_halomass(sPs)

Plot star formation rate vs halo mass.

mhi_vs_halomass(sPs)

Plot cold gas mass (M_HI) vs halo mass.

szy_vs_halomass(sPs)

Plot SZ y-parameter vs halo mass.

XrayLum_vs_halomass(sPs)

Plot X-ray luminosity vs halo mass.

smbh_mass_vs_veldisp(sPs)

Plot SMBH mass versus stellar velocity dispersion.

smbh_mass_vs_halomass(sPs)

Plot SMBH mass versus halo mass (m500c).

cluster_radial_profiles(sim, quant='Metallicity', weight='')

Plot radial profiles for various quantities.

Parameters:
  • sim (simParams) – simulation instance.

  • quant (str) – quantity to plot, one of: [‘Metallicity’, ‘Temp’, ‘ne’, ‘Entropy’].

  • weight (str) – if ‘’ then mass-weighted. Otherwise ‘_XrayWt’ is available.

galaxy_number_profile(sim, criterion='Mr_lt205_2D')

Plot radial profiles of satellite/galaxy numbers.

halo_properties_table(sim)

Write out a table of primary target halo properties (in several formats).

To then overwrite publicly available data: rsync -tr –progress TNG-Cluster_Catalog.* freyator:/var/www/html/files/

paperPlots()

Plots for TNG-Cluster intro paper.

temet.projects.xray_scattering

Resonant scattering of x-ray line emission (e.g. OVII) for LEM.

https://arxiv.org/abs/2306.05453

lemIGM()

Create plots for LEM proposal/STM.

radialProfile(sim, haloID, b, line='O--7-21.6020A')

RT-scattered photon datasets from VoroILTIS: surface brightness radial profile.

Parameters:
  • sim (simParams) – simulation instance.

  • haloID (int) – the halo index to load.

  • b (float) – the boost parameter(s) of the hot ISM component to load.

  • line (str) – emission line name.

radialProfiles(sim, haloID, b)

RT-scattered photon datasets from VoroILTIS: surface brightness radial profile comparison.

Parameters:
  • sim (simParams) – simulation instance.

  • haloID (int) – the halo index to load.

  • b (list[float]) – the boost parameters of the hot ISM component to load.

stackedRadialProfiles(sim, haloIDs, b, addObsThresholds=True)

RT-scattered photon datasets from VoroILTIS: stacked surface brightness radial profiles.

Parameters:
  • sim (simParams) – simulation instance.

  • haloIDs (list[int]) – list of the halo indices to load.

  • b (float) – the boost parameter of the hot ISM component to load.

  • addObsThresholds (bool) – add observational detection thresholds to the plot.

radialProfilesInput(sim, haloID)

Debug plot: input SB profiles of emission.

Parameters:
  • sim (simParams) – simulation instance.

  • haloID (int) – the halo index to plot. If None, all halos (i.e. all input files) are shown.

imageSBcomp(sim, haloID, b, line='O--7-21.6020A')

RT-scattered photon datasets from VoroILTIS: surface brightness image, intrinsic vs scattered.

Parameters:
  • sim (simParams) – simulation instance.

  • haloID (int) – the halo index to load.

  • b (float) – the boost parameter of the hot ISM component.

  • line (str) – emission line name.

imageSBgallery(sim, haloIDs, b)

RT-scattered photon datasets from VoroILTIS: gallery of surface brightness images.

Parameters:
  • sim (simParams) – simulation instance.

  • haloIDs (list[int]) – the halo indices to load.

  • b (float) – the boost parameter of the hot ISM component.

spectrum(sim, haloID, b)

RT-scattered photon datasets from VoroILTIS: line emission spectrum.

Parameters:
  • sim (simParams) – simulation instance.

  • haloID (int) – the halo index to load.

  • b (float) – the boost parameter of the hot ISM component.

galaxyLum(sim, haloID, b, aperture_kpc=10.0)

Compute (total) luminosity (within some aperture) for scattered photon datasets.

Parameters:
  • sim (simParams) – simulation instance.

  • haloID (int) – the halo index to load.

  • b (float) – the boost parameter of the hot ISM component.

  • aperture_kpc (float) – the radial aperture within which to sum luminosity [pkpc].

galaxyLumVsSFR(sim, b=1, addDiffuse=True, correctLineToBandFluxRatio=False)

Test the hot ISM emission model by comparing to observational scaling relations.

Parameters:
  • sim (simParams) – simulation instance.

  • b (float) – the boost parameter of the hot ISM component.

  • addDiffuse (bool) – in addition to the hot ISM component, add the non-starforming (i.e. diffuse) emission.

  • correctLineToBandFluxRatio (bool) – correct the Mineo+12 0.5-2 keV downwards to account for the fact that OVII(r) is only a (uncertain) fraction of this broadband luminosity

enhancementVsMass(sim, haloIDs, b, rad=4, color_quant='sfr', median=False, pxRatios=True)

Derive and plot SB enhancement factor as a function of mass and radial ranges, coloring by other quantities.

Parameters:
  • sim (simParams) – simulation instance.

  • haloIDs (list[int]) – list of the halo indices to load.

  • b (float) – the boost parameter of the hot ISM component.

  • rad (int) – which of the five radial ranges to use.

  • color_quant (str) – which galaxy property to color points by, ‘sfr’, ‘LOVII’, ‘Lbol’, or ‘m200’.

  • median (bool) – plot the median (across pixels) SB ratio, instead of the mean (default).

  • pxRatios (bool) – if True, define enhancement factor as the mean or median of the ratio of scattered to intrinsic pixel SB values, for a given radial range. If False, instead define as the ratio of (a) the mean or median scattered SB values for all pixels in a given radial range, to (b) the mean or median intrinsic SB values for the same pixels.

enhancementTrendVsMass(sim, haloIDs, b)

Plot mean/median trends of SB enhancement factor for different radial ranges.

Parameters:
  • sim (simParams) – simulation instance.

  • haloIDs (list[int]) – list of the halo indices to load.

  • b (float) – the boost parameter of the hot ISM component.

singleHaloImageO7(sP, subhaloInd)

OVII optical depth projection.

paperPlots()

Generate all plots of the paper.