Skip to content

CTI resurrection Phase 0: resurrect against the current PyAuto stack#83

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/cti-resurrection-phase0
Jul 17, 2026
Merged

CTI resurrection Phase 0: resurrect against the current PyAuto stack#83
Jammy2211 merged 1 commit into
mainfrom
feature/cti-resurrection-phase0

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Phase 0 of the CTI resurrection epic (#82): PyAutoCTI had been unmaintained for ~2 years and fell off the PyAuto stack. This PR makes the library import cleanly and run its unit test suite green against current autoconf/autofit/autoarray, modernises the packaging, and quarantines the dead Plotter visualization layer for the Phase 1 matplotlib migration.

The repos were transferred to the PyAutoLabs org and registered in the ecosystem body map (PyAutoMind/repos.yaml) as part of this phase.

API Changes

  • Packaging: setup.py exact autoconf/autofit/autoarray=={VERSION} pins → pyproject.toml with floor deps + setuptools-scm dynamic version (mirrors PyAutoGalaxy). requirements.txt/optional_requirements.txt removed. arcticpy is not a pip dependency — its sdist is source-only C++ (needs libgsl-dev) and its own requirements downgrade numpy below 2.0; install recipe is in AGENTS.md.
  • Visualization is quarantined until Phase 1: autocti.plot is not importable, Analysis visualization logs a warning and no-ops, plot tests are skipped via test_autocti/conftest.py.
  • Dataset output format: analyses now save one consolidated dataset.fits (extensions mask/data/noise_map/pre_cti_data[/cosmic_ray_map]) instead of per-attribute fits files; aggregator loaders read the new format (matches PyAutoGalaxy).
  • SimulatorDataset1D(add_poisson_noise=)add_poisson_noise_to_data= (matches autoarray).
  • Internal drift fixes: prior config gaussian_limits:limits:, Mask2D rebuilt from sliced masks in extract/, fits I/O through autoconf.fitsable, Dataset1D.grids = aa.GridsInterface(), ou_sim returns wrapped Array2D.

See full details below.

Test Plan

  • python -m pytest test_autocti — 236 passed, 5 skipped (documented Phase-2 ports), plot tests quarantined via conftest
  • import autocti clean on Python 3.12 + numpy 2.2.6 with arcticpy 2.6 built from source
  • Clocker → arctic clocking exercised by the suite (arctic C++ output visible in test logs)
  • pip install --dry-run . builds autocti from the new pyproject
Full API Changes (for automation & release notes)

Removed

  • autocti.plot package-level import — quarantined until Phase 1 (PyAutoCTI#82); import autocti.plot raises ImportError.
  • requirements.txt, optional_requirements.txt — dependencies live in pyproject.toml.
  • Per-attribute dataset fits output (files/dataset/{data,noise_map,pre_cti_data,mask}.fits) — replaced by one dataset.fits with named extensions.

Added

  • pyproject.toml (dynamic version, floor deps), AGENTS.md, CLAUDE.md.
  • Dataset1D.grids (aa.GridsInterface()), satisfying the current FitDataset contract.

Migration

  • Before: ac.SimulatorDataset1D(..., add_poisson_noise=True)
  • After: ac.SimulatorDataset1D(..., add_poisson_noise_to_data=True)
  • Before: pip install autocti (pulled exact-pinned stack)
  • After: pip install autocti (floor deps) + pip install arcticpy==2.6 --no-build-isolation --no-deps (after numpy)

Notes

  • 5 aggregator tests (analysis + analysis summing) are skipped pending the Phase 2 AnalysisFactor/FactorGraphModel port.
  • test_autocti/instruments/acs/test_image.py and test_autocti/mask/test_mask_2d.py were fully CRLF→LF normalized as a side effect of scripted edits — the semantic diff in each is a handful of lines.

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

…82)

Packaging: setup.py exact-pin scheme replaced by pyproject.toml with floor
dependencies and a setuptools-scm dynamic version, mirroring PyAutoGalaxy;
requirements.txt/optional_requirements.txt removed. arcticpy is deliberately
not a pip dependency (source-only C++ sdist that needs libgsl-dev and whose
own requirements downgrade numpy below 2.0) — see AGENTS.md for the install
recipe.

Visualization quarantine pending the Phase 1 Plotter->matplotlib migration:
autocti.plot is no longer imported at package level, the Analysis visualizers
log a warning and return when the PlotterInterface stack cannot import, and
the plot tests are skipped via conftest collect_ignore.

API drift fixes against current autoconf/autofit/autoarray:
- prior configs: gaussian_limits -> limits
- extract: rebuild Mask2D from sliced masks (slicing now returns ndarray)
- fits I/O through autoconf.fitsable (loaders + output_to_fits replacements)
- analyses save one consolidated dataset.fits (mask/data/noise_map/
  pre_cti_data[/cosmic_ray_map] extensions); aggregator loaders updated to
  read it (from_primary_hdu no longer exists)
- Dataset1D attaches aa.GridsInterface() for the FitDataset grids contract
- SimulatorDataset1D kwarg add_poisson_noise -> add_poisson_noise_to_data
- ou_sim wraps rotation-utility results back into Array2D

Five aggregator tests using removed analysis summing are skipped; they are
ported to AnalysisFactor/FactorGraphModel in Phase 2. Two test files were
fully CRLF->LF normalized as a side effect of scripted edits.

test_autocti: 236 passed, 5 skipped.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release PR queued for the next release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant