deeptrack.extras.radialcenter Module#

Radial center calculation function

This module provides a function to calculate the center location of a given intensity distribution.

Key Features#

  • Gradient-based analysis with least-squares method.

    Uses intensity gradients to determine the radial symmetry of 2D intensity distributions.

  • Flexible output

    Allows inversion of the axis based on user preference.

Module Structure#

Functions:

  • radialcenter: Calculates the center of a 2D intensity distribution.

Example#

Calculate center of an image containing randomly generated Gaussian blur.

>>> from deeptrack.extras import radialcenter as rc
>>> linspace = np.linspace(-10, 10, 100)
>>> gaussian = np.exp(-0.5 * (
...            linspace[:, None] ** 2 + linspace[None, :] ** 2)
...        )
>>> intensity_map = np.random.normal(0, 0.005, (100, 100))
>>> x, y = rc.radialcenter(gaussian_blur)
>>> print(f"Center of distribution = {x}, {y}")

Python implementation by Benjamin Midtvedt, University of Gothenburg, 2020 Copyright 2011-2012, Raghuveer Parthasarathy, The University of Oregon

Disclaimer / License
This program is free software: you can redistribute it and/or

modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This set of programs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License (gpl.txt) along with this program.

Raghuveer Parthasarathy The University of Oregon August 21, 2011 (begun) last modified Apr. 6, 2012 (minor change) Copyright 2011-2012, Raghuveer Parthasarathy

Functions#

radialcenter(I[, invert_xy])

Calculates the center of a 2D intensity distribution.