Removing Milky Way from airglow images using principal component analysis