@@ -11,7 +11,7 @@ following the tuple-pattern convention: (primary_output, info).
1111Metadata and intermediate results from simulation functions.
1212
1313# Fields
14- - `elapsed_ns::UInt64 `: Wall-clock time for simulation in nanoseconds
14+ - `elapsed_s::Float64 `: Wall-clock time for simulation in seconds
1515- `backend::Symbol`: Computation backend (`:cpu`)
1616- `device_id::Int`: Device identifier (-1 for CPU)
1717- `seed::Union{UInt64, Nothing}`: RNG seed for reproducibility (if applicable)
@@ -25,7 +25,7 @@ Metadata and intermediate results from simulation functions.
2525# Example
2626```julia
2727smld_noisy, info = simulate(params)
28- println("Simulation took \$ (info.elapsed_ns / 1e9 ) seconds")
28+ println("Simulation took \$ (info.elapsed_s ) seconds")
2929println("Generated \$ (info.n_localizations) localizations from \$ (info.n_emitters) emitters")
3030
3131# Access intermediate results for analysis
3636"""
3737struct SimInfo
3838 # Common fields (ecosystem convention)
39- elapsed_ns :: UInt64
39+ elapsed_s :: Float64
4040 backend:: Symbol
4141 device_id:: Int
4242
5656
5757# Convenience constructor with defaults
5858function SimInfo(;
59- elapsed_ns :: UInt64 = UInt64( 0 ) ,
59+ elapsed_s :: Float64 = 0.0 ,
6060 backend:: Symbol = :cpu,
6161 device_id:: Int = - 1 ,
6262 seed:: Union{UInt64, Nothing} = nothing ,
@@ -67,7 +67,7 @@ function SimInfo(;
6767 n_localizations:: Int = 0 ,
6868 n_frames:: Int = 0
6969)
70- SimInfo(elapsed_ns , backend, device_id, seed, smld_true, smld_model,
70+ SimInfo(elapsed_s , backend, device_id, seed, smld_true, smld_model,
7171 n_patterns, n_emitters, n_localizations, n_frames)
7272end
7373
7777Metadata from image generation functions.
7878
7979# Fields
80- - `elapsed_ns::UInt64 `: Wall-clock time for image generation in nanoseconds
80+ - `elapsed_s::Float64 `: Wall-clock time for image generation in seconds
8181- `backend::Symbol`: Computation backend (`:cpu`)
8282- `device_id::Int`: Device identifier (-1 for CPU)
8383- `frames_generated::Int`: Number of frames generated
@@ -87,13 +87,13 @@ Metadata from image generation functions.
8787# Example
8888```julia
8989images, info = gen_images(smld, psf)
90- println("Generated \$ (info.frames_generated) frames in \$ (info.elapsed_ns / 1e9 ) seconds")
90+ println("Generated \$ (info.frames_generated) frames in \$ (info.elapsed_s ) seconds")
9191println("Total photons: \$ (info.n_photons_total)")
9292```
9393"""
9494struct ImageInfo
9595 # Common fields
96- elapsed_ns :: UInt64
96+ elapsed_s :: Float64
9797 backend:: Symbol
9898 device_id:: Int
9999
@@ -105,12 +105,12 @@ end
105105
106106# Convenience constructor with defaults
107107function ImageInfo(;
108- elapsed_ns :: UInt64 = UInt64( 0 ) ,
108+ elapsed_s :: Float64 = 0.0 ,
109109 backend:: Symbol = :cpu,
110110 device_id:: Int = - 1 ,
111111 frames_generated:: Int = 0 ,
112112 n_photons_total:: Float64 = 0.0 ,
113113 output_size:: Tuple{Int,Int,Int} = (0 ,0 ,0 )
114114)
115- ImageInfo(elapsed_ns , backend, device_id, frames_generated, n_photons_total, output_size)
115+ ImageInfo(elapsed_s , backend, device_id, frames_generated, n_photons_total, output_size)
116116end
0 commit comments