Skip to content

Releases

ObsCU v2.1.0 — Strong Gravitational Lensing

Choose a tag to compare

@HainaHuang729 HainaHuang729 released this 02 Dec 01:32

What's New in ObsCU v2.1.0

Strong Gravitational Lensing (obscu.strong_lensing)

  • Cosmological Lensing Geometry: StrongLensGeometry, compute_strong_lens_geometry ($D_d, D_s, D_{ds}$, $\Sigma_{\rm crit}$, time-delay distance $D_{\Delta t}$), einstein_radius_sis_arcsec, einstein_radius_point_mass_arcsec.
  • Analytic & Composite Mass Profiles (NumPy CPU + CuPy GPU): PointMassLens, SIELens (softened/singular isothermal ellipsoid with rotation & circular limit), ExternalShearLens, SphericalNFWLens (+ from_halo_mass), PseudoJaffeLens (+ from_subhalo_mass), and CompositeLens.
  • CDM / WDM Subhalo Substructure: populate_subhalo_lenses integrating obscu.nonstandard.wdm_hmf_suppression.
  • Critical Curves, Caustics & Multi-Image Solver: find_critical_curves_and_caustics, solve_lens_equation (2D grid bracketing + damped exact-Jacobian Newton-Raphson root polishing, parity classification, Fermat potentials & relative time delays).
  • Oversampled Ray-Shooting & Optical / SBI Pipeline: SersicSource, GaussianClumpSource, render_lensed_image (2D & RGB with __dlpack__), simulate_strong_lens_observation, and generate_strong_lens_training_batch bridged to obscu.imaging_sim and obscu.sbi.
  • Validation & Benchmarks: Added Validation Gate 11 (strong_lensing_analytic_parity) in obscu.validation and Suite 8 (strong_lensing_rayshoot) in scripts/benchmark_gpu_production.py.

Verification Summary

  • Local CPU: 11/11 validation gates PASS; test_v21_strong_lensing.py PASS.
  • Google Colab Tesla T4 GPU (CuPy 14.0.1): 87/87 executed tests PASS (0 failures, 5 optional dependency skips), CPU vs GPU float64 ray-shooting parity max_abs_diff <= 1.51e-14, and benchmark_gpu_production.py --preset smoke --backend cupy 8/8 suites PASS.

ObsCU v2.0.0

Choose a tag to compare

@HainaHuang729 HainaHuang729 released this 01 Dec 07:13

ObsCU v2.0.0

Cumulative release delivering the full roadmap across v1.7.2 → v1.8.0 → v1.9.0 → v2.0.0:

Highlights

  • v1.7.2 CI/GPU Robustness & 10-Gate Validation:
    • Python 3.10 conditional tomli compatibility (requires-python = ">=3.10"), GPU-aware check_obs_dependencies test, Gate 9 (observer_epoch_lensing_parity), and Gate 10 (imaging_fidelity_and_source_loss_gate).
  • v1.8.0 Curved-Sky Spherical Weak Lensing & 6×2pt + SSC:
    • Unified multi_plane_raytrace(..., geometry="healpix") dispatch and spherical HEALPix NLA/TATT IA in weak_lensing.py.
    • Exact Schulten–Gordon Wigner-3j recursion (wigner3j_row) and spin-0 / coupled spin-2 E/B curved-sky MASTER matrices (compute_spherical_mode_coupling, deconvolve_spherical_pseudo_cl).
    • Joint 6×2pt Limber theory with $\kappa_{\rm CMB}$ (compute_theory_6x2pt) and symmetric PSD Super-Sample Covariance (ssc_cl_covariance, total_cl_covariance) in forecast.py.
  • v1.9.0 GPU-Native NG Statistics, Single-Launch Heterogeneous imaging_sim & Streaming Multi-Probes:
    • CuPy device-native execution for compute_lensing_peaks, compute_field_moments_and_pdf, compute_minkowski_functionals, and chunked periodic compute_knn_cdf.
    • Single-launch heterogeneous generate_rgb_training_batch with per-sample (B, 9, 21, 21) Zernike+OU PSFs, radial vignetting, diffraction spikes, and cosmic-ray artifacts.
    • Single-pass memory-bounded run_streaming_lightcone_multiprobes in pipeline.py.
  • v2.0.0 Astronomy Standard I/O, Extended Benchmarks & CI/PyPI Workflows:
    • Pure-NumPy/Astropy IEEE-754 2D/RGB WCS FITS I/O (export_wcs_fits, read_wcs_fits) and DESC SACC-v1 HDF5/JSON/FITS export/read (export_sacc_datavector, read_sacc_datavector) in io.py.
    • Extended scripts/benchmark_gpu_production.py with imaging_sim_hetero_rgb and non_gaussian_summary_gpu.
    • Expanded GitHub Actions matrix (Python 3.10–3.13 + macOS + optional healpy full suite) & PyPI publish workflow.

