Skip to content

feat: LSST RSP integration — TAP catalog queries, SIA v2 cutouts, and RubinLensDataset#166

Open
nikhilchhokar wants to merge 3 commits intoML4SCI:mainfrom
nikhilchhokar:feat/lsst-rsp-pipeline
Open

feat: LSST RSP integration — TAP catalog queries, SIA v2 cutouts, and RubinLensDataset#166
nikhilchhokar wants to merge 3 commits intoML4SCI:mainfrom
nikhilchhokar:feat/lsst-rsp-pipeline

Conversation

@nikhilchhokar
Copy link

Summary

Adds a modular pipeline connecting the Rubin Science Platform (RSP)
public web APIs to DeepLense workflows, enabling lens candidate
retrieval and preprocessing from LSST data without requiring a
local LSST stack installation.

Motivation

The Rubin Observatory will produce ~10M strong lensing candidates.
DeepLense has no direct interface to RSP's TAP/SIA APIs. This PR
fills that gap so existing classification, SR, and lens-finding
training loops work on real LSST data with zero modification.

Components added

  • RubinTAPClient — ADQL cone-search on DP0.2/DP1 object catalog
  • RubinSIAClient — SIA v2 cutout retrieval per band (g/r/i)
  • Normaliser — asinh/minmax/zscore pixel normalisation
  • CutoutExtractor — resize + multi-band stacking → (C, 64, 64)
  • RubinLensDataset — drop-in PyTorch Dataset for RSP data,
    compatible with the refactored LensDataset interface (Refactor: LensDataset and WrapperDataset for Cleaner Data Handling #151)
  • build_deeplense_transforms — torchvision augmentation pipeline
  • YAML config, I/O helpers, end-to-end notebook

Testing

21 offline unit tests — no RSP token or network required:

python -m unittest tests.test_pipeline -v

Relation to prior work

Complements GSoC 2025 RIPPLe (@kartikmandar) which uses the
Butler API for local stack installations. This PR targets the
public RSP web endpoints, covering researchers without USDF access.

Related PRs

nikhilchhokar added 3 commits January 23, 2026 06:18
- Add SuperResolutionAutoencoder (U-Net architecture)
- Implement perceptual loss (reconstruction + gradient)
- Add PSNR and SSIM evaluation metrics
- Support real DeepLense Model I/II/III data loading
- Include comprehensive training script with CLI args
- Add full documentation

Addresses DEEPLENSE2 Task ML4SCI#1: unsupervised SR on simulated images.
Builds on PR ML4SCI#109 (baseline infrastructure).
Tested on Windows 11, PyTorch 2.10, Python 3.13.
Adds rsp_pipeline/ as a complementary approach to the existing Butler-based
RIPPLe pipeline. Targets the public Rubin Science Platform web endpoints —
no local LSST stack required.

Components:
- RubinTAPClient: ADQL cone-search on DP0.2/DP1 catalog via pyvo TAP
- RubinSIAClient: SIA v2 cutout retrieval per band (g/r/i)
- Normaliser: asinh/minmax/zscore (asinh default for lens arc preservation)
- CutoutExtractor: resize + multi-band stacking to (C, 64, 64) float32
- RubinLensDataset: drop-in PyTorch Dataset compatible with LensDataset (ML4SCI#151)
- build_deeplense_transforms: rotation-aware torchvision augmentation pipeline
- YAML config, I/O helpers, 21 offline unit tests, end-to-end notebook

Complements RIPPLe (Butler/USDF) by covering the TAP+SIA access path
for researchers using data.lsst.cloud without a local stack.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant