Canonical, agent-agnostic instructions for this repo. CLAUDE.md imports this
file; any tool that does not process @-imports should read this directly.
PyAutoCTI (package autocti) is a Bayesian library for calibrating and
modelling Charge Transfer Inefficiency (CTI) in CCD imaging: charge-injection
imaging (ImagingCI) and 1D datasets (Dataset1D), trap/CCD models clocked
through the C++ arctic code (Clocker1D/Clocker2D wrapping arcticpy),
FPR/EPER extraction (autocti/extract/), and per-dataset Fit*/Analysis*
classes. Heritage: Euclid VIS CTI calibration; also HST ACS
(autocti/instruments/acs).
Dependency direction: autocti may import autoarray (data structures), autofit (model-fitting), and autoconf (config). Nothing in the PyAuto stack imports autocti — it is a leaf like PyAutoLens.
This repo was unmaintained for ~2 years and is being brought back into the
ecosystem via the CTI resurrection epic
(PyAutoCTI#82). Phase 0
(importable + unit tests green on the current stack) and Phase 1 (the
visualization layer rewritten on the matplotlib function API, mirroring
PyAutoGalaxy: per-domain plot/*_plots.py function modules, config-gated
model/plotter.py orchestrators, autocti/util/plot_utils.py helpers) are
complete, as is Phase 2 (autofit sync: multi-dataset fits and the aggregator
run through af.AnalysisFactor/af.FactorGraphModel; the test suite has no
skips). Remaining: Phase 3 CI + ecosystem plumbing, Phase 4 workspace update,
Phase 5 workspace_test rebuild + release.
import autocti requires arcticpy (pinned 2.6), which is deliberately not
a pip dependency:
- Its PyPI sdist is source-only C++ — it needs
libgsl-devheaders and a toolchain to build. - Its own requirements downgrade numpy below 2.0, breaking a modern stack.
Install it after numpy is in place:
pip install arcticpy==2.6 --no-build-isolation --no-depsIf GSL headers are missing and you lack root, extract them locally
(apt-get download libgsl-dev && dpkg -x ...) and point CPPFLAGS/LDFLAGS
at them.
pip install -e ".[dev]" # install with dev/test extras
python -m pytest test_autocti/ # full test suite
python -m pytest test_autocti/extract/ # one focused directoryIn a sandboxed / restricted environment, point numba and matplotlib at writable caches:
NUMBA_CACHE_DIR=/tmp/numba_cache MPLCONFIGDIR=/tmp/matplotlib python -m pytest test_autocti/- Source siblings: PyAutoConf, PyAutoArray, PyAutoFit (upstream).
- autocti_workspace — runnable examples/tutorials (updated in epic Phase 4).
- autocti_workspace_test — regression scripts + Euclid tvac/temporal heritage (rebuilt in epic Phase 5).
- Science context:
PyAutoMemory/wiki/cti/(trap physics, arctic algorithm, Euclid VIS / HST ACS heritage).
The public surface is defined authoritatively in autocti/__init__.py — read
it rather than trusting a hand-maintained table. Canonical import:
import autocti as ac- Import direction: autoarray / autofit / autoconf only — never autogalaxy or autolens.
- Unit tests are numpy-only; there is no JAX in this library (arctic is C++).
- Slicing an autoarray
Mask2Dreturns a plain ndarray — rebuild aMask2Dwith the parent'spixel_scalesbefore constructing anArray2Dfrom it (seeautocti/extract/two_d/abstract.py). - Fits I/O goes through
autoconf.fitsable(ndarray_via_fits_from,output_to_fits,hdu_list_for_output_from) — instance.output_to_fitsmethods no longer exist on autoarray structures. - All files use Unix line endings (LF,
\n) — never\r\n.
- Read the issue description and any linked plan.
- Identify affected files and make the change.
- Run the full suite:
python -m pytest test_autocti/. - If you changed public API, say so explicitly — autocti_workspace may need updates.
- Ensure all tests pass before opening a PR.
Never rewrite pushed history on any repo with a remote — no git init over a
tracked repo, no force-push to main, no fresh-start "Initial commit", no
filter-repo / filter-branch / rebase -i on pushed branches. To get a
clean tree: git fetch origin && git reset --hard origin/main && git clean -fd.