Verified Results (Local CPU & NVIDIA RTX 4090 on phy-gpus)

  • Local CPU: 77/77 tests PASS (78 discovered, 1 skipped optional healpy); obscu benchmark 10/10 PASS.
  • RTX 4090 GPU (phy-gpus, CuPy 13.6.0):
    • Targeted GPU unit suites (test_obscu, test_v15–test_v20): 30/30 PASS (49.1s).
    • Summary stats CPU vs GPU parity: peaks hist_err=0, moments skew=1.73e-17, minkowski max_diff=0.0, knn max_diff=0.0.
    • Heterogeneous 512×512×3 (B=32, vignetting + spikes + CR + DLPack): 1,639.7 pairs/sec (19.52 ms/batch).
    • benchmark_gpu_production.py --preset mid --backend cupy: 7/7 suites PASS (fullsky_born_streaming 5,765.94 Mpix/s, imaging_sim_hetero_rgb 1,304.27 pairs/s).

ObsCU v1.7.1

Choose a tag to compare

@HainaHuang729 HainaHuang729 released this 30 Nov 09:26

ObsCU v1.7.1

Highlights

  • obscu.imaging_sim.sky_renderer:
    • Added render_deep_field_truth producing linear float32 (H, W, 3) (truth_nebula_galaxy, truth_stars, truth_total) + exact gt_catalog with HDR dynamic range >= 1e5 (1e-4–50.0), Sérsic n in [0.8, 4.0], (e1, e2), and stars deliberately placed overlapping bright galaxy bulges.
    • Added batched GPU/CPU generator render_deep_field_batch backed by shared-memory Sérsic reduction (deposit_sersic_rgb_batch_f32), star deposition (deposit_stars_rgb_batch_f32), and multi-mode nebula synthesis (eval_nebula_rgb_batch_f32).
  • obscu.imaging_sim.psf_degrader:
    • Added Ornstein–Uhlenbeck random-walk guiding jitter kernel (generate_guiding_jitter_kernel), vectorized 3×3 anchor Zernike + Petzval/astigmatism wavefront generator, fused shared-memory tiled CUDA convolution with radial R/B lateral CA (sv_psf_convolve_rgb_batch_f32), fused Poisson/CMOS/banding noise kernel (sensor_noise_rgb_batch_f32), degrade_imaging_batch(..., return_dlpack=True), and LHS generate_rgb_training_batch.
  • obscu.imaging_sim.restoration_metrics:
    • Added wavelet_scattering_distance (2D & channel-averaged RGB L1/L2), verify_photometry_and_ellipticity, and measure_psf_fwhm_and_eccentricity.

Verification (CPU & NVIDIA RTX 4090)

  • ObsCU: 60/60 CPU unit tests PASS; CUDA GPU suites (test_v15, test_v16, test_v17) 11/11 PASS on RTX 4090 (b4).
  • CU-Suite: 12/12 unit tests PASS (zero regression).
  • RTX 4090 512×512×3 FP32 Throughput (B=32, target >= 800 pairs/sec):
    • degrade_imaging_batch: 3,182.1 pairs/sec (10.06 ms / batch of 32)
    • End-to-end render_deep_field_batch + degrade_imaging_batch: 2,907.6 pairs/sec (11.01 ms / batch of 32)
    • DLPack zero-copy device pointer identity verified (__dlpack__() & dlpack_degraded).
    • Measured coverage sweep: FWHM [1.382, 8.038] px, corner eccentricity [0.000, 0.802], SNR [-3.45, 44.34] dB.

ObsCU v1.7.0

Choose a tag to compare

@HainaHuang729 HainaHuang729 released this 30 Nov 08:59

