  We introduce Zurich Atmosphere Purge (ZAP), an approach to sky subtraction
based on principal component analysis (PCA) that we have developed for the
Multi Unit Spectrographic Explorer (MUSE) integral field spectrograph. ZAP
employs filtering and data segmentation to enhance the inherent capabilities of
PCA for sky subtraction. Extensive testing shows that ZAP reduces sky emission
residuals while robustly preserving the flux and line shapes of astronomical
sources. The method works in a variety of observational situations from sparse
fields with a low density of sources to filled fields in which the target
source fills the field of view. With the inclusion of both of these situations
the method is generally applicable to many different science cases and should
also be useful for other instrumentation. ZAP is available for download at
http://muse-vlt.eu/science/tools.
