We develop a method to perform an untargeted Bayesian search for anisotropic
gravitational-wave backgrounds that can efficiently and accurately reconstruct
the background intensity map. Our method employs an analytic marginalization of
the posterior of the spherical-harmonic components of the intensity map,
without assuming the background possesses any specific angular structure. The
key idea is to realize that the likelihood function is a multivariable Gaussian
of the spherical-harmonic components of the energy spectrum of the
gravitational-wave background. If a uniform and wide prior of these
spherical-harmonic components is prescribed, the marginalized posterior and the
Bayes factor can be well approximated by a high-dimensional Gaussian integral.
The analytical marginalization allows us to regard the spherical-harmonic
components of the intensity map of the background as free parameters, and to
construct their individual marginalized posterior distribution in a reasonable
time, even though many spherical-harmonic components are required. The
marginalized posteriors can, in turn, be used to accurately construct the
intensity map of the background. By applying our method to mock data, we show
that we can recover precisely the angular structures of various simulated
anisotropic backgrounds, without assuming prior knowledge of the relation
between the spherical-harmonic components predicted by a given model. Our
method allows us to bypass the time-consuming numerical sampling of a
high-dimensional posterior, leading to a more model-independent and untargeted
Bayesian measurement of the angular structures of the gravitational-wave
background.Comment: 22 pages, 6 figure