Author: Rainer Weinberger (Page 1 of 5)

Scientific project management

Scientific projects are unusually difficult to plan mainly due to their unpredictability in both outcome and effort that needs to be put into it to achieve them. Having to manage a number of them simultaneously with only a limited amount of time available for each one is a challenge to the productivity as a scientist. Here are a couple of practices I implement to ensure a productive use of my time while keeping the necessary flexibility in carrying out my scientific research. I use them as guidelines and best practices, but I am not always living up to these standards myself.

Overall vision

  • 3-5 year vision of what I want to achieve
  • Goals should be as little dependent on external factors and and on luck as possible, i.e. rather than ‘getting this job’, have a vision like ‘becoming an expert/contribute in this particular field’.
  • The purpose is to define how much time to spend on each topic, and not so much on goals with specific measures of success (those are more important for the shorter term)
  • Changes to the list can be made, but only if this wish for a change is persistent.

Project list

  • Concrete spelled-out projects, usually ending with at least one publication, sometimes more
  • Clear measure of success
  • List has a clear hierarchy in priority
  • There are a number of ‘potential projects’ lingering there for months (sometimes years) until they become real projects.

Hierarchy of time plans

  • Starting from a yearly plan (inspired by project list, with relative importance/time informed by vision list)
  • Plans in successively smaller timescales (for me: year, quarter, month, week, day)
  • Each item has to be part of a longer term plan item, but more specific
  • Daily plan filled by items of weekly plan
  • Retrospective & planning session at the end of each plan period
  • Measure fraction of completed tasks to adjust future plans

“Urgent list”

  • Separate list for spontaneous requests
  • Including all email & informal requests
  • Enough dedicated time in daily plan for ‘work on urgent list’ (say 2-3h/day)
  • Only check communication (email, slack, …) during ‘work on urgent list’ to ensure other items can be worked on undisturbed; 3 times a day works quite well for me (as a compromise between availability and undisturbed working).
  • During weekly planning, urgent list items can move to next weekly plan

Physical or digital?

This really depends on personal preferences.

I have my yearly, quarterly and monthly plan, as well as the vision and project list in the same physical notebook. The weekly plan is integrated as a ‘sprint’ to a scrum workflow handled by a project management software. This is highly useful because it allows automated generation of measures of productivity on a weekly basis, but also fairly time-consuming. I use a loose sheet of paper to create a plan for the following day every evening. My ‘urgent list’ is a simple Kanban board.

Pathak et al. (2021)

Quenching, Mergers, and Age Profiles for z = 2 Galaxies in IllustrisTNG

Pathak, Debosmita; Belli, Sirio; Weinberger, Rainer

Using the IllustrisTNG cosmological galaxy formation simulations, we analyze the physical properties of young quiescent galaxies at z = 2 with stellar masses above 1010.5 M. This key population provides an unaltered probe into the evolution of galaxies from star-forming to quiescent, and has been recently targeted by several observational studies. Young quiescent galaxies in the simulations do not appear unusually compact, in tension with observations, but they show unique age profiles that are qualitatively consistent with the observed color gradients. In particular, more than half of the simulated young quiescent galaxies show positive age gradients due to recent intense central starbursts, which are triggered by significant mergers. Yet, there is a sizable population of recently quenched galaxies without significant mergers and with flat age profiles. Our results suggest that mergers play a fundamental role in structural transformation, but are not the only available pathway to quench a z = 2 galaxy.

published in
The Astrophysical Journal Letters, Volume 916, Issue 2, id.L23, 7pp.

links to paper

ZuHone et al. (2021)

How Merger-driven Gas Motions in Galaxy Clusters Can Turn AGN Bubbles into Radio Relics

ZuHone, John A.; Markevitch, Maxim; Weinberger, Rainer; Nulsen, Paul; Ehlert, Kristian

Radio relics in galaxy clusters are extended synchrotron sources produced by cosmic-ray electrons in the microgauss magnetic field. Many relics are found in the cluster periphery and have a cluster-centric, narrow arc-like shape, which suggests that the electrons are accelerated or reaccelerated by merger shock fronts propagating outward in the intracluster plasma. In the X-ray, some relics do exhibit such shocks at the location of the relic, but many do not. We explore the possibility that radio relics trace not the shock fronts but the shape of the underlying distribution of seed relativistic electrons, lit up by a recent shock passage. We use magnetohydrodynamic simulations of cluster mergers and include bubbles of relativistic electrons injected by jets from the central active galactic nucleus or from an off-center radio galaxy. We show that the merger-driven gas motions (a) can advect the bubble cosmic rays to very large radii and (b) spread the relativistic seed electrons preferentially in the tangential direction-along the gravitational equipotential surfaces-producing extended, filamentary, or sheet-like regions of intracluster plasma enriched with aged cosmic rays, which resemble radio relics. Once a shock front passes across such a region, the sharp radio emission edges would trace the sharp boundaries of these enriched regions rather than the front. We also show that these elongated cosmic-ray features are naturally associated with magnetic fields stretched tangentially along their long axis, which could help explain the high polarization of relics.

