hammurabi X: Simulating Galactic Synchrotron Emission with Random Magnetic Fields

, , , , , and

Published 2020 February 24 © 2020. The American Astronomical Society. All rights reserved.
, , Citation Jiaxin Wang et al 2020 ApJS 247 18 DOI 10.3847/1538-4365/ab72a2

Download Article PDF
DownloadArticle ePub

You need an eReader or compatible software to experience the benefits of the ePub3 file format.

0067-0049/247/1/18

Abstract

We present version X of the hammurabi package, the HEALPix-based numeric simulator for Galactic polarized emission. Improving on its earlier design, we have fully renewed the framework with modern C++ standards and features. Multithreading support has been built in to meet the growing computational workload in future research. For the first time, we present precision profiles of the hammurabi line-of-sight integral kernel with multilayer HEALPix shells. In addition to fundamental improvements, this report focuses on simulating polarized synchrotron emission with Gaussian random magnetic fields. Two fast methods are proposed for realizing divergence-free random magnetic fields either on the Galactic scale where field alignment and strength modulation are imposed, or on a local scale where more physically motivated models like a parameterized magnetohydrodynamic (MHD) turbulence can be applied. As an example application, we discuss the phenomenological implications of Gaussian random magnetic fields for high Galactic latitude synchrotron foregrounds. In this, we numerically find B/E polarization-mode ratios lower than unity based on Gaussian realizations of either MHD turbulent spectra or in spatially aligned magnetic fields.

Export citation and abstract BibTeX RIS

1. Introduction

The Galactic synchrotron emission from the diffuse distribution of relativistic electrons and positrons in the magnetized interstellar medium (ISM)10 is the dominant signal in the polarized sky observed at frequencies ranging from MHz to GHz; therefore, it is one of the best friends of scientists who study multiphase ISM structure and cosmic-ray (CR) transport properties. To those who study the cosmic microwave background radiation, 21 cm cosmology, and the early universe, however, it is one of their worst enemies. Despite the difference between their scientific purposes, both fields recognize the importance of physically modeling the mechanisms and environments associated with polarized synchrotron emission, absorption, and Faraday rotation, which in the end provide a realistic description of the foreground observables. The fundamental physical principles of radiative transfer processes have been fully understood for around half a century (Rybicki & Lightman 1979), but with the growing precision and range of observations, we are challenged by various local structures and nonlinear phenomena within the Galaxy. This is slowing down conceptual and theoretical advancements in related research fields as the observables are no longer analytically calculable in a high-resolution and nonperturbative regime. To overcome the challenge, hammurabi (Waelkens et al. 2009) was developed to help us in simulating complicated observables with 3D modeling of the physical components of the Galaxy.

Over the last decade, we have witnessed wide scientific applications of hammurabi, for example, in estimating and removing Galactic synchrotron foreground contamination (Switzer & Liu 2014; Dolag et al. 2015), and in understanding magnetic fields of astrophysical objects varying from supernova remnants (West et al. 2017) to the Galaxy (Jaffe et al. 2013; Planck Collaboration et al. 2016b) and even to the local universe (Hutschenreuter et al. 2018). Despite the successful applications of hammurabi, we have noticed that after years of modifications and accumulation of modules and functions with outdated programming standards, the package might have been compromised by numeric issues and the lack of a properly maintained testing suite. Given the trend toward high-resolution and computation-dominated studies, it is the right time to provide a precision-guaranteed high-performance pipeline for simulating polarized synchrotron emission, absorption, and Faraday rotation. Thus, a thorough upgrading project has been performed, where we mainly focus on redesigning the code structure and workflow, calibrating the numeric algorithms and methods, improving the user experience, and setting up new conventions for future maintenance and development.

In addition to the technical improvements, we also keep up with recent progress in the physical modeling of Galactic foreground emission with the turbulent Galactic magnetic field (GMF), e.g., phenomenological research carried out by Beck et al. (2016), analytic estimations calculated by Cho & Lazarian (2002), Caldwell et al. (2016), Kandel et al. (2017, 2018), and heavy simulations analyzed by Akahori et al. (2013), Kritsuk et al. (2018), and Brandenburg et al. (2019). For future work about inferring the GMF configuration from observational data (e.g., Galactic synchrotron and dust emission, dispersion measure, and Faraday rotation measure), we need physically motivated and numerically fast magnetic field simulators, instead of setting up trivial random fields or directly adopting expensive magnetohydrodynamics (MHD) simulators. The balance has to be made between the computational cost and the modeling complexity. Low computational cost is required by any analysis that infers model parameters directly from data in a Bayesian fashion, where GMF models have to be evaluated repeatedly while the Bayesian inference algorithms sample through the often very high-dimensional parameter space. Full MHD simulations are currently prohibitively expensive to be used within such algorithms; there, fast emulators for the main statistical properties of typical MHD simulations are needed instead.

In this report, we propose two fast (in contrast to MHD simulation) random GMF generators which satisfy certain criteria. A project for studying the GMF configuration with numeric simulation has been proposed (Boulanger et al. 2018) by using a computational inference engine. Though the main motivation for hammurabi X is the construction of a Bayesian magnetic field inference engine, we herein present an analysis of the angular power spectrum, focusing on the synchrotron B/E ratio as a possible guide for future studies.

This report is arranged as follows. In Section 2, we present a brief technical description of the hammurabi X package with precision and performance profiles. Section 3 presents mathematical details of the random GMF generators and the properties of their products. In Section 4, we illustrate and discuss the influence of random GMF models on simulated synchrotron foreground angular power spectra. A summary is provided as Section 5 with prospects for future work.

Furthermore, in Appendix A we present the detailed numerical implementation of calculating the synchrotron emissivity and Faraday rotation. In Appendix B, we provide our method for vector-field fast Fourier transform (FFT) in generating magnetic fields and its precision profile. The precision related to pseudo-C estimation is addressed in Appendix C, and finally, in Appendix D, we briefly discuss divergence cleaning in generating random magnetic fields.

2. hammurabi X

2.1. Overview

The hammurabi code (Waelkens et al. 2009) is an astrophysical simulator based on 3D models of the components of the magnetized ISM such as magnetic fields, thermal electrons, relativistic electrons, and dust grains. It performs an efficient LoS integral through the simulated Galaxy model using a HEALPix-based11 (Górski et al. 2005) nested grid to produce observables such as the Faraday rotation measure and diffuse synchrotron and thermal dust emission12 in full Stokes I, Q, and U, while taking into account beam and depth depolarization as well as Faraday effects. The updated version, hammurabi X (Wang et al. 2019),13 has been developed to achieve higher computing performance and precision. Version 2.3.0 is available at doi:10.5281/zenodo.3522599. Specific effort has been devoted to the parallel computation of the LoS integral and vector-field FFT.

hammurabi X currently uses the HEALPix library (Górski et al. 2005) for observable production, where the LoS integral accumulates through several layers of spherical shells with adaptable HEALPix resolutions. We provide two modes of integral shell arrangements. In the auto-shell mode, given R as the maximum simulation radius, the nth shell out of N total shells covers the radial distance from 2(n − N−1)R to 2(n − N)R, except for the first shell which starts at the observer. The nth shell is by default set up with the HEALPix resolution-controlling parameter Nside = 2(n − 1)Nmin,14 where Nmin represents the lowest simulation resolution at the first shell. Alternatively in the manual-shell mode, shells are defined explicitly by a series of dividing radii and HEALPix Nside's. The radial resolution along the LoS integral is uniformly set by the minimal radial distance for each shell. The auto-shell mode follows the idea that the integral domain is discretized with elemental bins of the same volume, while the manual-shell mode allows users to refine specific regions to meet special realization requirements.

The LoS integral is carried out hierarchically: at the top level, the integral is divided into multiple shells with given spherical resolution settings, while at the bottom level inside each shell (where the spherical resolution is fixed), the radial integral is carried out with the midpoint rule for each radial bin. The accumulation of observable information from the inner to outer shells is applied at the top level. We emphasize that in hammurabi X, the simulation spherical resolution for each shell can be independent of that in the outputs, which means that we can simulate with an arbitrary number of shells and assign each shell a unique Nside value. During each step of the shell-accumulating process, we interpolate (with the linear interpolation provided by HEALPix library) the current result into the output resolution. Consequently, such interpolation between different angular resolutions will inevitably create a certain level of precision loss.

Previously in hammurabi, the generation of the anisotropic component of the random field as well as the modulation of the field strength following various parametric forms led to artificial magnetic field divergence. Now we propose two improved solutions for simulating the random magnetic field. On Galactic scales, a triple Fourier transform scheme is proposed to restore the divergence-free condition via a cleaning process. This imposes the divergence-free property in the random magnetic field (unlike in Planck Collaboration et al. 2016b), which will be discussed in detail in Section 3.3, with its observational implication in Section 4. Alternatively, in a given local region15 , a vector-field decomposition scheme is capable of simulating more detailed random-field power spectra.

