Skip to main content

PyPhotoMol

Tests codecov Docs

Welcome to PyPhotoMol, a python-package to analyse mass photometry data.

Features

  • Data Import: Import HDF5 (.h5) and csv mass photometry data files, generated by Refeyn instruments (https://refeyn.com).
  • Histogram Analysis: Create histograms of mass or contrast distributions
  • Peak Detection: Automated peak finding in histograms using peak height, distance and prominence
  • Mass-Contrast Conversion: Convert between mass and contrast with calibration parameters
  • Gaussian Fitting: Fit multiple Gaussians to the histogram data
  • Comprehensive Logging: Track all operations with logbooks

Installation

PyPhotoMol requires Python 3.12 or later.

Install PyPhotoMol from PyPI with pip:

pip install pyphotomol

Verify the installation:

import pyphotomol
print(pyphotomol.__version__)

For development, clone the repository and install with uv:

git clone https://github.com/osvalB/pyphotomol.git
cd pyphotomol
uv sync --extra dev

Run tests and build the documentation:

uv run pytest
uv run build_docs.py

Quick Start

from pyphotomol import PyPhotoMol

# Create a new analysis instance
model = PyPhotoMol()

# Import data from an HDF5 file
model.import_file('data.h5')

# Create a histogram and detect peaks
model.create_histogram(use_masses=True, window=[0, 1000], bin_width=10)
model.guess_peaks(min_height=10, min_distance=4, prominence=4)

# Fit Gaussian models to detected peaks
model.fit_histogram(
    peaks_guess=model.peaks_guess,
    mean_tolerance=200,
    std_tolerance=300
)

# Create and view results
model.create_fit_table()
print(model.fit_table)

Acknowledgements

PyPhotoMol is derived from PhotoMol, an online tool presented in the following publication:

Niebling, Stephan, et al. "Biophysical Screening Pipeline for Cryo-EM Grid Preparation of Membrane Proteins." Frontiers in Molecular Biosciences 9 (2022): 903148.

Download files

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

Source Distribution

pyphotomol-1.0.1.tar.gz (30.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyphotomol-1.0.1-py3-none-any.whl (33.2 kB view details)

Uploaded Python 3

File details

Details for the file pyphotomol-1.0.1.tar.gz.

File metadata

  • Download URL: pyphotomol-1.0.1.tar.gz
  • Upload date:
  • Size: 30.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pyphotomol-1.0.1.tar.gz
Algorithm Hash digest
SHA256 c4c898f1882e621a5a13e8fd03e174c13506bd2178c0af453beaa1b7a904157d
MD5 8f99276dcfe25533d8179fd1f23ff6b5
BLAKE2b-256 ff7b5445a740edf1bff5cd5f264ec762fc7caf81e693e7d165e5a95202029add

See more details on using hashes here.

File details

Details for the file pyphotomol-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyphotomol-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 33.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pyphotomol-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e9dde2e6053ccee92c4e62264ad2c01a7d8f996d4546959325f6fb6c2a138161
MD5 021ea74789e4a5625bed6917c6149ab1
BLAKE2b-256 7f4b6645b6139138ac2d1962e933e210472cd1b1a2dd6f38f8d6a9bf8c67bdd1

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 files

1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page