CTI resurrection Phase 0: resurrect against the current PyAuto stack#83
Merged
Conversation
…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>
This was referenced Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
setup.pyexactautoconf/autofit/autoarray=={VERSION}pins →pyproject.tomlwith floor deps + setuptools-scm dynamic version (mirrors PyAutoGalaxy).requirements.txt/optional_requirements.txtremoved. arcticpy is not a pip dependency — its sdist is source-only C++ (needslibgsl-dev) and its own requirements downgrade numpy below 2.0; install recipe is inAGENTS.md.autocti.plotis not importable,Analysisvisualization logs a warning and no-ops, plot tests are skipped viatest_autocti/conftest.py.dataset.fits(extensionsmask/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).gaussian_limits:→limits:,Mask2Drebuilt from sliced masks inextract/, fits I/O throughautoconf.fitsable,Dataset1D.grids = aa.GridsInterface(), ou_sim returns wrappedArray2D.See full details below.
Test Plan
python -m pytest test_autocti— 236 passed, 5 skipped (documented Phase-2 ports), plot tests quarantined via conftestimport autocticlean on Python 3.12 + numpy 2.2.6 with arcticpy 2.6 built from sourceClocker→ arctic clocking exercised by the suite (arctic C++ output visible in test logs)pip install --dry-run .buildsautoctifrom the new pyprojectFull API Changes (for automation & release notes)
Removed
autocti.plotpackage-level import — quarantined until Phase 1 (PyAutoCTI#82);import autocti.plotraises ImportError.requirements.txt,optional_requirements.txt— dependencies live inpyproject.toml.files/dataset/{data,noise_map,pre_cti_data,mask}.fits) — replaced by onedataset.fitswith named extensions.Added
pyproject.toml(dynamic version, floor deps),AGENTS.md,CLAUDE.md.Dataset1D.grids(aa.GridsInterface()), satisfying the currentFitDatasetcontract.Migration
ac.SimulatorDataset1D(..., add_poisson_noise=True)ac.SimulatorDataset1D(..., add_poisson_noise_to_data=True)pip install autocti(pulled exact-pinned stack)pip install autocti(floor deps) +pip install arcticpy==2.6 --no-build-isolation --no-deps(after numpy)Notes
analysis + analysissumming) are skipped pending the Phase 2AnalysisFactor/FactorGraphModelport.test_autocti/instruments/acs/test_image.pyandtest_autocti/mask/test_mask_2d.pywere 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