  Our universe is homogeneous and isotropic, and its perturbations obey
translation and rotation symmetry. In this work we develop Translation and
Rotation Equivariant Normalizing Flow (TRENF), a generative Normalizing Flow
(NF) model which explicitly incorporates these symmetries, defining the data
likelihood via a sequence of Fourier space-based convolutions and pixel-wise
nonlinear transforms. TRENF gives direct access to the high dimensional data
likelihood p(x|y) as a function of the labels y, such as cosmological
parameters. In contrast to traditional analyses based on summary statistics,
the NF approach has no loss of information since it preserves the full
dimensionality of the data. On Gaussian random fields, the TRENF likelihood
agrees well with the analytical expression and saturates the Fisher information
content in the labels y. On nonlinear cosmological overdensity fields from
N-body simulations, TRENF leads to significant improvements in constraining
power over the standard power spectrum summary statistic. TRENF is also a
generative model of the data, and we show that TRENF samples agree well with
the N-body simulations it trained on, and that the inverse mapping of the data
agrees well with a Gaussian white noise both visually and on various summary
statistics: when this is perfectly achieved the resulting p(x|y) likelihood
analysis becomes optimal. Finally, we develop a generalization of this model
that can handle effects that break the symmetry of the data, such as the survey
mask, which enables likelihood analysis on data without periodic boundaries.