FFTs are necessary for translating the power spectra of random fields into discrete magnetic field realizations on 3D spatial grids. Random-field generators in hammurabi X currently use the FFTW library.16 The detailed implementation will be discussed in Section 3. In cases where the field is input from an external or internal discrete grid, e.g., a random GMF, the LoS integral at a given position does a linear interpolation (in each phase-space dimension) from nearby grid points. The interpolation algorithm has been calibrated, so the high-resolution outputs are no longer contaminated by the numerical flaws in earlier versions of hammurabi. As illustrated in Figure 1, the interpolation process in the earlier version of hammurabi did not properly calculate the volume of elemental discretization, which resulted, for example, in negative values of the simulated dispersion measure and incorrect small-scale features in comparison to the corrected method in hammurabi X. In this new version, unit tests for linear interpolation can be found in the public repository.

Figure 1.

Figure 1. Comparison between the output from the earlier version hammurabi (top) and hammurabi X (bottom). The sky patch in this illustration shows the extra-Galactic dispersion measure (an observable with a nonnegative value by definition) simulated and studied by Hutschenreuter et al. (2018).

Standard image High-resolution image

Generally speaking, the precision of the linear interpolation (and the corresponding discretization) can in principle be characterized by the goodness of the approximation. This is explicitly affected by the discretization resolution and the arrangement of the sampling/supporting points, and also by the smoothness (as measured by the inverse of the second-order derivative) of the approximation target. In hammurabi X, the interpolation affects the precision in realizing the power spectrum of the random magnetic field generation. This can be improved by increasing the sampling resolution. Furthermore, linear interpolation does not preserve the divergence, but the precision can be improved either by increasing the sampling resolution17 or by matching the elemental discretization volume in the LoS integral with that in the field generation (as discussed by Waelkens et al. 2009).

2.2. Precision and Performance Profiles

Profiling18 the numerical precision in producing observables is critical in guiding practical applications. A standard hammurabi X simulation routine consists of two major building blocks. The first part is the numerical implementation of specific physical processes like synchrotron emission and Faraday rotation, and the second part is the LoS integral that is universal to all observables. In the following integrated precision check, the correctness of both will be verified and profiled together.

A given magnetic field vector ${\boldsymbol{B}}$ can be decomposed into directions parallel (horizontal) and perpendicular (vertical/poloidal) to the Galactic disk, or to be specific, the $\{\hat{{\boldsymbol{x}}},\hat{{\boldsymbol{y}}}\}$ plane (with $\hat{{\boldsymbol{y}}}$ pointing toward Galactic longitude l = 90°) in the hammurabi X convention, i.e., ${\boldsymbol{B}}$ and ${\boldsymbol{B}}$ at a given Galactic longitude–latitude position $\{l,b\}$. The LoS direction $\hat{{\boldsymbol{n}}}$ from the observer to the target field position reads

Equation (1)

where $\hat{{\boldsymbol{x}}}$ is conventionally pointing from the observer to the Galactic center. In the same observer-centric Cartesian frame, we can explicitly write down two field components as

Equation (2)

Equation (3)

where l0 represents the projected direction of ${\boldsymbol{B}}$ in the $\{\hat{{\boldsymbol{x}}},\hat{{\boldsymbol{y}}}\}$ plane. Then, it is straightforward to calculate two key quantities for the calculation of synchrotron emissivity and Faraday rotation, respectively,

Equation (4)

Equation (5)

It is obvious that Faraday rotation is more sensitive to ${\boldsymbol{B}}$ at low Galactic latitudes, and to ${\boldsymbol{B}}$ at high latitudes. On the contrary, synchrotron emissivity, which is proportional to some power of $| {\boldsymbol{B}}\times \hat{{\boldsymbol{n}}}| $, is more sensitive to ${\boldsymbol{B}}$ at low Galactic latitudes and to ${\boldsymbol{B}}$ at high latitudes.

Precision checks require a baseline model for each field, from which analytic descriptions of the observables can be explicitly derived. Here we assume spatially homogeneous distributions for the CR electrons (CREs), TEs, and GMF within a given radial distance to the observer. The spectral index of the CRE energy distribution is assumed to be a constant, and consequently, the CRE density N(γ) is described by

Equation (6)

where γ represents the CRE Lorentz factor and α represents the constant spectral index of CRE. With the assumed homogeneity in all fields, we can calculate the intrinsic synchrotron total intensity I0 and polarization Stokes parameter Q0 and U0 (in the IAU convention19 ) before applying the Faraday rotation (Rybicki & Lightman 1979):

Equation (7)

Equation (8)

Equation (9)

Equation (10)

Equation (11)

where e is the electron charge, and me is the electron mass, R0 is the spherical LoS integral depth, and ν is the observational frequency. The intrinsic polarization angle χ0 can be derived from

Equation (12)

as illustrated in Figure 2. With the same modeling, the Faraday depth ϕ can be described by

Equation (13)

Equation (14)

where Ne represents the constant homogeneous TE density assumed within spherical radius R0. In the end, the observed synchrotron polarization Stokes parameters Q and U reflect the Faraday rotation as

Equation (15)

which indicates that the polarized intensity receives a correction factor $| \sin (\phi {\lambda }^{2})/(\phi {\lambda }^{2})| $ known as the Faraday depolarization. The formulae above analytically derive calculable results for reference in verifying the numerical outputs. In real applications, the magnetic field and CRE spectral index are not constant, and the methods used by hammurabi X for calculating synchrotron emissivity and Faraday rotation can be more generic, as presented in Appendix A.

Figure 2.

Figure 2. Cartoon illustration of the projection of the magnetic field ${\boldsymbol{B}}$ onto the LoS direction $\hat{{\boldsymbol{n}}}$. The definition of synchrotron intrinsic polarization angle (with north to east as the positive angle direction) is presented on the top left, the plane of the sky, with the red arrow presenting the magnetic field projected onto it.

Standard image High-resolution image

Figure 3 presents the absolute and relative numeric error distributions of the synchrotron total intensity from a single LoS integral shell. For an observable X, the absolute error is defined as the difference between the simulated output Xsim and the analytic reference Xref as (Xsim − Xref), while the relative error is defined by 2(Xsim − Xref)/(Xsim + Xref). The Faraday depth calculator shares a similar error distribution to the calculator of synchrotron total intensity. Meanwhile, Figure 4 presents the absolute and relative numeric error distributions of synchrotron Stokes Q also from a single LoS integral shell, which serves as an example for illustrating the numeric precision in calculating tensor fields. With constant field models in testing, the numeric errors are mainly induced by the integration and interpolation methods and therefore independent of the LoS resolution. Even with simple field settings, we can observe a few percent relative error appearing in Figure 4. Considering the future use of hammurabi X in inferring Galactic component structures with astrophysical measurements, if the magnitude of such numerical errors is larger than the observational uncertainties, a Bayesian analysis with hammurabi X will consequently suffer from higher uncertainties and bias in parameter estimation.

Figure 3.

Figure 3. Synchrotron Stokes I (top) at 2.4 GHz. Absolute error (middle) and relative error (bottom) are presented according to the analytic reference with B = 0 and l0 = 0. The histogram (middle left) presents the relative error distribution. The single-shell LoS integral is carried out with radial resolution set to 1% of the total radius.

Standard image High-resolution image
Figure 4.

Figure 4. Synchrotron Stokes Q (top) at 2.4 GHz, where the influence of Faraday rotation is clearly imprinted. Absolute error (middle) and relative error (bottom) are presented according to the analytic reference with B = 0 and l0 = 0. The histogram (middle left) presents the relative error distribution. The single-shell LoS integral is carried out with radial resolution set as 1% of the total radius.

Standard image High-resolution image

In terms of the multishell arrangement in real application, the output precision is affected by the spherical surface interpolation provided by the HEALPix library. The motivation of allowing different resolution settings along with the divided LoS integral shells is to save computing resources as mentioned in Planck Collaboration et al. (2016b). It is worth noticing that in the simulation, the pixel values are calculated along their central spherical coordinates. This is different from the actual astrophysical measurements where each pixel value is estimated based on many observational hits. And thus, for quickly comparing low-resolution simulation results with high-resolution data, we recommend interpolating data on the sky, accounting for simulations' sample directions, instead of downgrading data by averaging over high-resolution pixels. In this way, we avoid comparing exactly predicted values of simulation to region-averaged values of measurements. Alternatively, a very stringent simulation should be designed to mimic the true observation beams, which is computationally heavy without hammurabi's method. But even with our method, no simulation can capture reality perfectly, and the user must always be careful to test that the simulation resolution is sufficient for probing the observational property in question.

The testing cases displayed above are prepared by assuming a constant magnetic field and TE field distributions. The numerical errors would inevitably grow larger when the input Galactic components have small-scale features near or below the discretization resolution. This issue can be handled efficiently in the future by an adaptively refined mesh/pixelization.

The computationally heavy processes in hammurabi X are the LoS integration for HEALPix map pixels, the random-field generation with FFTs, and the linear interpolation for fields prepared in grids (e.g., internal random fields and other external fields). Massive observable production, HEALPix map distribution, and recycling of physical fields require MPI20 parallelization and therefore are beyond our scope in this report. In this work, multithreading is always essential at the bottom level of parallelism. Figure 5 presents the strong scaling21 in observable production with various GMF and TE field combinations. The strong scaling with either computationally heavy (with random-field generation) or light (without random-field generation) pipelines follows the Amdahl law (Amdahl 1967) with around 2% serial remnants. Note that the speedup properties are not very sensitive to the resolution setting in various simulation routines, because the workload of pure numerical operations is proportional to the discretization resolution.

Figure 5.

Figure 5. hammurabi X strong-scaling speedups in various tasks, where the subscript "reg" stands for regular fields while "rnd" stands for random fields. No bottleneck from memory access has been observed. The simulation routines are set by default to calculate synchrotron emission with Faraday rotation.

Standard image High-resolution image

3. Gaussian Random GMF

3.1. General Discussion

The realization of turbulent magnetic field is a major module in hammurabi X, as the correctness of most simulations relies on a physically motivated and accurate description of the turbulent fields in the multiphase ISM. In this section, we present two Gaussian random GMF generators that are by definition divergence-free and capable of realizing field alignment and/or strength modulation on Galactic scales or an anisotropic22 power spectrum on small scales.

There are several criteria that a random GMF generator should satisfy. That it be divergence-free (or solenoidal) is always the prime feature of any magnetic field. Absolute zero divergence is hard to define under discretization, but in principle either a vector-field decomposition or a Gram–Schmidt process in the frequency domain is capable of cleaning field divergence. In realistic cases when a large-scale spatial domain is expected to be filled with random magnetic fields, the field strength and alignment need to be correlated with the large-scale structures in the Galaxy. This requirement complicates the generating process, because the divergence-free property should also be satisfied simultaneously. It is straightforward to generate a divergence-free Gaussian random field, and equally simple to then rescale or stretch it, as done in Jaffe et al. (2010). But the reprofiling process destroys the divergence-free property if it is applied naively.

A triple Fourier transform scheme is thus proposed mainly to reconcile these two requirements. At Galactic scales, the new scheme allows modification of the Gaussian random realization by a given inhomogeneous spatial profile for the field strength. Note that aligning the magnetic field to a given direction is easy to implement in the spatial domain, but locally varying anisotropy in the energy power spectra is not feasible by a single FFT. In studies of Galactic emission from MHD plasma, the dependence of local structure on a varying direction profile breaks the symmetry required for using the FFT. To perform more detailed modeling of the turbulent GMF power spectrum, we provide a local generator ("local" in the sense that the mean field can be approximated in a uniform distribution) with explicit or implicit vector decomposition.

3.2. Power Spectrum

Consider a magnetic field distribution ${\boldsymbol{B}}({\boldsymbol{x}})$ = ${\boldsymbol{B}}$0(${\boldsymbol{x}}$) + ${\boldsymbol{b}}({\boldsymbol{x}})$ and its counterpart $\tilde{{\boldsymbol{B}}}({\boldsymbol{k}})$ in the frequency domain, where ${\boldsymbol{B}}$0 and ${\boldsymbol{b}}$ represent the regular and turbulent fields, respectively. The simplest turbulent power spectrum is represented by the trace of the isotropic magnetic field spectrum tensor in scalar form, $P(k)\propto \langle \tilde{{\boldsymbol{B}}}({\boldsymbol{k}})\cdot {\tilde{{\boldsymbol{B}}}}^{* }(k){\rangle }_{{\boldsymbol{B}}}$.23 This kind of spectrum is widely used as a first approach to the turbulent field realization where the spectral shape is important. In general, we could parameterize the basic scalar spectrum as

Equation (16)

where ${ \mathcal H }$ represents the Heaviside step function. The last term in Equation (16) represents the forward magnetic cascading of MHD turbulence from the injection scale k0 to small scales (k > k0), while the first two terms describe the inverse cascading (Pouquet et al. 1976) in MHD turbulence from k0 to scale ${k}_{1}\simeq 1/L$, which corresponds to the physical size L of the MHD system. According to the simulation results from Brandenburg et al. (2019), we set ${k}_{1}=0.1\,{\mathrm{kpc}}^{-1}$ and α1 = 0.0 by default in this work if not specified. Note that although not explicitly mentioned here, the Nyquist frequency cutoff kmax requires an extra Heaviside factor ${ \mathcal H }({k}_{\max }-k)$ in Equation (16).

In terms of more physical parameterization, we are interested in realizing theoretical descriptions of turbulence in the compressible plasma recently discussed by Cho & Lazarian (2002), Caldwell et al. (2016), and Kandel et al. (2017). In a compressible plasma, turbulence can be decomposed into Alfvén, fast, and slow modes. Two critical plasma status parameters are the ratio β and the Alfvén Mach number MA. The plasma β is the ratio of gas pressure to magnetic pressure, which represents compressibility of the plasma, with $\beta \to \infty $ indicating the incompressible regime. The Alfvén Mach number is the ratio of the injection velocity to the Alfvén velocity, with MA > 1.0 representing the super-Alfvénic regime while MA < 1.0 means sub-Alfvénic turbulence. The general form of the compressible MHD magnetic field spectrum tensor trace reads

Equation (17)

where i = {A, f, s} denotes one of the three MHD modes as described in detail in Section 4.1. In hammurabi X, compressible MHD is only realized by the local generator, thus $\cos (\alpha )=\hat{{\boldsymbol{k}}}\cdot {\hat{{\boldsymbol{B}}}}_{0}$ is adopted, with ${{\boldsymbol{B}}}_{0}$ taken as the regular field near the observer. A detailed application example of Fi and hi is presented in Section 4. Some additional information can be found in Appendix B for readers who are interested in the technical shortcuts in random-field generation and the sampling precision.

3.3. Global Random GMF Generator

One major task of hammurabi X is to generate a random GMF that can cover a specific scale in the spatial domain. However, an inhomogeneous correlation structure is not diagonal in the frequency domain. In this case, we try to impose an energy density and alignment profile in the spatial domain after the random realization is generated in the frequency domain with an isotropic spectrum. Then, the field divergence can be cleaned back in the frequency domain with the Gram–Schmidt process. The whole procedure of this scheme requires two backward and one forward FFTs.

After a Gaussian random magnetic field is realized in the frequency domain, each grid point holds a vector ${\boldsymbol{b}}$ drawn from an isotropic field dispersion. The key to the triple transform is the large-scale alignment and energy density modulation process. The alignment direction $\hat{{\boldsymbol{H}}}$ at different Galactic positions should be predefined, like the energy density profile. We introduce the alignment parameter ρ for imposing the alignment profile as

Equation (18)

Equation (19)

Equation (20)

ρ = 1.0 means no preferred alignment direction, while $\rho \to 0$ ($\rho \to \infty $) indicates extremely perpendicular (parallel) alignment with respect to $\hat{{\boldsymbol{H}}}$. (Previously, the alignment operation in hammurabi was carried out by regulating ${\boldsymbol{b}}$ only (Jaffe et al. 2010), which is phenomenologically equivalent to our approach presented here.) Note that ρ and $\hat{{\boldsymbol{H}}}$ can either be defined as a global constant or as a function of other physical quantities such as the regular magnetic field and the Galactic ISM structure (a detailed description can be found in the hammurabi X wiki page).

For regulating the field energy density, a simple example with an exponential scaling profile (which can be customized in future studies) is proposed as

Equation (21)

where (r, z) is the coordinate in the Galactic cylindrical frame, and (R, z) represents the solar position in the Galactic cylindrical frame. The energy density modulation acts on the vector-field amplitude through

Equation (22)

The above operations of reorienting, stretching, and squeezing magnetic field vectors in the spatial domain do not promise a divergence-free result. To clean the divergence, we transform the reprofiled field forward into the frequency domain and apply the Gram–Schmidt process:

Equation (23)

where $\tilde{{\boldsymbol{b}}}$ indicates the frequency-domain complex vector. The coefficient $\sqrt{3}$ is for preserving the spectral power statistically. A second backward Fourier transform is then carried out to provide the final random GMF vector distribution in the spatial domain.

Note that separating the divergence-cleaning process from spatial reprofiling comes with a cost. Strong alignment with ρ ≪ 1 or ρ ≫ 1 are not realizable because the Gram–Schmidt process reestablishes some extra spatial isotropy according to Equation (23). Figure 6 presents typical results of the global random generator in the form of magnetic field probability density distributions, where we assume a Kolmogorov power spectrum. The distributions of by and bz are expected to be identical, with the imposed alignment direction being $\hat{{\boldsymbol{H}}}=\hat{{\boldsymbol{x}}}$. Note that the global generator is designed to realize the inhomogeneity and anisotropy in both spatial and frequency domains, which we then have to process with divergence cleaning to provide conceptually acceptable realizations.

Figure 6.

Figure 6. Global random GMF probability distribution. ρ = 1.0 provides an symmetric distribution between ${b}_{x}={\boldsymbol{b}}\cdot \hat{{\boldsymbol{x}}}$ and ${b}_{y}={\boldsymbol{b}}\cdot \hat{{\boldsymbol{y}}}$. ρ = 10 corresponds to the parallel-aligned case where by is suppressed with respect to bx. ρ = 0.1 represents the perpendicular-aligned case where bx is suppressed with respect to by. ${\sigma }_{x,y}$ represents the rms of ${b}_{x,y}$.

Standard image High-resolution image

3.4. Local Random GMF Generator

A local generator is proposed to realize random GMFs in small-scale regions, like the solar neighborhood, where the regular field can be approximated as homogeneous with a uniform direction, or more precisely speaking, where the random magnetic field two-point correlation tensor can be approximated to be independent of the spatial position. With this assumption, random fields can be realized with a single FFT. Here we describe the vector decomposition method for realizing a Gaussian random magnetic field with a generic anisotropic power spectrum tensor Pij(${\boldsymbol{k}}$, α), where α represents extra parameters in addition to the wave vector. By assuming Gaussianity, the power spectrum tensor reads

