Skip to content

Commit 00e1228

Browse files
kalidkeclaude
andauthored
Fix frame numbering to be 1-based throughout package (#29)
* Add API overview documentation and functionality - Introduced `api_overview.md` for comprehensive API documentation. - Implemented `api.jl` to load and return API overview content. * Fix frame numbering to be 1-based throughout package - Change default frame values from 0 to 1 in Emitter2DFit and Emitter3DFit constructors - Update tests to expect frame=1 as default value - Update API overview documentation to reflect 1-based frame numbering - Add CLAUDE.md file for future development guidance - Frame numbering now follows Julia's 1-based indexing convention 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Bump version to 0.3.0 for breaking change in frame numbering Frame numbering is now 1-based by default, which is a breaking change from the previous 0-based default. This follows semantic versioning for breaking changes in the 0.x series. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 410bd01 commit 00e1228

File tree

7 files changed

+980
-395
lines changed

7 files changed

+980
-395
lines changed

CLAUDE.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Package Overview
6+
7+
SMLMData.jl is a Julia package for handling Single Molecule Localization Microscopy (SMLM) data. It provides types for representing fluorophore localizations, camera geometries, and complete SMLM datasets, along with tools for coordinate conversion, filtering, and I/O operations.
8+
9+
## Development Commands
10+
11+
### Running Tests
12+
```bash
13+
# Full test suite
14+
julia --project=. -e 'using Pkg; Pkg.test()'
15+
16+
# Direct test execution
17+
julia --project=. test/runtests.jl
18+
19+
# Single test file
20+
julia --project=. test/test_emitters.jl
21+
```
22+
23+
### Building Documentation
24+
```bash
25+
# Build and open documentation
26+
julia dev/build_docs.jl
27+
```
28+
29+
### Package Management
30+
```bash
31+
# Install dependencies
32+
julia --project=. -e 'using Pkg; Pkg.instantiate()'
33+
34+
# Update dependencies
35+
julia --project=. -e 'using Pkg; Pkg.update()'
36+
```
37+
38+
## Architecture
39+
40+
### Type Hierarchy
41+
- **Abstract Types**: `AbstractEmitter`, `AbstractCamera`, `SMLD` define interfaces
42+
- **Emitter Types**: `Emitter2D`, `Emitter3D`, `Emitter2DFit`, `Emitter3DFit` represent localizations
43+
- **Container Types**: `BasicSMLD`, `SmiteSMLD` store collections of emitters
44+
- **Camera Types**: `IdealCamera` defines pixel-to-physical coordinate mapping
45+
46+
### Core Modules
47+
1. **Coordinates** (`src/core/coordinates.jl`): Conversions between pixel and physical coordinates
48+
2. **Filters** (`src/core/filters.jl`): `@filter` macro and spatial/temporal selection functions
49+
3. **Operations** (`src/core/operations.jl`): Dataset concatenation and merging
50+
4. **I/O** (`src/io/smite/`): SMITE format support for MATLAB interoperability
51+
52+
### Key Design Patterns
53+
- All spatial coordinates are in microns
54+
- Parametric types `{T}` for numeric precision flexibility
55+
- Immutable structs for basic types, mutable for fit results
56+
- Operations return new SMLD objects (functional style)
57+
- Macro-based filtering syntax for intuitive API
58+
59+
### Testing Structure
60+
Tests are organized by component in separate files:
61+
- `test_emitters.jl`: Emitter type tests
62+
- `test_cameras.jl`: Camera and coordinate tests
63+
- `test_smld.jl`: Container type tests
64+
- `test_filters.jl`: Filtering functionality
65+
- `test_operations.jl`: Dataset operations
66+
- `test_smite.jl`: SMITE format I/O
67+
68+
All tests use `@testset` blocks for organization and run via `runtests.jl`.

Project.toml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
name = "SMLMData"
2-
uuid = "5488f106-40b8-4660-84c5-84a168990d1b"
3-
authors = ["klidke@unm.edu"]
4-
version = "0.2.3"
5-
6-
[deps]
7-
MAT = "23992714-dd62-5051-b70f-ba57cb901cac"
8-
9-
[compat]
10-
MAT = "0.10"
11-
julia = "1.9"
12-
13-
[extras]
14-
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
15-
16-
[targets]
17-
test = ["Test"]
1+
name = "SMLMData"
2+
uuid = "5488f106-40b8-4660-84c5-84a168990d1b"
3+
authors = ["klidke@unm.edu"]
4+
version = "0.3.0"
5+
6+
[deps]
7+
MAT = "23992714-dd62-5051-b70f-ba57cb901cac"
8+
9+
[compat]
10+
MAT = "0.10"
11+
julia = "1.9"
12+
13+
[extras]
14+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
15+
16+
[targets]
17+
test = ["Test"]

0 commit comments

Comments
 (0)