em_map_utils.map_line_projections

map_line_projections.py

Author:

Ardan Patwardhan

Affiliation:

EMBL-EBI, Wellcome Genome Campus, CB10 1SD, UK

Date:

04/08/2025

Description:

Create orthogonal line projections from a map.

Attributes

Classes

Classes

MapLineProjections

Class to create orthogonal line projections from a map.

Module Contents

em_map_utils.map_line_projections.logger
class em_map_utils.map_line_projections.MapLineProjections(map_grid)

Class to create orthogonal line projections from a map.

PERM_IDX
static fit_exp4_func(x, a, b, c, d)

Fitting function y = a * exp(-b * (x - c)^4) + d :param x: x value for calculation of fitting function. :param a: Scale factor. :param b: Scaling of exponential. :param c: Centre x of exponential. :param d: Baseline offset of exponential. :return: Function evaluated at x.

fit_exp4()

Fit fit_exp4_func to the 3 line projections. :return: Fitted profiles to the 3 line projections.

cumulative_profile_width(threshold=0.005)

Determine the cumulative profile of each of the 3 line proj- ections. Then determine the indices where the profile crosses T and 1 -T where T is some threshold value. The width is then taken as the difference between these indices.

Parameters:

threshold – Threshold value for width calculation.

Returns:

Array of 3 widths.

plot(fig_title=None, fig_size=(18, 6))

Plot line projections and corresponding fitted curves.

Parameters:
  • fig_title – Figure title.

  • fig_size – Figure size.

Returns:

Tuple of figure and axes objects..

map_grid
coords
map_prof
min
max
range
sum
cent_coords
variance
sigma
two_sigma
cum_prof_width
prof_fit = None
em_map_utils.map_line_projections.parser