published in
The Astrophysical Journal, Volume 914, Issue 1, id.73, 14 pp.

links to paper

Ehlert et al. (2021)

Connecting turbulent velocities and magnetic fields in galaxy cluster simulations with active galactic nuclei jets

Ehlert, Kristian; Weinberger, Rainer; Pfrommer, Christoph; Springel, Volker

The study of velocity fields of the hot gas in galaxy clusters can help to unravel details of microphysics on small scales and to decipher the nature of feedback by active galactic nuclei (AGN). Likewise, magnetic fields as traced by Faraday rotation measurements (RMs) inform about their impact on gas dynamics as well as on cosmic ray production and transport. We investigate the inherent relationship between large-scale gas kinematics and magnetic fields through non-radiative magnetohydrodynamical simulations of the creation, evolution, and disruption of AGN jet-inflated lobes in an isolated Perseus-like galaxy cluster, with and without pre-existing turbulence. In particular, we connect cluster velocity measurements with mock RM maps to highlight their underlying physical connection, which opens up the possibility of comparing turbulence levels in two different observables. For single-jet outbursts, we find only a local impact on the velocity field, i.e. the associated increase in velocity dispersion is not volume-filling. Furthermore, in a setup with pre-existing turbulence, this increase in velocity dispersion is largely hidden. We use mock X-ray observations to show that at arcmin resolution, the velocity dispersion is therefore dominated by existing large-scale turbulence and is only minimally altered by the presence of a jet. For the velocity structure of central gas uplifted by buoyantly rising lobes, we find fast, coherent outflows with low velocity dispersion. Our results highlight that projected velocity distributions show complex structures, which pose challenges for the interpretation of observations.

published in
Monthly Notices of the Royal Astronomical Society, Volume 503, Issue 1, pp.1327-1344

links to paper

Emami et al. (2021)

Morphological Types of DM Halos in Milky Way-like Galaxies in the TNG50 Simulation: Simple, Twisted, or Stretched

Emami, Razieh; Genel, Shy; Hernquist, Lars; Alcock, Charles; Bose, Sownak; Weinberger, Rainer; Vogelsberger, Mark; Marinacci, Federico; Loeb, Abraham; Torrey, Paul; Forbes, John C.

We present a comprehensive analysis of the shape of dark matter (DM) halos in a sample of 25 Milky Way-like galaxies in TNG50 simulation. Using an enclosed volume iterative method, we infer an oblate-to-triaxial shape for the DM halo with median T ≃ 0.24. We group DM halos into three different categories. Simple halos (32% of the population) establish principal axes whose ordering in magnitude does not change with radius and whose orientations are almost fixed throughout the halo. Twisted halos (32%) experience levels of gradual rotations throughout their radial profiles. Finally, stretched halos (36%) demonstrate a stretching in the lengths of their principal axes where the ordering of different eigenvalues changes with radius. Subsequently, the halo experiences a “rotation” of ∼90° where the stretching occurs. Visualizing the 3D ellipsoid of each halo, for the first time, we report signs of a reorienting ellipsoid in twisted and stretched halos. We examine the impact of baryonic physics on DM halo shape through a comparison to dark matter only (DMO) simulations. This suggests a triaxial (prolate) halo. We analyze the impacts of substructure on DM halo shape in both hydrodynamical and DMO simulations and confirm that they are subdominant. We study the distribution of satellites in our sample. In simple and twisted halos, the angle between satellites’ angular momentum and the galaxy’s angular momentum grows with radius. However, stretched halos show a flat distribution of angles. Overlaying our theoretical outcome on the observational results presented in the literature establishes a fair agreement.

published in
The Astrophysical Journal, Volume 913, Issue 1, id.36, 30 pp.

links to paper

Hayward et al. (2021)

Submillimetre galaxies in cosmological hydrodynamical simulations – an opportunity for constraining feedback models

Hayward, Christopher C.; Sparre, Martin; Chapman, Scott C.; Hernquist, Lars; Nelson, Dylan; Pakmor, Rüdiger; Pillepich, Annalisa; Springel, Volker; Torrey, Paul; Vogelsberger, Mark; Weinberger, Rainer 

Submillimetre galaxies (SMGs) have long posed a challenge for theorists, and self-consistently reproducing the properties of the SMG population in a large-volume cosmological hydrodynamical simulation has not yet been achieved. We use a scaling relation derived from previous simulations plus radiative transfer calculations to predict the submm flux densities of simulated SMGs drawn from cosmological simulations from the Illustris and IllustrisTNG projects based on the simulated galaxies’ star formation rates (SFRs) and dust masses, and compare the predicted number counts with observations. We find that the predicted SMG number counts based on IllustrisTNG are significantly less than observed (more than 1 dex at S850 ≳ 4 mJy). The simulation from the original Illustris project yields more SMGs than IllustrisTNG: the predicted counts are consistent with those observed at both S850 ≲ 5 mJy and S850 ≳ 9 mJy and only a factor of ∼2 lower than those observed at intermediate flux densities. The redshift distribution of SMGs with S850 > 3 mJy in IllustrisTNG is consistent with the observed distribution, whereas the Illustris redshift distribution peaks at significantly lower redshift (1.5 versus 2.8). We demonstrate that IllustrisTNG hosts fewer SMGs than Illustris because in the former, high-mass ( $M_{\star }\sim 10^{11} \, \text{M}_{\odot }$ ) z ∼ 2-3 galaxies have lower dust masses and SFRs than in Illustris owing to differences in the subgrid models for stellar and/or active galactic nucleus feedback between the two simulations (we unfortunately cannot isolate the specific cause(s) post hoc). Our results demonstrate that because our method enables predicting SMG number counts in post-processing with a negligible computational expense, SMGs can provide useful constraints for tuning subgrid models in future large-volume cosmological simulations.

published in
Monthly Notices of the Royal Astronomical Society, Volume 502, Issue 2, pp.2922-2933

links to paper

Zinger et al. (2020)

Ejective and preventative: the IllustrisTNG black hole feedback and its effects on the thermodynamics of the gas within and around galaxies

Zinger, Elad; Pillepich, Annalisa; Nelson, Dylan; Weinberger, Rainer; Pakmor, Rüdiger; Springel, Volker; Hernquist, Lars; Marinacci, Federico; Vogelsberger, Mark

Supermassive black holes (SMBHs) that reside at the centres of galaxies can inject vast amounts of energy into the surrounding gas and are thought to be a viable mechanism to quench star formation in massive galaxies. Here, we study the 109−1012.5 M⊙ stellar mass central galaxy population of the IllustrisTNG simulation, specifically the TNG100 and TNG300 volumes at z = 0, and show how the three components – SMBH, galaxy, and circumgalactic medium (CGM) – are interconnected in their evolution. We find that gas entropy is a sensitive diagnostic of feedback injection. In particular, we demonstrate how the onset of the low-accretion black hole (BH) feedback mode, realized in the IllustrisTNG model as a kinetic, BH-driven wind, leads not only to star formation quenching at stellar masses ≳1010.5M but also to a change in thermodynamic properties of the (non-star-forming) gas, both within the galaxy and beyond. The IllustrisTNG kinetic feedback from SMBHs increases the average gas entropy, within the galaxy and in the CGM, lengthening typical gas cooling times from 10−100Myr to 1−10Gyr , effectively ceasing ongoing star formation and inhibiting radiative cooling and future gas accretion. In practice, the same active galactic nucleus (AGN) feedback channel is simultaneously ‘ejective’ and ‘preventative’ and leaves an imprint on the temperature, density, entropy, and cooling times also in the outer reaches of the gas halo, up to distances of several hundred kiloparsecs. In the IllustrisTNG model, a long-lasting quenching state can occur for a heterogeneous CGM, whereby the hot and dilute CGM gas of quiescent galaxies contains regions of low-entropy gas with short cooling times.

published in
Monthly Notices of the Royal Astronomical Society, Volume 499, Issue 1, pp.768-792, November 2020

links to paper

Nelson et al. (2020)

Resolving small-scale cold circumgalactic gas in TNG50

Nelson, Dylan; Sharma, Prateek; Pillepich, Annalisa; Springel, Volker; Pakmor, Rüdiger; Weinberger, Rainer; Vogelsberger, Mark; Marinacci, Federico; Hernquist, Lars

We use the high-resolution TNG50 cosmological magnetohydrodynamical simulation to explore the properties and origin of cold circumgalactic medium (CGM) gas around massive galaxies (M > 1011 M ) at intermediate redshift ( z∼0.5 ). We discover a significant abundance of small-scale, cold gas structure in the CGM of ‘red and dead’ elliptical systems, as traced by neutral H I and Mg II. Halos can host tens of thousands of discrete absorbing cloudlets, with sizes of order a kpc or smaller. With a Lagrangian tracer analysis, we show that cold clouds form due to strong δρ/ρ¯≫1 gas density perturbations that stimulate thermal instability. These local overdensities trigger rapid cooling from the hot virialized background medium at ∼107 K to radiatively inefficient ∼104 K clouds, which act as cosmologically long-lived, ‘stimulated cooling’ seeds in a regime where the global halo does not satisfy the classic tcool/tff < 10 criterion. Furthermore, these small clouds are dominated by magnetic rather than thermal pressure, with plasma β ≪ 1, suggesting that magnetic fields may play an important role. The number and total mass of cold clouds both increase with resolution, and the mgas ≃ 8 × 104M cell mass of TNG50 enables the ∼ few hundred pc, small-scale CGM structure we observe to form. Finally, we make a preliminary comparison against observations from the COS-LRG, LRG-RDR, COS-Halos, and SDSS LRG surveys. We broadly find that our recent, high-resolution cosmological simulations produce sufficiently high covering fractions of extended, cold gas as observed to surround massive galaxies.

