The luna library is designed to support large-scale objective studies of sleep. It supports EDF(+) data and XML annotations, and offers efficient handling, filtering and manipulation of data, a range of spectral analysis routines and spindle detection methods, and visualization of raw data.
See the documentation site for more details.