refine_tracks_gaussian

lumicks.pylake.refine_tracks_gaussian

refine_tracks_gaussian(tracks, window, refine_missing_frames, overlap_strategy, initial_sigma=None, fixed_background=None)

Refine the tracks by gaussian peak MLE.

Parameters:
  • tracks (List[KymoTrack] or KymoTrackGroup) – Detected tracks on a kymograph.

  • window (int) – Number of pixels on either side of the estimated track to include in the optimization data. The fitting window should be large enough to capture the tails of the gaussian PSF, but ideally small enough such that it will not include data from nearby tracks.

  • refine_missing_frames (bool) – Whether to estimate location for frames which were missed in initial peak finding.

  • overlap_strategy ({'multiple', 'ignore', 'skip'}) –

    How to deal with frames in which the fitting window of two KymoTrack’s overlap.

    • ’multiple’ : fit the peaks simultaneously (deprecated, use simultaneous instead).

    • ’simultaneous’ : fit the peaks simultaneously with estimation bounds between peaks.

    • ’ignore’ : do nothing, fit the frame as-is (ignoring overlaps).

    • ’skip’ : skip optimization of the frame; remove from returned KymoTrack.

  • initial_sigma (float) – Initial guess for the sigma parameter.

  • fixed_background (float) – Fixed background parameter in photons per second. When supplied, the background is not estimated but fixed at this value.