Equation (24)

where $\tilde{{\boldsymbol{b}}}$ represents the complex magnetic field vectors in the frequency domain. Depending on the specific form of the given power spectrum tensor, the vector-field decomposition can be either explicit or implicit.

The implicit vector decomposition sets up two modes (vector bases) for a complex Fourier vector $\tilde{{\boldsymbol{b}}}$, which means

Equation (25)

Equation (26)

where the two orthogonal basis vectors ${\hat{{\boldsymbol{e}}}}^{\pm }$ bind with the complex scalar ${\tilde{b}}^{\pm }$ respectively. The vectors $\{{\hat{{\boldsymbol{e}}}}_{1},{\hat{{\boldsymbol{e}}}}_{2},{\hat{{\boldsymbol{e}}}}_{3}\}$ form a Cartesian frame, and to ensure the divergence-free property of the resulting fields, we choose ${\hat{{\boldsymbol{e}}}}_{3}=\hat{{\boldsymbol{k}}}$. During the Fourier transform of $\tilde{{\boldsymbol{b}}}({\boldsymbol{k}})$ into the spatial domain, we have to consider an orthogonal base aligned with the Cartesian grid of ${\boldsymbol{b}}({\boldsymbol{x}})$, and here we adopt one convenient base representation as

Equation (27)

Equation (28)

Equation (29)

where $k=\sqrt{{k}_{x}^{2}+{k}_{y}^{2}+{k}_{z}^{2}}$. Then, we can proceed by projecting the complex field amplitude into this spatial frame:

Equation (30)

where $\hat{{\boldsymbol{x}}}$ represents the spatial Cartesian coordinate. Implicit decomposition is irrelevant to the choice of $\{{{\boldsymbol{e}}}^{+},{{\boldsymbol{e}}}^{-}\}$ base and useful in the case where only the spectrum trace Tr[Pij(${\boldsymbol{k}}$)] (over the i, j indices) is given. The amplitude of ${\tilde{b}}^{\pm }$ can be drawn from Gaussian distributions with zero mean and variances ${\sigma }_{\pm }^{2}$, which satisfy

Equation (31)

with ${d}^{3}k$ representing the frequency-domain discretization resolution. Equation (31) indicates that the field amplitudes ${\tilde{b}}^{\pm }$ should have a joint power spectrum equal to the trace of the total power spectrum.

The explicit decomposition should be used when the power spectrum tensor is available along with the explicitly defined base $\{{{\boldsymbol{e}}}^{+},{{\boldsymbol{e}}}^{-}\}$, where

Equation (32)

A practical example is realizing the Alfvén, fast, and slow modes of an MHD turbulent magnetic field in a compressible plasma. Given a local regular GMF field ${\boldsymbol{B}}$0, an Alfvén wave propagates along ${\hat{{\boldsymbol{B}}}}_{0}$ with magnetic turbulence in direction ${{\boldsymbol{e}}}^{+}=\hat{{\boldsymbol{k}}}\times {\hat{{\boldsymbol{B}}}}_{0}$, while slow and fast waves generate magnetic turbulence in the direction ${{\boldsymbol{e}}}^{-}={{\boldsymbol{e}}}^{+}\times \hat{{\boldsymbol{k}}}$. A detailed parameterization of compressible MHD turbulent power spectra will be introduced in Section 4 following the corresponding references therein. Note that when the wave vector ${\boldsymbol{k}}$ is aligned with ${\boldsymbol{B}}$0, the amplitudes of the Alfvén and slow modes vanish, and the fast-mode realization requires an implicit decomposition as the base $\{{{\boldsymbol{e}}}^{+},{{\boldsymbol{e}}}^{-}\}$ is undefined.

Figure 7 presents typical examples of the distribution of the random GMF from the local generator. In comparison to the magnetic field distribution from the global generator where the spatial anisotropy is defined by the orientation alignment, the local generator is capable of realizing more subtle field properties, e.g., the spectral anisotropic MHD wave types described in Section 4. At the phenomenological level, the global generator can mimic the random magnetic field orientation alignment of the local realizations as illustrated by Figure 6 and Figure 7, but the spectral anisotropy is uniquely realizable by the local generator.

Figure 7.

Figure 7. Local random-field probability distribution with ${\hat{{\boldsymbol{B}}}}_{0}=\hat{{\boldsymbol{x}}}$, Mach number MA = 0.5, and plasma parameter β = 0.1. PA represents the Alfvén-mode power at the injection scale, while for fast and slow modes, we set equal power Pf = Ps at the injection scale. ${\sigma }_{x,y}$ represents the rms of ${b}_{x,y}$.

Standard image High-resolution image

4. Application Example

To demonstrate the usefulness of hammurabi X, we investigate the properties of simulated synchrotron emission at high Galactic latitudes according to different random magnetic field configurations. By focusing on the high-latitude sky, we concentrate on the properties of physical fields near the solar neighborhood where both global and local random generators can be applied.

Alves et al. (2016) reported a synchrotron B/E ratio24 around 0.35 at angular modes $l\in (30,300)$ (a similar result has also been reported at high Galactic latitudes by Krachmalnicoff et al. 2018), which a successful modeling of the GMF should be able to explain. Besides, a low polarization fraction at high Galactic latitudes is observed (Planck Collaboration et al. 2016a). According to recent theoretical work by Kandel et al. (2018), it may be possible to achieve a synchrotron B/E ratio lower than 1.0 at high Galactic latitudes with compressible MHD turbulence, especially with slow and/or Alfvén modes at low Mach number MA < 0.5. An analytic calculation of the angular power spectrum observed in polarized synchrotron emission is not a trivial task. As presented in theoretical estimations carried out by Caldwell et al. (2016) and Kandel et al. (2017, 2018), it is impossible to avoid a certain level of simplification, e.g., the flat-sky assumption, the Limber approximation, and the limitation of the perturbative regime. Now with the help of hammurabi X, we can approach this topic numerically without being confined by the limits in analytic work.

To avoid distractions from other Galactic components or local structure models, in the following analyses, we assume a uniform distribution for the regular GMF parallel to the Galactic disk and a homogeneous CR electron density with a fixed spectral index. No spatial modulation of the field strength is performed, but we use the ability to model the field orientation alignment described in Section 3.3. The detailed modeling of MHD turbulence is briefly presented in the following.

4.1. Parameterized MHD Turbulence

A realistic formulation of the local turbulent GMF is essential in this work, where simple random-field generators usually cannot take into account the anisotropy imprinted on the wave-vector phases of the power spectrum. The local generator we have designed in hammurabi X is capable of carrying out a theoretical parameterization of MHD turbulent modes, which have been discussed by Cho & Lazarian (2002), Caldwell et al. (2016), and Kandel et al. (2017, 2018). As described in these references, the turbulent field power spectra for Alfvén, fast, and slow modes can be formulated as

Equation (33)

Equation (34)

Equation (35)

Equation (36)

Equation (37)

Equation (38)

Equation (39)

Equation (40)

Equation (41)

where $i\in \{{\rm{A}},f,s\}$ representing Alfvén, fast, and slow modes, respectively.25 The two critical MHD parameters are the Alfvén Mach number MA and the plasma β which is the ratio of gas pressure to magnetic pressure. In the sub-Alfvénic (MA < 1) low-β (β < 1) regime, the spectral indices in Equation (34) can be approximated as δA = δs = 5/3 and δf = 3/2 (Cho & Lazarian 2002). The Alfvén speed vA, which should appear in hi(α), is absorbed by the normalization factor pi for simplicity.

4.2. High-latitude Synchrotron Emission

With the improved precision in hammurabi X, we present high-resolution Galactic synchrotron emission simulations with analytic models as described above. Presented in Figure 8 are the examples of synchrotron polarization at high Galactic latitudes predicted by a uniform regular GMF parallel to the Galactic disk and a random component from the global generator with a Kolmogorov power spectrum. Maps of synchrotron polarization from the same regular GMF but the local generator using a compressible MHD model are presented in Figure 9. Because we are presenting only illustrative models, the absolute strength of regular and random GMF is not essential here.

Figure 8.

Figure 8. 30 GHz synchrotron Stokes Q at the Galactic north pole in a 40° patch. The GMF simulation consists of a uniform regular (with orientation displayed on the bottom-left corner of each panel) and global random component with injection scale k0 = 10 kpc−1 but different alignment parameters ρ = 10 (top), ρ = 1 (middle), and ρ = 0.1 (bottom). The strength ratio between the random and regular GMF is b/B0 = 3.0.

Standard image High-resolution image
Figure 9.

Figure 9. 30 GHz synchrotron Stokes Q at the Galactic north pole in a 40° patch. The GMF simulation consists of a uniform regular (with orientation displayed on the bottom-left corner of each panel) and a local random component with total spectral power ${k}_{0}{P}_{0}/{B}_{0}^{2}=75.0$ at injection scale k0 = 10 kpc−1. The Alfvén Mach number MA = 0.5 and plasma parameter β = 0.1 are set to match the parameterization in Figure 7.

Standard image High-resolution image

The most prominent feature of the high-latitude synchrotron polarization is the quadrupolar structure that results from the GMF orientation at the solar neighborhood. As in the examples displayed in Figure 8, the quadrupole direction is largely determined by the regular field, but on top of which we can observe a flip in the polarization between the regimes when ρ > 1.0 versus ρ < 1.0. When the random GMF has no preferred alignment, i.e., the ρ = 1.0 case, the quadrupole pattern is undermined by the isotropic random-field contribution. This is visually clear because the random-field strength dominates. In Figure 9, the quadrupole pattern is well preserved with MHD turbulence injection scale k0 = 10 kpc−1, and also a flip in the polarization can be observed with the pure Alfvén mode when the random field dominates. When the spatial distribution or random GMF is close to spatially isotropic26 with PA/Pf,s = 3.0 (and Alfvén Mach number MA = 0.5, plasma parameter β = 0.1) as displayed by the top panel in Figure 7, we observe a similar trend of weakening quadrupole pattern as demonstrated by Figure 9.

The synchrotron polarization fraction (or the degree of linear polarization) is mainly determined by the CRE spectral shape when a uniformly distributed regular GMF dominates. Assuming a constant CRE spectral index α = 3.0, the synchrotron polarization fraction Π = (3α + 3)/(3α + 7) is much higher than that observed from Planck data (Planck Collaboration et al. 2016b). Figures 10 and 11 demonstrate that the synchrotron polarization fraction can be suppressed by a Gaussian random field as long as the random field is not strongly anisotropic in the spatial domain. The suppression in polarization fraction grows with increasing random-field strength but depends on the specific field modeling. Recall that the addition of a random component to the magnetic field direction functions as a random walk in the polarization plane, which means that even for a purely turbulent field, the polarized intensity continues to increase with the number of turbulent cells added along the LoS. In principle, the increase goes as the square root of the number of cells, while the total intensity increases linearly, so the fraction should decrease accordingly. In practice, the precise trend is complicated by the effect of the observational beam and the locally varying anisotropy. The shape of the polarization fraction for the ρ = 0.5 model in Figure 10, for example, is due to the anisotropic random field canceling with the regular field before beginning to dominate. An inhomogeneous distribution (by field strength modulation) of the random field can change the efficiency of suppression differently depending on the field alignment, but the common features described above are preserved.

Figure 10.

Figure 10. Distribution of synchrotron polarization fraction Π at high Galactic latitudes produced by a uniform regular and global random GMF. In the top panel, the distribution (16th–68th percentile) characterized by the mean and standard deviation as a function of random-field strength is displayed, where the alignment ratio is fixed. In the bottom panel, we show a histogram of the polarization fraction, where b/B0 = 3.0 and the alignment parameter ρ varies. Recall that ρ = 1 is isotropic while ρ < 1 and ρ > 1 are anisotropic.

Standard image High-resolution image
Figure 11.

Figure 11. Distribution of the synchrotron polarization fraction Π at high Galactic latitudes produced by uniform regular and local random GMF. In the top panel, the distribution (16th–68th percentile) characterized by the mean and standard deviation as a function of random-field strength is displayed, where the anisotropy ratio ${P}_{{\rm{A}}}/{P}_{f,s}$ is fixed at the injection scale ${k}_{0}=10\,{\mathrm{kpc}}^{-1}$ while the ratio between the total spectral power P0 = Pf + Ps + PA at the injection scale and the regular field energy ${P}_{0}/{B}_{0}^{2}$ varies. In the bottom panel, ${k}_{0}{P}_{0}/{B}_{0}^{2}=75.0$, while the anisotropy ratio ${P}_{{\rm{A}}}/{P}_{f,s}$ varies.

Standard image High-resolution image

The above analyses imply that interpreting the synchrotron polarization toward the poles as due to the local field direction ignores the possible effects of anisotropic turbulence, which can mimic or flip the morphology. Though the physical process is different, the geometry of the field and its effect on the observables is the same for polarized dust emission. This work illustrates the opportunity for retrieving useful information on the local magnetic turbulence structure with high-latitude Galactic polarized emission and also shows the challenge from the degeneracy between random and regular magnetic field orientations when using emission data alone. It suggests that we need to be careful about realizing the local GMF structure to avoid misleading conclusions. For example, it has been proposed recently by Alves et al. (2018) that according to observations, the regular magnetic field structure may play a dominant role in Galactic dust emission near the solar neighborhood. We also emphasize that the Galactic synchrotron emission is also affected by the warm ISM in the Galactic thick disk and even the halo. The random-field generators in hammurabi X can be used to bridge the gap between simple large-scale field models and computationally intensive MHD simulations, and push toward more realistic analysis and modeling than previous methods.

4.3. Angular Power Spectrum

The large angular scale Galactic synchrotron polarization pattern driven mainly by the GMF orientation at the solar neighborhood is quite evident as illustrated in Figures 8 and 9. However, the small angular structures can be analyzed with the angular power spectrum, which can be decomposed by rotation-invariant components, i.e., the T, E, and B modes (Hu & White 1997a). With the two random-field generators proposed in this work, we intend to figure out which properties of the random GMF are imprinted on the synchrotron B/E ratio. Specifically, we are interested in verifying whether MHD turbulence modes are capable of producing B/E < 1.0 in both the perturbative and the nonperturbative regimes. Because we are focusing on high-latitude polarization, pixels at Galactic latitude within ±60° are masked out. We also set a lower limit to the radius in the LoS integral according to the random-field grid resolution and the spherical mode range. Technical details of the precision checks for the pseudo-C estimation are discussed in Appendix C.

We present in Figure 12 the B/E ratio distribution (by collecting results from an ensemble of realizations with each given parameter set) for varying random-field strengths and alignments of the global random GMF. Figure 12 implies that to reproduce B/E < 1.0, we either need random GMF in the nonperturbative regime (b/B0 > 1.0) or parallel alignment (ρ > 1.0). We also note that the divergence-cleaning step is what leads to $B/E\ne 1.0$. As illustrated in the same figure, all realizations end up with B/E = 1.0 regardless of random-field alignment, when the Gram–Schmidt process is switched off. This is expected given that a simple Gaussian random field should have E = B on average, whereas a magnetic field must be divergence-free and therefore the difference between the naive random vector field and the magnetic field, which has been ignored in many previous analyses, is crucial in studying Galactic emissions. Now we conclude that the divergence-free random magnetic field can provide synchrotron ${\text{}}B/{\text{}}E\ne 1.0$. The Gram–Schmidt cleaning method is computationally useful and correct for reproducing the divergence-free random magnetic field (which in the simplest case can alternatively be obtained from a Gaussian random vector potential as shown in Appendix D, where synchrotron B/E < 1 arises naturally out of either method in the nonperturbative regime) and has the added benefit that we can spatially modulate its strength and orientation.

Figure 12.

Figure 12. Distribution (16th–68th percentile) of the 30 GHz synchrotron emission B/E ratio for  > 100 according to global random GMF with various field strengths and alignments. The ensemble size is set as 10 independent realizations at each sampling position, beyond which we found no significant improvement in the B/E estimation. The results marked by "GS off" come from random GMF without divergence cleaning. The contribution to the angular power spectrum from the regular GMF has been subtracted, which would otherwise dominate the B/E ratio in the perturbative regime (b B0).

Standard image High-resolution image

By contrast, the C estimated from the local MHD realizations have a clear analytic representation, to which simulations can be directly compared. To look for the low B/E ratio according to Kandel et al. (2018), we keep the random GMF strength at the perturbative level and tune the MHD Mach number MA = 0.2 and plasma parameter β = 0.1. As illustrated in Figure 13, we find clear evidence that a Gaussian realization of MHD turbulence can provide a synchrotron B/E ratio smaller than 1.0, in both perturbative and nonperturbative regimes. The fast mode in a sub-Alfvénic low-β plasma has a unique power spectrum shape and is less affected by the anisotropy function h(α) than the slow mode. By assuming equal power in the turbulence modes at the injection scale, the observed angular power spectra are mainly influenced by the fast mode and so the B/E ratio has a different behavior for the case where slow and Alfvén modes dominate. With the given MHD Mach number and plasma parameter, slow-mode turbulence results in a much lower B/E ratio than that from the Alfvén mode, while fast mode prefers B/E ≃ 0.8 in the perturbative regime. These features are conceptually consistent with analytic predictions by Kandel et al. (2018) as demonstrated in the top panel of Figure 13, where the differences between two estimations are likely because of the simplification in analytic derivation, e.g., the Limber and flat-sky approximations. Beyond the perturbative regime, we observe that the B/E ratio evolves with the growth of the random-field strength and suggests an upper limit for the random-field strength to achieve the observed B/E ratio with solely MHD turbulence.

Figure 13.

Figure 13. Distribution (16th–68th percentile) of the 30 GHz synchrotron emission B/E ratio for  > 100 according to the local GMF realizations with various field strengths, Alfvén Mach numbers, and plasma parameters. The ensemble size is set as 10 independent realizations at each sampling position, beyond which we found no significant improvement in the B/E estimation. Solid lines in the top panel are predictions from Kandel et al. (2018). The fast+slow+Alfvén case sets equal magnetic field power at the injection scale for the three modes (i.e., ${P}_{{\rm{A}}}/{P}_{f,s}=1.0$), while the fast mode is excluded from the slow+Alfvén case (i.e., ${P}_{s}={P}_{{\rm{A}}}$). The contribution to the angular power spectrum from the regular GMF has been subtracted, which would otherwise dominate the B/E ratio in the perturbative regime (${k}_{0}{P}_{0}\ll {B}_{0}^{2}$).

Standard image High-resolution image

The observational implications of the Galactic synchrotron emission from the above two types of random-field realizations are that both the divergence-free and MHD turbulent nature of the field are important for producing synchrotron B/E < 1.0 (aside from the fact that the divergence-free condition is physically required). It is possible to use directly the angular power spectra estimated in the way presented here for studying Galactic components like the work by Vansyngel et al. (2018), but we should be aware of the numeric uncertainty if the simulation resolution is lower than that of astrophysical measurements, in addition to the fundamental difference between simulation and observation mentioned in Section 2.

5. Summary

In this report, we have presented hammurabi X, the improved version of hammurabi. We have redesigned the package properly with calibrated precision and multithreading support. This report focuses on the implementation of the synchrotron emission simulation in hammurabi X and its relation to the random magnetic field realization. The technical features and profiles associated with Galactic synchrotron emission have been, for the first time, reported in detail.

Two fast methods for generating divergence-free Gaussian random magnetic fields covering either Galactic scales or a local region have been proposed. This is a crucial improvement (in computing accuracy and the capability of realizing physical features) over not only the previous versions of hammurabi but also previous fast methods of simulating the GMF and the resulting diffuse Galactic polarized emission from the ISM. It is increasingly clear that simplistic treatments of the turbulent component of the ISM do not produce simulated observables of sufficient complexity to be useful in comparison to the data. Though full MHD turbulence realizations are computationally too expensive for the use in large-scale GMF model fitting, using the statistical properties of these MHD simulations is an important intermediate step pursued here. The new hammurabi X provides the ability, for the first time, to generate Gaussian simulations that capture some of the properties of the fast, slow, and Alvén modes of MHD turbulence in a computationally efficient approximation. Using these more realistic numerical methods for simulating the magnetized ISM will lead to results that can be more directly linked to physical theory.

We have further demonstrated the importance of these improvements by studying two properties of the GMF that have been discussed in the literature. First, we have shown the importance of including a treatment of the anisotropic turbulence in the local ISM when attempting to interpret high-latitude synchrotron polarization as an indication of the local magnetic field direction. Any such modeling of the local field can use hammurabi X to quantify how much this affects the results, particularly with the addition of Faraday depth to break the degeneracy of using only polarized diffuse emission. Second, using our new numerical methods, we have found that a Gaussian random realization with either the global field orientation alignment or the local MHD parameterization can produce B/E ≃ 0.35 in synchrotron emission at high Galactic latitudes. Comparing the B/E ratio predicted by the global random GMF realizations with and without invoking the Gram–Schmidt process, we have realized that the divergence-free property is essential for such detailed statistical studies of GMFs. Our results conceptually confirm the prediction made by Kandel et al. (2018) for Galactic synchrotron emission, which says the MHD magnetic turbulence has the ability to predict B/E < 1.0, while the prediction for dust emission B/E ratio has been conceptually confirmed by Kritsuk et al. (2018). We have also succeeded in demonstrating the computing power that hammurabi X can provide to go beyond analytic studies of Galactic foreground observables with nonperturbative random GMF realizations.

In the near future, we would like to focus on improving the random GMF generators with more physical features. The alignment of the random GMF around local filaments (including helicity) and non-Gaussianity will be interesting extensions, through which we can study the joint effect of the magnetic field alignment and its spectral anisotropy. In hammurabi X, both the global and local generators are designed to allow in the future the addition of non-Gaussianity, e.g., with the method introduced by Vio et al. (2001); helicity, e.g., with the method instructed by Kitaura & Enßlin (2008); and more realistic modeling, e.g., with local filaments studied by Bracco et al. (2018). We intend to extend hammurabi X for further studies of Galactic Faraday rotation, dust emission, and free–free absorption by including (where possible) the coupling between the random GMF and the TE and dust distributions implemented in similarly calibrated numeric implementations.

We thank Theo Steininger and Joe Taylor for their contribution in the software development; Sebastian Hutschenreuter for his feedback in using hammurabi X; Christopher J. Anderson for his instructions in using NaMaster; and Dinesh Kandel, Alexandre Lazarian, and Dmitri Pogosian for sharing their numerical results. J.W. appreciates the pleasant and inspiring discussions with Davide Poletti, Yang Liu, François Boulanger, and Anvar Shukurov. We also thank the anonymous referee for constructive comments.

The hammurabi X project arose and has received support from the IMAGINE27 meetings hosted by the International Space Science Institute in 2014 and 2015, the Lorentz Center in 2017, and Radboud University in 2019.

The numerical computation is supported by the HPC service and the MHPC program of SISSA. This work is also partially supported by the National Science Foundation of China (11621303, 11653003, 11773021, 11835009, 11890691), the National Key R&D Program of China (2018YFA0404601, 2018YFA0404504), the 111 project, and the CAS Interdisciplinary Innovation Team (JCTD- 2019-05).

Appendix A: Synchrotron Emission

In this section, we present the basic mathematical formulae adopted in calculating polarized synchrotron emission and Faraday rotation. The method is defined not only for analytic modeling of the CRE flux but also for an input grid of dimension 3 + 1 imported from external binary files, where the spectral dimension is defined by a logarithmic sampling of electron energy. This matches the output convention in CR transport simulators like Galprop (Strong & Moskalenko 1998) and DRAGON (Evoli et al. 2017).

A.1. Radiative Transfer

With the CRE differential flux distribution Φ(E, ${\boldsymbol{r}}$), synchrotron total and polarized emissivities at a given observational frequency ν and spatial position ${\boldsymbol{r}}$ read

Equation (42)

where ${P}_{\mathrm{tot}/\mathrm{pol}}(\omega )$, which represents the emission power from one electron at frequency ν = ω/2π, is calculated (Rybicki & Lightman 1979) through synchrotron functions $F(x)\,=x{\int }_{x}^{\infty }{K}_{\tfrac{5}{3}}(\xi )d\xi $ and $G(x)={{xK}}_{\tfrac{2}{3}}(x)$ (with ${K}_{\tfrac{5}{3}}(x)$ and ${K}_{\tfrac{2}{3}}(x)$ known as two of the modified Bessel functions of the second kind) as

Equation (43)

Equation (44)

where e is the electron charge, me the electron mass, and Bper (defined as $| {\boldsymbol{B}}\times \hat{{\boldsymbol{n}}}| $ in Section 2) represents the strength of the magnetic field projected in the direction perpendicular to the LoS direction. Statistically, we assume that the synchrotron emission at a given position is isotropic, and so an observer only receives 1/4π of the emission power, which explains the 1/4π coefficient in front of the right-hand-side in Equation (42). In addition, we place an extra 2π before ${P}_{\mathrm{tot}/\mathrm{pol}}(\omega )$, due to the relation P(ν) = 2πP(ω). The term $\tfrac{4\pi }{\beta c}{\rm{\Phi }}(E,{\boldsymbol{r}})$, with β representing the relativistic speed, is actually N(E, ${\boldsymbol{r}}$), the CRE differential density.

In practice, the CRE spectral integral can be achieved in two technically different approaches with the same theoretical origin. If given a numerical CRE flux information Φ(E) prepared on a discrete grid, the integral Equation (42) can be directly evaluated by the numerical integral. Alternatively, we can start with an analytic differential density distribution $N(\gamma ,{\boldsymbol{r}})=4\pi {\rm{\Phi }}(E,{\boldsymbol{r}}){m}_{{\rm{e}}}c/\beta $, and by doing so, Equation (42) reads

Equation (45)

The reason for keeping Equation (45) as an alternative method is to calculate the integral analytically once the CRE spectral index is constant at any given position as illustrated in Section 2. The detailed derivation follows the auxiliary definition of

Equation (46)

Equation (47)

Then, by assuming $N(\gamma )={N}_{0}{\gamma }^{-\alpha }$, Equation (45) ends up in the form of

Equation (48)

Equation (49)

where the spectral integrals can be analytically calculated by using

Equation (50)

Equation (51)

Figure 14 illustrates the dependence of the synchrotron total emissivity Ttot and polarized emissivity Tpol on the CRE energy, with varying magnetic field strengths, observational frequencies, and CRE spectral shapes. The peaks in emissivities are inherited from F(x) and G(x), where the dimensionless parameter x is the ratio of the observational frequency to the CRE gyrofrequency.

Figure 14.

Figure 14. Differential synchrotron total and polarized emissivities (djtot/dE and djpol/dE converted into brightness temperature) of CRE, which follows the simple power-law spectrum ∝γα. The magnetic field strength and observational frequency are given.

Standard image High-resolution image

In this work, we focus on simulating synchrotron emission at the GHz level, for which the Galactic environment is optically thin (Rybicki & Lightman 1979; Schlickeiser 2002), and so we ignore both synchrotron self-absorption and free–free absorption. For readers who might be confused with the synchrotron emissivity calculation formulae presented above, please turn to the hammurabi X wiki page for more technical details.

A.2. Faraday Rotation

Faraday rotation describes the phenomenological manifestation of the refractive index difference in the polarization directions for photons that propagate through a plasma with an external magnetic field. For a linearly polarized photon emitted with wavelength λ and intrinsic polarization angle χ0, the observed polarization angle after traversing distance s0 is

