  We use Kuiper's test to detect periodicities in X-ray and gamma-ray
observations. Like Rayleigh's test, it uses the individual photon arrival
times, and is therefore well suited to the analysis of faint sources. Our
method makes it possible to take into account the discontinuities in the
observation, and to completely get rid of the contamination that results from
them. This makes it particularly adapted to the search of periods long compared
to the total observation duration. We propose a semi-analytical approach to
determine the effective number of trial frequencies when searching for unknown
periods over a frequency range. This approach can be easily adapted to other
tests. We show that, using Kuiper's test, we can recover periods in frequency
domains where other tests are completely confused by contamination. We finally
search the entire ROSAT Position-Sensitive Proportional Counter (PSPC) archive
for long periods, and find 28 new periodic-source candidates.
