Overview
User directive (2026-07-09): the flagship Lenstool example must teach the canonical PyAutoLens CSV API rather than bespoke CSVs, and the API itself should be deep-researched / stress-tested against realistic user requirements first — different mass models, time delays and fluxes in point data, member-catalogue geometry — extending it where gaps surface. Follows the review on autolens_workspace#249's thread: data side (point_datasets.csv) is solid; galaxy_table_from_csv silently drops geometry/mag columns; the named-galaxy model CSVs are strong but under-exercised (Lenstool example bypassed them; no dPIEMassLenstool doc row).
Autonomy: supervised --auto (in-session directive); heart-ack carried.
Plan
- Stress-test (empirical, harness in scratch then distilled into unit tests): push through
mass.csv/light.csv/point.csv + galaxy_table — dPIEMassLenstool rows (.par-as-a-table), NFWMCRLudlow (redshift args), elliptical profiles (ell_comps_0/1 and centre y/x tuple splitting), ExternalShear, multipole profiles, linear/operated light profiles (dispatch module coverage), point sources with fluxes, per-row redshifts, af.Model round-trips with priors on selected columns, write→read→write idempotency. Record every failure as a gap.
- Extend what the stress-test demands (candidates:
GalaxyTable optional ellipticity/angle_pos/mag columns replacing today's silent-ignore; dispatch-module coverage for light variants; anything the harness surfaces). Library changes + tests in PyAutoGalaxy, numpy-only.
- Port the Lenstool example:
data.py writes canonical mass.csv (dPIEMassLenstool rows = the .par file as a table) + extended scaling_galaxies.csv; modeling.py reconstruction via al.galaxies_from_csv_tables and refit via al.galaxy_af_models_from_csv_tables — no bespoke readers. Re-verify the 0.068" reconstruction parity after the port.
- Docs:
csv_api.py gains a Lenstool-parameterized row example + the extended table schema; point.csv time-delay/flux columns documented against the data-side round-trip.
Affected Repositories
- PyAutoGalaxy (primary: galaxy_table/galaxy_model_csv extensions + tests)
- autolens_workspace (lenstool example port + csv_api.py docs; parallel to open claims — scripts/cluster/ disjoint; catalogue-regen coordination continues)
Branch: feature/csv-api-lenstool · Worktree: ~/Code/PyAutoLabs-wt/csv-api-lenstool/
Original directive
verbatim
"yep, do it, making sure we focu on using the bespoke PyAutoLens csv API throughout, do a bit of a deep research making sure the autoens .csv API is fully developed for what we need, i like the mass/ligth/point.csv but youre right e may need to extend it to cover all uses (different mass models? time delays in poiunt)? stress test diferent possible user requirements"
Overview
User directive (2026-07-09): the flagship Lenstool example must teach the canonical PyAutoLens CSV API rather than bespoke CSVs, and the API itself should be deep-researched / stress-tested against realistic user requirements first — different mass models, time delays and fluxes in point data, member-catalogue geometry — extending it where gaps surface. Follows the review on autolens_workspace#249's thread: data side (
point_datasets.csv) is solid;galaxy_table_from_csvsilently drops geometry/mag columns; the named-galaxy model CSVs are strong but under-exercised (Lenstool example bypassed them; nodPIEMassLenstooldoc row).Autonomy: supervised
--auto(in-session directive); heart-ack carried.Plan
mass.csv/light.csv/point.csv+galaxy_table— dPIEMassLenstool rows (.par-as-a-table), NFWMCRLudlow (redshift args), elliptical profiles (ell_comps_0/1andcentrey/x tuple splitting), ExternalShear, multipole profiles, linear/operated light profiles (dispatch module coverage), point sources with fluxes, per-row redshifts, af.Model round-trips with priors on selected columns, write→read→write idempotency. Record every failure as a gap.GalaxyTableoptionalellipticity/angle_pos/magcolumns replacing today's silent-ignore; dispatch-module coverage for light variants; anything the harness surfaces). Library changes + tests in PyAutoGalaxy, numpy-only.data.pywrites canonicalmass.csv(dPIEMassLenstool rows = the .par file as a table) + extendedscaling_galaxies.csv;modeling.pyreconstruction viaal.galaxies_from_csv_tablesand refit viaal.galaxy_af_models_from_csv_tables— no bespoke readers. Re-verify the 0.068" reconstruction parity after the port.csv_api.pygains a Lenstool-parameterized row example + the extended table schema; point.csv time-delay/flux columns documented against the data-side round-trip.Affected Repositories
Branch:
feature/csv-api-lenstool· Worktree:~/Code/PyAutoLabs-wt/csv-api-lenstool/Original directive
verbatim
"yep, do it, making sure we focu on using the bespoke PyAutoLens csv API throughout, do a bit of a deep research making sure the autoens .csv API is fully developed for what we need, i like the mass/ligth/point.csv but youre right e may need to extend it to cover all uses (different mass models? time delays in poiunt)? stress test diferent possible user requirements"