Equation (52)

where ϕ, the Faraday depth, reads

Equation (53)

where $\hat{{\boldsymbol{p}}}$ represents the photon propagation direction and Ne represents the distribution of TE density. Note that the IAU convention28 for polarization is adopted in hammurabi X, which means that the intrinsic synchrotron polarization angle is determined by the polarization ellipse semimajor axis perpendicular to magnetic field orientation. Under Faraday rotation at a given observational frequency ν, the observed emission accumulates Stokes parameters dQ and dU over a distance s0 by

Equation (54)

where ${{dI}}_{\nu }^{p}$ represents the polarized intensity in the radial bin $[{s}_{0},{s}_{0}+{ds}]$. Though Faraday rotation brings in extra information about the TE distribution, a relatively high observational frequency is sometimes preferred for studying synchrotron emission, e.g., 30 GHz in this report, to suppress the complicated effects of TE turbulence, which will be addressed in our future studies with hammurabi X.

Appendix B: Precision of Random GMF Generation

In the random GMF generators described in Section 3, we are not using three independent FFTs for 3D vector fields. A straightforward approach to vector-field FFT would be carrying out three independent transformations separately. However, that is expensive in general where the operations are only limited to transforms between real and complex values. A special speedup design that provides computational efficiency is to compress the three real scalar fields into two complex scalar fields.

Suppose that in the ξ domain we have two complex scalar fields ${c}_{0}({\boldsymbol{\xi }})$ and ${c}_{1}({\boldsymbol{\xi }})$, which are compressed from three real scalar fields ${b}_{x}({\boldsymbol{\xi }})$, ${b}_{y}({\boldsymbol{\xi }})$, and ${b}_{z}({\boldsymbol{\xi }})$ by defining

Equation (55)

Equation (56)

Then, mathematically, we know their reciprocal-domain counterparts should be

Equation (57)

Equation (58)

Because the transform is done between real and complex fields, complex conjugate symmetry gives a useful property:

Equation (59)

Equation (60)

from which we can recover vector fields ${\tilde{b}}_{x}({\boldsymbol{\eta }})$, ${\tilde{b}}_{y}({\boldsymbol{\eta }})$, and ${\tilde{b}}_{z}({\boldsymbol{\eta }})$ in the reciprocal domain. This method is applied in both the global and local turbulent GMF generators to reduce the computational cost.

In the FFTs of both the global and local generators, the numeric field ${\boldsymbol{b}}({\boldsymbol{x}})$ is calculated according to its frequency-domain counterpart as

Equation (61)

Dimensional analysis requires the variance of $\tilde{{\boldsymbol{b}}}({\boldsymbol{k}})$ in the form

Equation (62)

which in turn satisfies the definition of energy density:

Equation (63)

where kmax represents the Nyquist frequency. The precision of the power spectrum as represented on the spatial grid can be visualized by comparing the theoretical and numerical energy densities from field realizations. As illustrated with examples in Figure 15, the convergence toward higher grid resolution demonstrates the correctness of the numeric implementations.

Figure 15.

Figure 15. Examples of the relative difference between the theoretical and numerical energy densities in random GMF realizations. The numerical energy density of each parameter set is evaluated from an ensemble of field samples. A higher precision is achieved with better spatial resolution represented by N (with the simulation box size L = N/2kmax), the number of sample points in each grid dimension.

Standard image High-resolution image

Appendix C: Precision of Pseudo-${C}_{{\ell }}$ Estimation

In this work, the C are estimated from an ensemble of simulations with the NaMaster 29 toolkit (Alonso et al. 2019). Figure 16 provides some extra information about the pseudo-C estimation we used. The isolatitude masks used here include the one applied in Section 4.3, which corresponds to the 60° masking limit in the right panel of Figure 16. To analyze partial-sky observables with the isolatitude masks with masking limit lower than 70° and Gaussian-smoothed apodization, we empirically choose the band-power binning width Δ  = 16 according to the width of the window function. The regular magnetic field assumed in this work induces a strong large angular synchrotron polarization. The symmetry of this synchrotron polarization results in the suppression of the odd angular modes in the power spectrum. In the left and middle panels of Figure 16, the even and odd modes are joined, and the light- and dark-gray shaded regions represent the E- and B-mode C due to the symmetric synchrotron polarization without any masking. In the presence of a random magnetic field, this suppression of odd harmonics persists at low and intermediate  values but goes away at high .

Figure 16.

Figure 16. Left and middle: C estimated according to global random magnetic fields with ρ = 10.0 but different strengths. The thick gray spectra (dashed and dotted–dashed) correspond to the uniform regular magnetic field as defined in Section 4. The light- and dark-gray shadow solid spectra are from a uniform regular magnetic field but estimated from a full-sky map. The shadow areas are actually effects of vanished odd angular modes from the full-sky power spectrum estimation. The solid colored curves are the estimated pseudo-C from simulated (partial-sky) outputs, while the square markers with error bars are the estimated pseudo-C after the regular field contribution is subtracted in the pixel domain. Note that overlap between spectra happens at relative high angular modes. Right: one realization of Stokes Q and U maps (according only to the global random magnetic field with ρ = 10.0) and the corresponding B/E ratio estimated by NaMaster with various isolatitude masks. During testing, we find out that setting 10 independent realizations in each simulation ensemble is sufficient for getting unbiased estimations.

Standard image High-resolution image

In case of a partial-sky coverage with a small sky fraction, like the case considered here, pseudo-C estimation cannot be done without binning. However, the suppression of odd harmonics is a complication for pseudo-C estimators like NaMaster. A pseudo-C estimate of the symmetric polarization due to the regular magnetic field alone is shown in the gray dashed and dashed–dotted curves in the first two panels of Figure 16. These do not agree with the full-sky power spectrum.

The presence of large-scale symmetry in the polarization presents a critical problem for the pseudo-C estimation by NaMaster, for the total polarization signal produced by the regular and random fields together. This may be seen from the solid red/orange and blue/green curves for the E- and B-mode pseudo-C estimates in the first two panels of Figure 16. These show the identical problem to the plots without a random magnetic field on the partial sky. To avoid this problem, in pixel space we subtract the polarization signal produced by the regular magnetic field alone from the total polarization signal. Fortunately, in the illustrative examples, the regular fields are homogeneously defined and so it is feasible and safe to subtract the contribution from the regular magnetic field in the pixel domain. We then proceed to use NaMaster on these "corrected" polarization maps. (This is also performed for Figures 12, 13, and 17 as mentioned in the caption.) The pseudo-C estimates for this "corrected" case are shown in the first two panels of Figure 16 with red/orange and blue/green data points for the E- and B-mode pseudo-C estimates respectively. We also show the error bars of the reconstruction from 10 independent simulations. We restrict our analysis to  > 100 modes. Note that this correction process only removes the contribution that comes from the regular GMF on its own, i.e., it preserves the polarization signal produced by the cross term between the regular and random fields.

Figure 17.

Figure 17. Angular power spectra of Faraday depth estimated on thin shells with central radial distance R and width ΔR = 0.1 kpc. Dotted lines represent estimations made with the Limber approximation (Equation (73)) while dashed lines represent predictions according to the numeric integral of the spherical Bessel function (Equation (72)). The angular power contributed by regular fields has been subtracted.

Standard image High-resolution image

We also tried the masking with various latitude limits, as demonstrated in the right panel of Figure 16 (where the random magnetic field is generated by the global generator with alignment ratio ρ = 10), and the B/E ratio estimations are consistent (with larger uncertainty according to smaller sky fraction).

Now we have verified the methods in calculating the synchrotron polarization in Section 2, the random-field realization in Section 3, and the C in Figure 16. To further confirm the correctness of the simulated results obtained in Section 4, a conceptual verification is necessary. An analytic approach toward generating the angular power spectrum of tensor fields is not easy and is also beyond our scope. Alternatively, the shape of the Faraday depth angular power spectrum can be inferred from simplified settings of the fields, which serves as a proper check of the random-field realization and the angular mode accumulation in the LoS integral.

To begin with, we adopt the total angular momentum method introduced by Hu & White (1997b) and Hu (2000). Synchrotron polarization $P(r,\hat{{\boldsymbol{n}}})=Q\pm {iU}$ from a given geocentric position ${\boldsymbol{r}}=-r\hat{{\boldsymbol{n}}}$ can be expanded in a polarization basis as

Equation (64)

where for the spin-2 tensor field the basis reads

Equation (65)

where ${}_{s}{Y}_{{\ell }}^{m}(\hat{{\boldsymbol{n}}})$ is the spherical harmonic function for a spin-s field. The standard path toward the angular power spectrum E-mode ${C}_{{\ell }}^{{EE}}$ and B-mode ${C}_{{\ell }}^{{BB}}$ starts from interpreting the LoS integral of a target foreground observable with base ${}_{\pm 2}{G}_{{\ell }}^{m}$ and leads to evaluating

Equation (66)

In the simplest case, we consider only emission sources while ignoring absorption and Faraday rotation, i.e., for a synchrotron polarization tensor ${P}_{\nu }(r,\hat{{\boldsymbol{n}}})$ at observational frequency ν,

Equation (67)

where the basic formulae for polarized emissivity jpol and intrinsic polarization angle χ0 have been discussed in Appendix A. We would thus expect the integral solution to become

Equation (68)

Equation (69)

where the source terms are determined by

Equation (70)

It is however not trivial (and thus is commonly avoided without further simplification) to analytically bridge the random GMF and its contribution to synchrotron emissivity expanded in a spherical harmonic basis. Fortunately, Faraday depth is a different story, as the LoS projection of a divergence-free vector field ${\boldsymbol{b}}$ $({\boldsymbol{k}})$ can be represented as

Equation (71)

where the wave vector ${\boldsymbol{k}}$ differs from that in the random-field realization by a factor of 2π. (Instead of using the total angular momentum method, a similar approximation to the rotation measure structure function has been carried out by Xu & Zhang 2016, which leads to the same conclusion.) The procedure we take for Faraday depth follows the same method for the Doppler effect handled by Hu (2000), where the linear perturbation and Limber approximations (LoVerde & Afshordi 2008) are key assumptions. By assuming a uniformly distributed TE field, we isolate the perturbation source of Faraday depth in the vector mode (m = ±1), which results in the angular power spectrum

Equation (72)

where Pb is the power spectrum of random GMF. By applying the Limber approximation (which assumes that the typical scale of LoS variation of a perturbed field is much larger than that in the angular direction), we have

Equation (73)

which suggests the shape of ${C}_{{\ell }}^{{FF}}$ is mainly determined by Pb.

Figure 17 presents a comparison of the simulation precision with respect to the analytic prediction. For the highest spherical mode max in analysis and for a random-field grid bin of length h, the lower radial limit is roughly set as ${R}_{\min }\geqslant h{{\ell }}_{\max }/\pi $. Regions closer than Rmin or modes above max are greatly affected by the grid interpolation and may affect the pseudo-C estimation. The upper radial limit is defined by the simulation size L within which the random GMF is generated, and ${R}_{\max }\leqslant L{{\ell }}_{\min }/\pi $ should be satisfied. The LoS radius limits discussed here do not influence the conclusions about the B/E ratio but only affect the precision in estimating C. To achieve the highest precision without being distracted by the effects of a multishell arrangement, the simulations are done with single-shell integrals. The default simulation and output resolutions are identically set as Nside = 128 unless specified. The random-field grid by default is built large enough to host a radial integral with LoS depth Rmax ≃ 4 kpc from the observer with field sampling resolution h ≃ 3 pc (which means kmax ≃ 300 kpc−1) and radial resolution r ≃ 5 pc, except that in this appendix we use thin shells with 0.1 kpc thickness and much lower sampling resolution (kmax < 100 kpc−1). With a sharp cutoff at an injection scale k0 in the random GMF models (by ignoring the inverse cascading), we expect a corresponding break in the angular power spectrum at c ∼ 2πRmaxk0. The break position is well recovered independently of the simulation resolution on each thin LoS shell. The power in angular modes below and above the break c is affected differently by the spherical and sampling resolution. For  < c, the angular resolution (characterized by HEALPix Nside) has a dominant influence, suggesting that a larger angular resolution is necessary for more distant shells to suppress the angular power excess, while for  > c, the missing angular power (particularly for shells closer to the observer) results from insufficient sampling resolution (characterized by the Nyquist frequency kmax) in the random-field realization, especially near the observer. Although the illustrations are prepared with the global random GMF generator, the resolution effects discussed above are generic. Insufficient angular or Galactic component sampling resolution will result in missing power in the angular power spectra from simulation outputs. This issue can in principle be handled by using an inhomogeneous grid or adaptively refined mesh with non-equispaced FFT (Keiner et al. 2009) for sampling Galactic components (especially the turbulent fields), and also adaptively refined spherical pixelization. An alternative solution can be nesting sampling grids with different resolutions, but the precision loss on the boundary should be carefully estimated and controlled. Now with our theoretically verified Faraday depth anisotropy, we can conclude that our numeric realizations of Gaussian random fields are accurate, and thus that the results regarding the B/E ratio obtained from synchrotron emission simulations should be free from numeric defects.

Appendix D: Divergence-cleaning Verification

In Section 3.3, we introduced a fast algorithm for generating global random GMFs with divergence cleaning independent of a random sampling of magnetic field vectors in the frequency domain. To verify the influence of the divergence cleaning on the default global random generator, here we propose an alternative algorithm for generating a global Gaussian random GMF by starting with the Gaussian random realizations of the magnetic potential field ${\boldsymbol{A}}({\boldsymbol{x}})$. Knowing that a random magnetic field ${\boldsymbol{b}}({\boldsymbol{x}})$ can be defined by its potential ${\boldsymbol{A}}({\boldsymbol{x}})$, in the frequency domain, we have

Equation (74)

which ensures ${\rm{\nabla }}\times {\boldsymbol{b}}({\boldsymbol{x}})=0$ and so alternatively provides divergence-free random magnetic fields which we can compare to our divergence cleaning using a Gram–Schmidt process. Note that in this verification, we impose neither spatial field strength modulation nor orientation alignment, which corresponds to the ρ = 1.0 case in the default global generator. Figure 18 illustrates that the two methods of generating divergence-free random magnetic fields produce equivalent statistical properties of the resulting polarized synchrotron emission. We have noticed that B/E depends on the ratio between the strength of the random and regular magnetic fields (independent of the simulation resolution), as illustrated not only by Figure 18 here but also by Figures 12 and 13. This is not predictable by analytic calculations when the random-field strength is gradually moving out of the perturbative regime, and it is one of the major advantages and motivations of using hammurabi X for the future studies.

Figure 18.

Figure 18. Distribution (16th–68th percentile) of the 30 GHz synchrotron emission B/E ratio for  > 100 according to the global random GMF with various random-field strengths. The ensemble size is set as 10 independent realizations at each sampling position, beyond which we found no significant improvement in the B/E estimation. The results marked by "default" come from the default algorithm discussed in Section 3.3, while "alternative" indicates random GMF generated from the magnetic potential field realizations. The contribution to the angular power spectrum from the regular GMF has been subtracted, which would otherwise dominate the B/E ratio in the perturbative regime (bB0).

Standard image High-resolution image

Footnotes

  • 10 

    Acronyms used in the text: CR (cosmic ray), CMBR (cosmic microwave background radiation), FFT (fast Fourier transform), GMF (Galactic magnetic field), ISM (interstellar medium), LoS (line of sight), MHD (magnetohydrodynamics), TE (thermal electron).

  • 11 
  • 12 

    This report focuses on the Galactic synchrotron emission, while the report for simulating thermal dust emission with hammurabi X is under preparation.

  • 13 

    hammurabi X is available in the repository https://bitbucket.org/hammurabicode/hamx, with detailed documentation. Recently, hammurabi X was used to generate extra-Galactic Faraday rotation maps from primordial magnetic fields in Hutschenreuter et al. (2018).

  • 14 

    Nside means the number of full-sky pixels is $12{N}_{\mathrm{side}}^{2}$.

  • 15 

    The local region means any small-scale spatial domain where the mean magnetic field can be treated or approximated as a uniform distribution. This implies that the local generator cannot be applied to realize large-scale random magnetic fields, which are typically handled by the global generator. In Section 4, we will present and analyze local realizations at the solar neighborhood as an example.

  • 16 
  • 17 

    If we estimate the divergence by the finite difference in the spatial domain, the precision exponentially improves as a function of the number of sample points in each direction.

  • 18 

    The hammurabi X wiki page https://bitbucket.org/hammurabicode/hamx/wiki/Home presents detailed verification, performance and precision profiles, implementation methods, and online documentation.

  • 19 

    Detailed description for IAU and CMB polarization conventions can be found at https://lambda.gsfc.nasa.gov/product/about/pol_convention.cfm.

  • 20 

    Message Passing Interface (MPI) is a standardized and portable message-passing standard designed by a group of researchers from academia and industry to function on a wide variety of parallel computing architectures.

  • 21 

    Strong scaling is defined as how the solution time varies with the number of processors for a fixed total problem size.

  • 22 

    In this work, spatially anisotropic random GMF means it is locally aligned either parallel or perpendicular to a preferred direction (e.g., by alignment parameter ρ in the global random GMF generator), while spectral anisotropy means the anisotropy in the frequency domain (usually due to an anisotropic power spectrum, e.g., the MHD turbulent magnetic field). We emphasize that in a local MHD turbulent magnetic field realization, the spectral anisotropy results in a spatially anisotropic distribution.

  • 23 

    $\langle ...{\rangle }_{{\boldsymbol{B}}}$ means an ensemble average over all ${\boldsymbol{B}}$-field realizations.

  • 24 

    The ratio between the Bmode and the E mode of the synchrotron angular power spectrum, i.e., ${C}_{{\ell }}^{{BB}}/{C}_{{\ell }}^{{EE}}$.

  • 25 

    In this work, the subscript A represents Alfvén, f represents fast, and s represents slow.

  • 26 

    The local generator has no field alignment parameter like ρ = 1.0 that can ensure an absolutely spatially isotropic distribution with respect to ${\boldsymbol{B}}$0.

  • 27 

    Homepage of the IMAGINE consortium: https://www.astro.ru.nl/imagine/index.html.

  • 28 

    Detailed descriptions for the different IAU and CMB polarization conventions can be found at https://lambda.gsfc.nasa.gov/product/about/pol_convention.cfm.

  • 29 
Please wait… references are loading.
10.3847/1538-4365/ab72a2