Skip to content

Add tuple-pattern return, ConnectConfig, and API improvements#10

Closed
kalidke wants to merge 11 commits intofeature/smlmdata-0.6-compatfrom
feature/tuple-pattern
Closed

Add tuple-pattern return, ConnectConfig, and API improvements#10
kalidke wants to merge 11 commits intofeature/smlmdata-0.6-compatfrom
feature/tuple-pattern

Conversation

@kalidke
Copy link
Member

@kalidke kalidke commented Feb 2, 2026

Summary

  • BREAKING: frameconnect() now returns (combined, info) tuple instead of NamedTuple
  • Add ConnectInfo struct with track assignments and algorithm metadata
  • Add ConnectConfig struct for reusable configuration (kwargs also supported)
  • Full covariance propagation for SMLMData 0.6 compatibility
  • Capture timing with elapsed_s field (Float64 seconds)
  • Include counts: n_input, n_tracks, n_combined, n_preclusters
  • Rate parameters accessible via info.k_on, info.k_off, etc.
  • Bump version to 0.5.0

New API

# Two calling conventions
(combined, info) = frameconnect(smld; maxframegap=10)           # kwargs
(combined, info) = frameconnect(smld, ConnectConfig(maxframegap=10))  # config

# Access results
combined::BasicSMLD           # Main output - combined localizations
info.connected::BasicSMLD     # Input with track_id assigned
info.n_input                  # Number of input localizations
info.n_tracks                 # Number of tracks formed
info.n_combined               # Number of output localizations
info.elapsed_s                # Wall time in seconds
info.k_on, info.k_off         # Estimated rate parameters

ConnectConfig Fields

Field Default Description
nnearestclusters 2 Nearest preclusters for local density estimation
nsigmadev 5.0 Sigma multiplier for preclustering distance threshold
maxframegap 5 Maximum frame gap for temporal adjacency
nmaxnn 2 Maximum nearest-neighbors for precluster membership

Test plan

  • All 115 tests pass
  • Both calling conventions verified equivalent
  • Documentation updated (README.md, api_overview.md)

🤖 Generated with Claude Code

kalidke and others added 5 commits February 1, 2026 17:37
BREAKING: frameconnect() now returns (combined, info) instead of NamedTuple

- Add ConnectInfo struct with track assignments and algorithm metadata
- Capture timing with elapsed_ns field
- Include n_input, n_tracks, n_combined, n_preclusters counts
- Rate parameters (k_on, k_off, k_bleach, p_miss) accessible via info
- Update all tests, examples, and documentation
- Bump version to 0.4.0

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add ConnectConfig with @kwdef for algorithm parameters
- Support both calling conventions:
  - frameconnect(smld, config::ConnectConfig)
  - frameconnect(smld; kwargs...) forwards to config form
- Export ConnectConfig from module
- All 115 tests pass

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- README: Add Configuration section with kwargs and config struct examples
- api_overview: Add ConnectConfig type, update frameconnect signatures

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@kalidke kalidke changed the title Add tuple-pattern return type for frameconnect() Add tuple-pattern return, ConnectConfig, and API improvements Feb 4, 2026
kalidke and others added 6 commits February 6, 2026 09:43
ConnectConfig <: AbstractSMLMConfig, ConnectInfo <: AbstractSMLMInfo
from SMLMData v0.6.0 (feature/tuple-pattern c366f68).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ctInfo

Namespace-qualified type names across struct definitions, exports,
tests, docs, README, and api_overview.md. Zero old names remain.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove dev/path dependency override. SMLMData now resolves from
General registry as v0.7.0 (requires AbstractSMLMConfig/Info types).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Renames: nnearestclusters→n_density_neighbors, nsigmadev→max_sigma_dist,
maxframegap→max_frame_gap, nmaxnn→max_neighbors, initialdensity→initial_density.
Also removes redundant `using SMLMData` from doc examples (re-exported).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
actions/cache v1 was deprecated by GitHub, causing immediate CI failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kalidke kalidke closed this Feb 8, 2026
@kalidke kalidke deleted the feature/tuple-pattern branch February 8, 2026 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant