Skip to content

perf: profile + speed up AggregateImages/AggregateFITS (png/fits workflow aggregators) #1385

Description

@Jammy2211

Overview

Final leg of the aggregator profiling arc (#1375 A–D + awt#171 merged): only AggregateCSV of the three catalogue workflow aggregators was profiled and sped up (−25% in #1376). AggregateImages (png_make) and AggregateFITS (fits_make) were never measured — and code reading already shows AggregateFITS._hdus re-opens the same fits file once per requested HDU via result.value(...) (an uncached fits.open per HDU) and never closes handles.

Plan

  • Harness (autofit_workspace_test): give mock templates realistic payloads — a panelled subplot_fit.png and a multi-HDU fit.fits — and add aggregate_images (output_to_folder, the png_make pattern) + aggregate_fits (extract_fits + output_to_folder, the fits_make pattern) stages to the profiling grid.
  • Baseline, then low-hanging fruit in autofit/aggregator/summary/aggregate_images.py / aggregate_fits.py (candidates: one fits.open per source file per result; close handles; avoid repeated result.value lookups). Behaviour-preserving; before/after in the PR.
  • Out of scope: faster single-file deserialization (known deeper follow-up).

Worktree: ~/Code/PyAutoLabs-wt/aggregate-images-fits/ · Branch: feature/aggregate-images-fits · Repos: PyAutoFit (primary), autofit_workspace_test — both clean on main, unclaimed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions