Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 56 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,79 @@
# PyAutoCTI Assistant

Every time a CCD reads out an image, some electrons get caught in defects in the silicon and are released a moment
later, smearing faint trails behind stars and galaxies. This is Charge Transfer Inefficiency (CTI), and
[**PyAutoCTI**](https://github.com/PyAutoLabs/PyAutoCTI) measures and corrects it.

This repository is the **PyAutoCTI Assistant**: an AI assistant which **lets you use natural language** to calibrate
and correct Charge Transfer Inefficiency (CTI) in CCD imaging with
[PyAutoCTI](https://github.com/PyAutoLabs/PyAutoCTI) — trap models clocked through the arctic algorithm, charge-injection
and 1D datasets, FPR/EPER extraction, and Bayesian calibration of trap densities and release timescales.
and correct CTI in CCD imaging.

It was born as a **lightweight seed** of the mature sibling [autolens_assistant](https://github.com/PyAutoLabs/autolens_assistant):
the agent instructions, skills framework, reference wiki and benchmark machinery are in place, and the CTI-specific
skills grow in use — [`PENDING.md`](PENDING.md) is the growth queue and [`skills/README.md`](skills/README.md) the
index of what exists today.
It's a young assistant, built from the more mature [PyAutoLens Assistant](https://github.com/PyAutoLabs/autolens_assistant).
The basics work today, and its CTI know-how grows as people use it.

## Getting Started

The assistant runs inside an **AI coding agent**: a tool that reads this repository, runs Python on your computer
and inspects the results. That is what lets it install PyAutoCTI and its arctic dependency, run calibrations and look
at the trails they produce. You do not have to run anything to use it: asking what CTI is, planning a calibration or
learning in Teacher Mode all happen inside the same agent.

Claude Code and Codex are recommended. Free options and chat use are on the
[PyAutoLabs AI options page](https://github.com/PyAutoLabs/PyAutoScientist/blob/main/AI_OPTIONS.md).
The assistant runs inside an **AI coding agent**, a tool that can read this repository, run Python on your computer
and look at the results. Pick your agent:
[Claude Code](https://github.com/PyAutoLabs/PyAutoScientist/blob/main/AI_OPTIONS.md#claude-code-recommended-paid) or
[Codex](https://github.com/PyAutoLabs/PyAutoScientist/blob/main/AI_OPTIONS.md#codex-recommended-paid) are recommended,
and [GitHub Copilot CLI](https://github.com/PyAutoLabs/PyAutoScientist/blob/main/AI_OPTIONS.md#github-copilot-cli)
or [OpenCode](https://github.com/PyAutoLabs/PyAutoScientist/blob/main/AI_OPTIONS.md#opencode) are free AI options
if you want to try it without paying.

Clone this repository and start the agent inside it. The assistant sets up the PyAutoCTI stack after your first
prompt (arcticpy needs a compiler and GSL headers, see [`skills/ac_setup_environment.md`](skills/ac_setup_environment.md)):
Once it is installed, download this repository and open your agent inside it, then paste in the starting prompt
below. The assistant installs PyAutoCTI for you after your first prompt. Its arctic dependency needs a compiler
and the GSL library, and [`skills/ac_setup_environment.md`](skills/ac_setup_environment.md) has the details if
anything goes wrong.

```bash
git clone https://github.com/PyAutoLabs/autocti_assistant.git
cd autocti_assistant
claude # or: codex
```

Then submit the starting prompt:
### Starting prompt

<sub><b>Example Natural Language Prompt for Claude Code, Codex or other AI coding agent</b></sub>
If you've not used the PyAutoCTI Assistant before, use the prompt below. It explains CTI, runs a small calibration
and shows you the result.

<sub><b>Starting prompt for Claude Code, Codex or other AI coding agent</b></sub>

```text
I'm new to PyAutoCTI. Explain what charge transfer inefficiency is and how a calibration works, then run the
1D calibration demonstration in scripts/demonstrations/demo_1_calibrate_1d.py, show me the fit, and check that
it recovers the input trap density and release timescale.
```

Start the prompt with `Teacher mode.` if you want the detector physics explained as you go, or ask it to plan a
calibration and discuss the trap model before anything runs.
### Teacher Mode

If you're new to CCD detectors, start your prompt with `Teacher mode.` and the assistant will explain the physics as
it goes. You can also ask it to plan a calibration and talk through the trap model with you before anything runs.

## What ships today

- **Four runnable demonstrations** under [`scripts/demonstrations/`](scripts/demonstrations/README.md): calibrate a 1D
dataset and a 2D charge-injection image (recovering the input traps), correct CTI, and reload a fit through the
aggregator. Each asserts its result, so a clean run is proof the pipeline works.
- **The reference wiki**, [`wiki/core/`](wiki/core/index.md) — what CTI is, trap physics, FPR/EPER, the arctic
algorithm and calibration strategy — and the **literature wiki**, [`wiki/literature/`](wiki/literature/index.md),
with a verified bibliography.
- **Benchmark machinery** under [`benchmarks/`](benchmarks/README.md); no CTI benchmark card has been written or run
yet, so there is no performance claim here to believe or disbelieve.
- **Four demonstrations** you can run in
[`scripts/demonstrations/`](scripts/demonstrations/README.md): calibrate a 1D dataset, calibrate a 2D
charge-injection image, correct CTI, and load the results of a fit. Each one checks its own answer, so a clean run
shows everything is working.
- **A reference wiki** in [`wiki/core/`](wiki/core/index.md), covering what CTI is, how traps behave, the arctic
algorithm and how to plan a calibration.
- **A literature wiki** in [`wiki/literature/`](wiki/literature/index.md), with a checked bibliography.
- **Benchmarks** in [`benchmarks/`](benchmarks/README.md). No CTI benchmark has been written or run yet, so there
are no performance claims here.

The list of skills the assistant has today is in [`skills/README.md`](skills/README.md), and what's planned next is
in [`PENDING.md`](PENDING.md).

## Science Project

When you begin a specific study, the assistant can create a dedicated **science project**: a separate, structured
repository holding that study's datasets, configuration, analysis scripts, results and the record of your work with
the assistant. The workflow is owned by the [`start-new-project`](skills/start-new-project.md) skill:
When you start a real scientific study, ask the assistant to set up a **science project**. This is a separate
repository that holds everything for that study:

- **Data.** The datasets and configuration for the study.
- **Analysis.** The scripts the assistant writes and the results they produce.
- **History.** A record of your work with the assistant, so you can pick up where you left off.

To start one, just ask:

<sub><b>Example Natural Language Prompt for Claude Code, Codex or other AI coding agent</b></sub>

Expand All @@ -69,3 +85,12 @@ Start a science project for my Euclid VIS CTI calibration.

The assistant ships agent instructions and reference material derived from the public PyAuto\* repositories; the
underlying libraries are released under their own licenses (see each repo).

<details>
<summary><sub>Note for AI coding agents</sub></summary>

If a prompt sent you here and you are not already inside this repository, clone it
(`git clone https://github.com/PyAutoLabs/autocti_assistant.git && cd autocti_assistant`), then read `AGENTS.md`
in full and follow it. Science projects are set up by [`skills/start-new-project.md`](skills/start-new-project.md).

</details>
Loading