-
Notifications
You must be signed in to change notification settings - Fork 1
Adding Euclid test data and infrastructure #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Code reviewFound 1 issue: configs/euclid_vis.yaml (lines 42-43)Config field name mismatch The YAML configuration uses field names that don't match the Pydantic model: Issue:
Impact: Suggested fix: galaxy_stamp_sizes: [64](Remove |
Replace the hardcoded Euclid priors (PriorConfig with flat sigma values) with the same GalaxyConfig-based YAML schema used by Level 0, making the probabilistic model explicit and configurable for both simple and complex models. Key changes: - Add `center: "catalog"` support to DistributionConfig for data-dependent priors (e.g. flux ~ LogNormal(log(catalog_flux), sigma)) - Add `type: "Offset"` to PositionConfig with dx/dy fields - Create shared `shine/prior_utils.py` with `parse_prior()` function - Replace PriorConfig with `gal: GalaxyConfig` on EuclidInferenceConfig - Rewrite MultiExposureScene._sample_parameters() to be config-driven - Refactor SceneBuilder to use shared parse_prior() - Update configs/euclid_vis.yaml with explicit gal: section https://claude.ai/code/session_01Cfk98zXxwLMsDoGuf5L9Gp
- Document `center: catalog` feature in configuration.md - Document `Offset` position type in configuration.md - Add Euclid VIS config example to configuration.md - Add shine.prior_utils API page and register in mkdocs.yml - Update api/config.md description for new features https://claude.ai/code/session_01Cfk98zXxwLMsDoGuf5L9Gp
Refactor priors to use explicit GalaxyConfig with catalog-centered distributions
|
@claude the tests are failing on github, probably because we need to change the github action workflows to download the git lfs part of the data. Can you look into t hat and fix it? |
|
Claude finished @EiffL's task in 2m 11s —— View job CI test failures diagnosed - Git LFS configuration neededRoot causeThe tests are failing because Git LFS files aren't being downloaded during checkout. Instead of actual FITS files, the workflow gets small text "pointer files" containing: When astropy tries to read these as FITS files, it fails with: This affects 12 tests that need the Euclid data in The fixAdd LFS support to steps:
- uses: actions/checkout@v4
with:
lfs: trueThis tells the checkout action to run Why I can't push this fixGitHub requires special How to fix itOption 1 - Quick manual fix:
Option 2 - Grant workflows permission: |
Summary
Adds the full
shine.euclidpackage — a forward-modelling pipeline for Bayesian shear inference on Euclid VIS quadrant-level multi-exposure data. Given science exposures, a PSF grid, background maps, and a MER source catalog, the pipeline renders a differentiable scene model in JAX and runs MAP (or NUTS) inference to estimate per-source morphology and a shared gravitational shear (g1, g2).What's included
New package:
shine/euclid/(~1,800 lines)config.py— Pydantic configuration: data paths, source selection (SNR,det_quality_flagfiltering, size cuts), prior distributions, multi-tier stamp sizes, inference methoddata_loader.py— Reads quadrant FITS files (SCI/RMS/FLG extensions), PSF grids with bilinear interpolation, background maps, and MER catalogs. Computes per-source per-exposure pixel positions via WCS, local Jacobians, PSF stamps, and visibility flags. Filters sources outside all exposure footprints. Stores sky coordinates and exposure footprint corners for diagnosticsscene.py— NumPyro generative model rendering Sersic galaxies convolved with spatially-varying PSFs via JAX-GalSim. Multi-tier stamp sizes (64/128/256 px) assigned per source by half-light radius, each tier rendered with its ownjax.vmapto preserve parallelism. Standalonerender_model_images()for post-inference visualizationplots.py— 3-panel diagnostic figure (observed | SHINE model | chi residual) with separate pixel-level and residual masks (bright stars, ghosts, saturated stars)Notebook:
notebooks/euclid_vis_map.ipynbEnd-to-end MAP fitting on 3 dithered VIS exposures (~630 sources), with:
Tests:
tests/test_euclid/(15 tests)render_model_images()Data:
data/EUC_VIS_SWL/(Git LFS)3 dithered VIS exposures + background maps + PSF grid + MER catalog for quadrant 3-4-F.
Key design decisions
2 * (3 * HLR_pix + PSF_half). Each tier gets a separatevmap+scanrendering pass — no wasted computation on oversized stamps, full parallelism within each tierdet_quality_flagto exclude saturated, border, bright-star-contaminated, extended-object, and deblending-skipped sources (mask0x78C); keeps blended/neighbor sources. Sources larger than the max stamp or outside all footprints are also excludedprepare_image_data(), not modelled during inferenceflux_detection_totalused everywhere (SNR filtering, sorting, ADU conversion)