|
| 1 | +# COOLEST standard support throughout PyAutoGalaxy and PyAutoLens |
| 2 | + |
| 3 | +Type: feature |
| 4 | +Target: autolens |
| 5 | +Difficulty: large |
| 6 | +Autonomy: supervised |
| 7 | +Priority: high |
| 8 | +Status: formalised |
| 9 | + |
| 10 | +## Context |
| 11 | + |
| 12 | +Preparation for modeling the ~18,000 Euclid DR1 lenses: PyAutoLens results must |
| 13 | +be exchangeable with other lens-modeling codes (lenstronomy, herculens, Glee) |
| 14 | +via the COOLEST standard (https://github.com/aymgal/COOLEST). |
| 15 | + |
| 16 | +Original request (verbatim): |
| 17 | + |
| 18 | +> read this SLACK chat about the COOLEST standards, implement them throughout |
| 19 | +> PyAutoGalaxy and PyAutoLens, and then as a follow up try and make it so for |
| 20 | +> the power-law, which you will add a PowerLawIntermediate profile as |
| 21 | +> described, you get a direct link typing herculens's power-law to this one |
| 22 | +> via Coolest |
| 23 | +
|
| 24 | +Key points from the Slack thread (James Nightingale, Alessandro Sonnenfeld, |
| 25 | +Aymeric Galan): |
| 26 | + |
| 27 | +- James's original plan: define every light/mass profile so that for input |
| 28 | + ndarrays of (y,x) coordinates it outputs deflections, convergence and the |
| 29 | + other COOLEST quantities; align PyAutoLens angle conventions with COOLEST; |
| 30 | + verify parity with lenstronomy/herculens on a Power Law + Shear (+ Sersic |
| 31 | + lens light and source) on one Euclid lens, including image orientation on |
| 32 | + load (no vertical flips). |
| 33 | +- Sonnenfeld + Galan both advised: do NOT change PyAutoLens internals; keep |
| 34 | + sampling on (e1, e2) with a (q, PA) wrapper, and write a conversion step |
| 35 | + (PyAutoLens ↔ COOLEST wrapper) instead. lenstronomy/herculens also let users |
| 36 | + define coordinates freely, so they too need a conversion step — internal |
| 37 | + changes would not by themselves buy parity. |
| 38 | +- The intermediate-axis-ratio question: autolens's Einstein radius and |
| 39 | + axis-ratio come out different from COOLEST (factors of sqrt(q)); James is |
| 40 | + considering making the mass profiles intermediate-axis internally, which is |
| 41 | + separable from the COOLEST wrapper work (handled in the follow-up prompt). |
| 42 | +- Einstein-radius definition must be unambiguous: Sonnenfeld assumes |
| 43 | + (A/pi)^(1/2) with A the area enclosing mean kappa=1; the Euclid DR1 |
| 44 | + catalogue uses the area within the tangential critical curve (includes |
| 45 | + shear's shaping). The export must state its definition explicitly. |
| 46 | +- Export scope: analytic profile parameters only; deflection/convergence maps |
| 47 | + stay in the distributed .fits catalogue (optionally exportable later). |
| 48 | +- Sonnenfeld's COOLEST .json lens models for validation: |
| 49 | + https://gitlab.euclid-sgs.uk/asonnenf/goldenlenses/-/tree/e0ff0fbab2aa4c8bc19b4c18d7bcfe24bc367795/paper1/lens_models |
| 50 | +- James's descope in-thread: "focus on getting a wrapper from PyAutoLens to |
| 51 | + Coolest". The instruction above ("implement them throughout") supersedes but |
| 52 | + the plan must surface the wrapper-vs-internal-change scope decision for |
| 53 | + approval. |
| 54 | + |
| 55 | +## Scope |
| 56 | + |
| 57 | +- @PyAutoGalaxy: COOLEST conversion layer for light and mass profiles — |
| 58 | + bidirectional mapping of profile parameterisations (ellipticity (e1,e2) ↔ |
| 59 | + (q, PA) with COOLEST position-angle convention, sqrt(q) intermediate-axis |
| 60 | + factors, angle/orientation conventions), covering the profiles COOLEST |
| 61 | + defines (Sersic, shear, SIE/PowerLaw, NFW, ...). |
| 62 | +- @PyAutoLens: COOLEST .json import/export of full lens models (lens light + |
| 63 | + mass + source), reading/writing the COOLEST template system; explicit, |
| 64 | + documented Einstein-radius definition on export. |
| 65 | +- Round-trip tests: import Sonnenfeld's golden-lens .json models, re-export, |
| 66 | + verify parameter fidelity; unit tests for every profile mapping including |
| 67 | + the sqrt(q) Einstein-radius rescaling. |
| 68 | +- Keep sampling and all internal model composition on (e1, e2) — the COOLEST |
| 69 | + layer is a conversion step at the model I/O boundary, not an internal |
| 70 | + convention change (per Sonnenfeld/Galan consensus; deviation from this needs |
| 71 | + explicit approval in the plan). |
| 72 | + |
| 73 | +Follow-up prompt (separate task): feature/autolens/coolest_powerlaw_herculens_parity.md |
0 commit comments