Skip to main content

msalign: Signal calibration and alignment by reference peaks

Project description

msalign - signal calibration and alignment

Build Status

This package was inspired by MATLAB's msalign function which allows alignment of multiple signals to reference peaks.


pip install msalign


pip install git+


Usage is relatively straightforward. Simply import the function msalign from the package and provide xvals, zvals and peaks. Other parameters can be passed-in using kwargs.

import numpy as np
from msalign import msalign

fname = r"./example_data/msalign_test_data.csv"
data = np.genfromtxt(fname, delimiter=",")
xvals = data[1:, 0]
zvals = data[1:, 1:].T

peaks = [3991.4, 4598, 7964, 9160]
kwargs = dict(
    weights=[60, 100, 60, 100], 
    shift_range=[-100, 100],

zvals_new = msalign(xvals, zvals, peaks, **kwargs)


Monchamp, P., Andrade-Cetto, L., Zhang, J.Y., and Henson, R. (2007) Signal Processing Methods for Mass Spectrometry. In Systems Bioinformatics: An Engineering Case-Based Approach, G. Alterovitz and M.F. Ramoni, eds. Artech House Publishers).

MATLAB's msalign

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

msalign-0.0.6.tar.gz (5.7 kB view hashes)

Uploaded source

Built Distribution

msalign-0.0.6-py2.py3-none-any.whl (9.9 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page