  In this fourth article on weighing the Galactic disk using the shape of the
phase-space spiral, we have tested our method on a billion particle
three-dimensional N-body simulation, comprised of a Milky Way like host galaxy
and a merging dwarf satellite. The main purpose of this work was to test the
validity of our model's fundamental assumptions that the spiral inhabits a
locally static and vertically separable gravitational potential. These
assumptions might be compromised in the complex kinematic system of a disturbed
three-dimensional disk galaxy; in fact, the statistical uncertainty and any
potential biases related to these assumptions are expected to be amplified for
this simulation, which differs from the Milky Way in that it is more strongly
perturbed and has a phase-space spiral that inhabits higher vertical energies.
We constructed 44 separate data samples from different spatial locations in the
simulated host galaxy. Our method produced accurate results for the vertical
gravitational potential of these 44 data samples, with an unbiased distribution
of errors with a standard deviation of 7 %. We also tested our method under
severe and unknown spatially dependent selection effects, also with robust
results; this sets it apart from traditional dynamical mass measurements that
are based on the assumption of a steady state and which are highly sensitive to
unknown or poorly modelled incompleteness. Hence, we will be able to make
localised mass measurements of distant regions in the Milky Way disk, which
would otherwise be compromised by complex and poorly understood selection
effects.
