I am now developing a python module for ms2 database searching, would like to realize a function that similar to what Xcalibur did, choose multiple mass spectra and get an averaged spectra. But how this realized and what is the process behind. Tried linear interpolation and a method that firstly do peak picking followed by peak alignment, but none of them can produce the results similar to Xcalibur, does anyone have some clue?