ObsCU v1.7.0 adds the optional obscu.imaging_sim subpackage (zero PyTorch/ONNX dependencies; CPU + CUDA CuPy + __dlpack__):

  • obscu.imaging_sim.sky_renderer: CUDA RawKernel & CPU sub-pixel Sérsic galaxy + dense power-law starfield + filamentary nebula rasterizer consuming MockGalaxyCatalog + photometry.
  • obscu.imaging_sim.psf_degrader: Spatially varying Zernike wavefront PSF ($Z_4$–$Z_{11}$, lateral chroma, guiding jitter), bilinear partition-of-unity convolution, Poisson + CMOS readout + row banding noise, and LHS generate_training_batch with zero-copy __dlpack__.
  • obscu.imaging_sim.restoration_metrics: Normalized 2D Wavelet Scattering texture distance, local annulus aperture photometry linearity, adaptive galaxy ellipticity correlation, and spurious-star detector (evaluate_restoration_fidelity).

ObsCU v1.6.1

Choose a tag to compare

@HainaHuang729 HainaHuang729 released this 29 Nov 12:31

ObsCU v1.6.1 resolves live CuPy 13.6 runtime incompatibilities discovered on NVIDIA CUDA hardware and archives verified cluster production benchmarks from phy-gpus (node b1, NVIDIA GeForce RTX 4090, CUDA driver 12060, CuPy 13.6.0):

  • Full-Sky $N_{\rm side}=4096 \times 20$ Shells (born_convergence_streaming):
    • FP32: 0.5071 s (7941.02 Mpix/s, peak VRAM pool 3.762 GiB)
    • FP64: 0.5872 s (6857.17 Mpix/s, peak VRAM pool 6.012 GiB)
    • GPU vs. CPU Speedup (mid $N_{\rm side}=2048$): 85.5× (0.0946 s GPU vs 8.0928 s CPU)
  • Flat-Sky $4096^2 \times 20$ Lensing + Kaiser–Squires + On-Device $C_\ell$:
    • FP32: 0.1219 s (2752.28 Mpix/s, 74.5× over CPU at mid) | FP64: 0.1373 s (2444.26 Mpix/s)
  • $10^7$-Halo HOD + Radial RSD + $2048^2$ Projection + $C_\ell$:
    • FP32: 0.8163 s (2.08 Mgal/s, 1.262 GiB) | FP64: 0.8275 s (2.05 Mgal/s, 1.684 GiB)
  • CuPy 13.6 Compatibility Fixes: Device-native cumsum/searchsorted replacement for cupy.repeat in populate_hod, Generator.standard_normal compatibility, and Python 3.10 tomllib fallback guard.

ObsCU v1.6.0

Choose a tag to compare

@HainaHuang729 HainaHuang729 released this 29 Nov 12:17

ObsCU v1.6.0 adds $N_{\rm side}=4096$ streaming weak lensing, end-to-end CuPy mock galaxy paths, and a turnkey cluster GPU benchmark harness:

  • Memory-Bounded $O(1)$-Shell Streaming Lensing (weak_lensing.py): born_convergence_streaming (FP32/FP64) & streaming multi_plane_raytrace_healpix, plus on-device xp.searchsorted/xp.bincount $C_\ell$ binning eliminating 2D host copies.
  • Full-CuPy Large-Scale Galaxy Paths (mock_galaxies.py): GPU-native hod_mean_occupation, populate_hod (float32/float64), apply_rsd via device xp.interp cosmological lookup tables, xp.bincount 2D overdensity projection, and $O(N \log N)$ vectorized SubhaloCatalog.is_central.
  • Cluster Benchmark Harness & Slurm Automation (scripts/benchmark_gpu_production.py, scripts/slurm_gpu_benchmark.sh, docs/GPU_BENCHMARK_PROTOCOL.md): smoke, mid, and production ($N_{\rm side}=4096$, $10^7$ halos) presets with CuPy VRAM telemetry and Apptainer/Slurm integration.

ObsCU v1.5.0

Choose a tag to compare

@HainaHuang729 HainaHuang729 released this 29 Nov 07:46

ObsCU v1.5.0 includes milestones v1.3 through v1.5:

  • v1.3: Live CosmoCU Dual<5>/Dual<8> AD 3x2pt Fisher Jacobians, joint BCM $S_{\rm bar}(k, z)$ + X-ray $f_{\rm gas}(M_{500c})$ calibration closure, and Gate 8 cross-engine Limber parity ($&lt; 2%$).
  • v1.4: Curated literature & simulation benchmark datasets (obscu.datasets), validation dashboard (obscu dashboard + optional matplotlib summary plot), and developer API guide (docs/API_GUIDE.md).
  • v1.5: CuPy RawKernel GPU acceleration paths for scatter SPH & banded Ly-alpha optical depths, vectorized BatchForwardModel.run_batch, and Non-Gaussian SBI joint-constraint showcase (examples/ng_sbi_wdm_bpl_fom.py).