locan.analysis.subpixel_bias.SubpixelBias#

class locan.analysis.subpixel_bias.SubpixelBias(meta=None, pixel_size=None)[source]#

Bases: _Analysis

Check for subpixel bias by computing the modulo of localization coordinates for each localization’s spatial coordinate in locdata.

Parameters:
  • meta (locan.analysis.metadata_analysis_pb2.AMetadata | None) – Metadata about the current analysis routine.

  • pixel_size (int | float | Sequence[int | float]) – Camera pixel size in coordinate units.

Variables:
  • count (int) – A counter for counting instantiations.

  • parameter (dict) – A dictionary with all settings for the current computation.

  • meta (locan.analysis.metadata_analysis_pb2.AMetadata) – Metadata about the current analysis routine.

  • results (pandas.DataFrame) – The number of localizations per frame or the number of localizations per frame normalized to region_measure(hull).

Methods

__init__([meta, pixel_size])

compute(locdata)

Run the computation.

hist([ax, bins, log])

Provide histogram as matplotlib.axes.Axes object showing hist(results).

report(*args, **kwargs)

Show a report about analysis results.

Attributes

count

A counter for counting Analysis class instantiations (class attribute).

compute(locdata)[source]#

Run the computation.

Parameters:

locdata (LocData) – Localization data.

Return type:

Self

count: int = 0#

A counter for counting Analysis class instantiations (class attribute).

hist(ax=None, bins='auto', log=True, **kwargs)[source]#

Provide histogram as matplotlib.axes.Axes object showing hist(results). Nan entries are ignored.

Parameters:
  • ax (Optional[Axes]) – The axes on which to show the image

  • bins (int | Sequence[int | float] | str) – Bin specifications (passed to matplotlib.hist()).

  • log (bool) – Flag for plotting on a log scale.

  • kwargs (Any) – Other parameters passed to matplotlib.pyplot.hist().

Returns:

Axes object with the plot.

Return type:

matplotlib.axes.Axes