published in
 Monthly Notices of the Royal Astronomical Society, Volume 498, Issue 2, pp.2391-2414, October 2020

links to paper

Python programming for scientists

A minimalist guide to learning Python for scientific use

Why another guide to Python programming? The main reason is that scientific programming is different from commercial software development, in particular for those who need results quickly and might not have the desire or the time to become a Python expert. The following guide is an ordered list of things I consider the most useful things to know for scientific code development in Python. It assumes the ability to write and run a single-file python script (or a Jupyter Notebook), and ends with writing and publishing your own package.

Mastering all of these topics takes years of practice (and I don’t claim I do), so start with the basics, and once you are familiar with one topic, move on to the next.

  • The most important libraries: numpy and matplotlib.pyplot. Get familiar with their functionality and how to use them.
  • Algorithms and data structures:
    • Learn a few of the basic algorithms and check if there is a library implementation.
    • Difference between arrays and dictionaries, and how to use both is very important.
  • Use functions: once a block of code exceeds the space on your screen, refactor parts to a function (recursively, if needed).
    • Make use of the flexibility in return type.
    • Use keyword arguments and default values wherever appropriate.
  • Use the time module to determine slowest part of code.
  • Learn simple optimization techniques:
    • Avoid loops.
    • Save intermediate results of calculation in files (numpy or pickle) or in memory.
    • Use of library functions whenever possible.
  • Create modules
    • In particular, packages (section 6.4 in ‘create modules’ link)
  • Documentation of functions and classes.
  • If you don’t to this already: use version control, e.g. git for your project
  • Get familiar with classes and object-oriented programming in Python. But:
    • Learn about design patterns and design principles. Using classes without having heard about these can be counterproductive.
    • Stick to the PEP8 style guide naming conventions
  • Unit tests via pytest
  • More advanced optimization:
    • Cython/using compiled code
    • Parallelism in python e.g. mpi4py
  • Create your own package
    • setuptools to install packages as a library
    • Continuous integration/ automated test and style check
    • Versioning (maybe a bit over-the-top for most purposes, but one suggestion here)
    • Creating a python package (e.g. for pip)

The question now is how to learn all of this. First and foremost, you learn to code by coding. There is no way around this. However, sometimes it is easy to fall back to somewhat complicated but known ways to implement things. Therefore spending some time trying new things is a good investment in your programming skills. Search engines are essential for concrete problems. For improving code structure, reading more experienced programmers’ code can be helpful. Once you are more advanced, I would therefore recommend looking at implementations of some of the major libraries and trying to understand them.

Weinberger, Springel, Pakmor (2020)

The Arepo public code release

Weinberger, Rainer; Springel, Volker and Pakmor, Rüdiger

We introduce the public version of the cosmological magnetohydrodynamical moving-mesh simulation code Arepo. This version contains a finite-volume magnetohydrodynamics algorithm on an unstructured, dynamic Voronoi tessellation coupled to a tree-particle-mesh algorithm for the Poisson equation either on a Newtonian or cosmologically expanding spacetime. Time-integration is performed adopting local timestep constraints for each cell individually, solving the fluxes only across active interfaces, and calculating gravitational forces only between active particles, using an operator-splitting approach. This allows simulations with high dynamic range to be performed efficiently. Arepo is a massively distributed-memory parallel code, using the Message Passing Interface (MPI) communication standard and employing a dynamical work-load and memory balancing scheme to allow optimal use of multi-node parallel computers. The employed parallelization algorithms of Arepo are deterministic and produce binary-identical results when re-run on the same machine and with the same number of MPI ranks. A simple primordial cooling and star formation model is included as an example of sub-resolution models commonly used in simulations of galaxy formation. Arepo also contains a suite of computationally inexpensive test problems, ranging from idealized tests for automated code verification to scaled-down versions of cosmological galaxy formation simulations, and is extensively documented in order to assist adoption of the code by new scientific users.

published in
 The Astrophysical Journal Supplement Series, Volume 248, Issue 2, id.32, June 2020

links to paper

« Older posts

© 2022 Rainer Weinberger

Theme by Anders NorenUp ↑