Skip to content

SoFT v2.1

Choose a tag to compare

@mib-unitn mib-unitn released this 03 Oct 10:55
· 26 commits to main since this release

Refactor tabulation_parallel for robustness and performance

  • Input validation

    • Added global pre-check ensuring all assoc (files) and data (filesB) FITS files have matching shapes.
    • Added per-frame shape check inside process_file for extra safety.
  • Robust handling of masked/invalid data

    • Convert FITS MaskedArray inputs to np.nan-filled float arrays.
    • Restrict centroid (X, Y) and flux calculations to finite pixels only.
    • Skip blobs with no finite data or zero flux; issue warnings.warn to aid debugging.
  • Centroid and eccentricity fixes

    • Prevent NaN propagation in centroid numerators/denominators.
    • Ensure ecc is only computed for valid blobs.
  • Performance improvements

    • Replaced repeated DataFrame concatenation inside loops with list-of-dicts → DataFrame.from_records.
    • Guaranteed native float/int storage in per-blob records (avoids mixed dtypes).
  • Trajectory consistency

    • Sort grouped blobs by frame before applying consecutiveness checks.
    • Raise informative errors if frame sequence or labels are inconsistent.
  • Velocity computation

    • Handle non-finite trajectories gracefully: emit warning and fill with NaN velocity arrays instead of failing.