locan.analysis.subpixel_bias.SubpixelBias¶
- class locan.analysis.subpixel_bias.SubpixelBias(meta=None, pixel_size=None)[source]¶
Bases:
_AnalysisCheck 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) – A dataframe with localization coordinates.
Methods
__init__([meta, pixel_size])compute(locdata)Run the computation.
hist([ax, bins, log])Provide histogram as
matplotlib.axes.Axesobject showing hist(results).report(*args, **kwargs)Show a report about analysis results.
Attributes
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.Axesobject showing hist(results). Nan entries are ignored.- Parameters:
ax (
Axes|None) – The axes on which to show the imagebins (
int|Sequence[int|float] |str) – Bin specifications (passed tomatplotlib.hist()).log (
bool) – Flag for plotting on a log scale.kwargs (
Any) – Other parameters passed tomatplotlib.pyplot.hist().
- Returns:
Axes object with the plot.
- Return type:
matplotlib.axes.Axes