Field-mean diagnostics recover platform-specific base R overflow on finite maximum-valued frames. Finite diagnostic means remain unchanged; stored stack validation, trend ratios and mesh diagnostics retain their contracts.
Temporal summaries now condition each pixel separately, preserving dim pixels beside unrelated bright pixels. Raw input means no longer overflow merely because their intermediate sum does. The existing statistical definitions and result schemas are unchanged.
Numerical errors now identify lost nonzero contributions, products and averages within a pixel. Such extreme dynamic ranges are refused rather than silently returning zero; this is not an exact-arithmetic guarantee. The temporal allocation estimate includes the additional work arrays.
The explorer exports 17 significant decimal digits and imports numeric fields without the platform-dependent base R decimal scanner. Signed profiles retain negative values and accurately label their normalization. Numbers-only text imports explicitly reject comment rows.
The portable qualification kit transports matrices as explicit little-endian binary64 files, alongside the existing high-precision CSV records, so decimal parsing cannot change the tested input on different platforms. The bounded numerical thresholds and known high-order limitations remain unchanged.
This release collects every development version since 0.1.0 (0.1.0.9000 to 0.1.0.9005); 0.1.0 itself was never tagged.
mssr_r_rev3, which replaces mssr_r_rev2 of 0.1.0
and the earlier mssr_r_rev1. The bundled fixture values are unchanged, but
final rounding can differ. mssr_settings() refuses to replay records of the
older engines, since no engine migration is inferred; mssr_validate_result()
and mssr_read_result() keep their engine identity.mssr_mask() requires fraction; it has no default any more. The former
default of 0.5 selected exact zeros on typical maps and so mostly gave masks
decided by tie-breaking; callers now choose the share, ideally below the
share of positive map values.mssr_temporal() computes temporal statistics of per-frame MSSR maps
(temporal MSSR, article Fig. 7a and Supplementary Note 5.2) with the
definitions of Supplementary Table S2: mean, population variance, TPM (the
squared frame sum, M^2 * mean^2), the supplement's "CV" (Var / Mean, an
index of dispersion that takes the sign of the mean) and lagged, signed SOFI
cumulants of orders 2 to 4, optionally as absolute values. mssr_stack()
stores the per-frame maps so that several statistics need MSSR only once per
frame. Statistics are formed from centered deviations in a power-of-two scaled
range; the stored and recomputed computation paths give the same values.
There is no default statistic, and no resolution gain is implied: the help
and vignette("temporal") describe spurious splitting, the effect of sparse
dim data and of slow trends, and the sub-pixel grid of amplified data. The
"SOFI" of the authors' Python, MATLAB and Fiji tools uses zero-lag or absolute
deviations and is a different statistic; the method concordance lists the
differences. Fourier interpolation is not implemented.mesh_index, the sub-pixel grid measured on
signal-free input pixels (strictly below the median of the raw temporal
mean, or a supplied background mask), with mesh_region and mesh_pixels
naming the pixels used, and trend, the raw intensity of the last tenth of
the frames relative to the first tenth. Both are diagnostics only. The mesh
index is formed only on the default grid = "extent", uses absolute values
for the SOFI statistics, and is labelled "below_median_stack" for a frame
subset of an mssr_stack, whose stored raw mean covers all its frames.
background therefore requires amp > 1 on the extent grid and is refused
with a classed error otherwise.mssr_stack() refuses maps above 2 GiB (with that margin)
unless max_memory_bytes allows them; for an mssr_stack,
max_memory_bytes limits the reduction's buffers. A temporal statistic that
would underflow to zero is refused like one that overflows.mssr_validate_result(),
mssr_write_result(), mssr_read_result(), mssr_settings(), summary()
and print() handle them. Single-frame results keep schema 1.0.0, and files
written by earlier versions still read.mssr_estimate_resources() gains frames and statistic and then also
estimates the stored and recomputed paths of a temporal call.mssr_r_rev3 uses internal power-of-two scaling, centered interpolation
and weighted local differences to reduce overflow, underflow and cancellation.
Existing expected fixture values are unchanged. Background subtraction is
still a distinct preprocessing choice; higher-order MSSR is not invariant to
additive background.mssr_r_rev3 (range normalizer and
weighted mean shift) now run in compiled C code. They form the same sums in
the same order as before and round every product before adding it, so
results agree with the R passes to within 1e-12 of the map maximum; whether
they are bitwise identical depends on the platform and the R version, since
R's own exp() can differ from the system's in the last bit. The R passes
are kept as an internal reference, and the tests and the qualification kit
compare the two. No offset stack is held in memory, so peak memory falls,
and frames run about 2 to 4 times faster; the gain grows with the
neighborhood size, and the
remaining time is mostly the weight's exponential. The computation stays
single-threaded and can still be interrupted. The engine identity is
unchanged; the package version identifies the implementation."zero refinement map"
instead of an unflagged all-zero map.mssr_estimate_resources() uses a model recalibrated on the compiled engine
(whole_frame_buffers_v2): it was two to eight times too high and now
exceeded every measured peak on the calibration ladder by 30 to 220 percent.
The default budget of mssr_batch() is now 2 GiB, so ordinary 1024 x 1024
frames at amplification 2 are no longer refused.summary() of a result prints a short report; the returned list keeps its
fields and gains the output grid.mssr_mask() warns (class mssrscopR_warning_mask_ties) when tie-breaking
chose more than half of the selected pixels or the lowest selected score is
at most 1e-6 of the highest, that is, when the mask reaches beyond the
structure the map shows. The README, vignette and help examples now use a
share below the positive part of the map and explain tie_fraction and
cut_relative. The app keeps its own inline message for this case.?mssr and the README
now say that amplified maps are not expected to agree pixel-wise with the
authors' code, even with grid = "endpoint", which reproduces their sample
positions.fwhm below the true PSF.fwhm: prefer a measured PSF, since a theoretical value
describes an ideal system; under noise a too-small fwhm adds false peaks and
a larger one weakens the separation of close sources, so when unsure choose
the larger plausible value. Only the kernel half-size enters the computation.fwhm documentation says that a larger value than the PSF's FWHM
enlarges the neighborhood and gives smoother maps with fewer fragments, and
that MSSR maps are visual aids, not a basis for segmentation or
quantification.Input qualification rejects explicit numeric classes before arithmetic;
finite intermediate overflow raises mssrscopR_error_numerical.
Result consumers validate matrix dimensions, finiteness and grid metadata.
Positive mask fractions always select at least one pixel; rounding only absorbs machine-precision noise near integer quotas. High-range amplified scores are averaged without overflowing into artificial ties.
Additional synthetic contract regressions cover these boundaries. They establish software behavior, not segmentation accuracy or optical resolution.
mssr_mask() reports cut_relative (lowest selected score / highest score):
interpolation and rounding leave tiny positive scores that rank above exact
zeros without counting as ties, so a small value shows that the mask reaches
beyond the structure. Tie-breaking no longer depends on the caller's
RNGkind().
Undefined refinement steps now also give a
mssrscopR_warning_skipped_steps warning: the result is not the limit for
slightly perturbed input.
grid, kernel and rounding are checked with classed
mssrscopR_error_parameter errors and need exact values.
Four more fixtures (asymmetric frames at amp 2 and 3 on both grids, half-up
rounding, mesh = FALSE, the square kernel) let mssr_selftest() detect
orientation and option errors at amp > 1.
rlang is imported, because cli's condition functions need it.
Documentation states the relation to the authors' R and Python code exactly (intensity normalization, skipped steps, mesh shifts) and the title no longer claims validation.
First functional version: single-frame Mean-Shift Super-Resolution (mssr())
with explicit result objects (role, grid transform, parameters, engine
identity mssr_r_rev2, diagnostics).
mssr_coords() returns output pixel-center coordinates in input-pixel units.
mssr_mask() derives exact-count structural masks on the input grid with
seeded tie-breaking and reports the share decided by tie-breaking.
mssr_selftest() recomputes the bundled synthetic fixtures as a regression
check of the installation.
mssr_app() opens an interactive Shiny explorer: synthetic examples or an
uploaded frame (text, PNG, TIFF), input and structure map on shared
input-pixel axes, line profiles, masks measured on the input, the self-test,
and downloads of the map, the mask, a figure and a run record. It calls the
exported functions and adds no processing of its own.
Defined results for degenerate input: flat frames return flagged zeros at every amplification, and undefined refinement steps (impulses on an exactly zero background) leave the map unchanged and are counted.
Classed cli errors (mssrscopR_error_*) and warnings
(mssrscopR_warning_negative); guards for output size, kernel size and
total work.