Skip to main content

Single-molecule pulling analysis package

Project description

tweezepy

This is tweezepy, a package of single-molecule pulling experiment related analysis code.

How to install

The simplest method of installing the tweezepy package is via the Python Package Index (PyPI). To install from PyPI, you will need to be able to run python from the command line and make sure you have pip available.

With pip:

pip install tweezepy

An alternative method to install tweezepy is with setuptools. Clone the repository onto a local machine, then navigate to the directory.

Using setuptools:

cd path/to/tweezepy

python setup.py install

Contents

The tweezepy package includes the following modules:

  • 'smmcalibration' - tool to determine force of probe trajectories by calculating and performing maximum likelihood estimation fits to power spectral density and allan variance
  • 'simulations' - tool to simulate single-molecule probe trajectories

Example use:

Simulate data:

>>> import matplotlib.pyplot as plt
>>> from tweezepy.simulations import downsampled_trace
>>> alpha,kappa,fsample,N = 1e-5,.001,400,10240
>>> xtrace = downsampled_trace(alpha,kappa,fsample,N)
>>> plt.plot(xtrace)
>>> plt.show()

Power spectral density:

>>> from tweezepy.smmcalibration import PSD
>>> psd = PSD(xtrace,fsample)
>>> pars,errs,covs = psd.mlefit()
>>> psd.plot()

Allan variance:

>>> from tweezepy.smmcalibration import AV
>>> av = AV(xtrace,fsample)
>>> pars,errs,covs = av.mlefit()
>>> av.plot()

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

tweezepy-0.1.7.tar.gz (6.5 kB view hashes)

Uploaded Source

Built Distribution

tweezepy-0.1.7-py3-none-any.whl (18.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page