# Cluster strong-lensing data (for RST comparison)
This folder holds **public cluster strong-lensing data** for comparison with RST disformal lensing predictions ([[Predictions and data matching]] row 5; [[RST Lensing (Disformal)]], [[RST Refractive Lensing - Code]]).
---
## Recommended dataset: CLASH
**Cluster Lensing And Supernova survey with Hubble (CLASH)** — 25 clusters with combined strong+weak lensing mass and magnification models.
- **Archive:** https://archive.stsci.edu/prepds/clash/
- **For astronomers (tables, products):** https://www.stsci.edu/~postman/CLASH/for_astronomers.html
Use this page to find mass models, critical curves, Einstein radii, or surface-density profiles.
- **Reference:** Postman et al., “Hubble Space Telescope Combined Strong and Weak Lensing Analysis of the CLASH Sample: Mass and Magnification Models and Systematic Uncertainties,” ApJ 2015; [arXiv:1411.1414](https://arxiv.org/abs/1411.1414).
Products include 2D mass profiles, magnification models, and systematic uncertainties (~20% magnification, ~40% mass density in the core).
**What we need (from the CLASH "For Astronomers" table):**
| Column | What it is | Needed for RST? |
|--------|------------|------------------|
| **Data Files** (30mas, 65mas, Subaru) | Processed HST/Subaru images | Optional (own photometry). |
| **Catalogs** (HST, Subaru, Redshift, Molino) | Object and lensing catalogs | Optional (redshifts, positions). |
| **Models** | Mass, magnification, critical curves, Einstein radius | **Yes.** Download Models for your clusters (e.g. Abell 383, MACS J0416-24, MACS J1149+22). |
**PSF models (all filters):** CLASH HLSP on MAST includes PSF FITS per filter: `hlsp_clash_hst_acs-65mas_all_<filter>_v1_psf.fits`, `hlsp_clash_hst_wfc3ir-65mas_all_<filter>_v1_psf.fits`, `hlsp_clash_hst_wfc3uvis-65mas_all_<filter>_v1_psf.fits` (65mas = HST resolution). Download from the CLASH archive/MAST and put in `cluster_lensing_data/psf/`. Alternative: WFC3 [PSF library](https://www.stsci.edu/hst/instrumentation/wfc3/data-analysis/psf); ACS [ePSF Generator](https://acspsf.stsci.edu/) (per rootname).
**What to download (summary):** From the “For Astronomers” page or MAST, download **Models** (and optionally Data Files, Catalogs) for your chosen clusters. Place in `clash/`.
**Typical use:** Compare RST-predicted deflection or Einstein radius (from [[RST Refractive Lensing - Code]]) to the cluster’s published mass profile or \(\theta_E\) for a chosen source redshift.
---
## Alternative: Hubble Frontier Fields (HFF) lens models
Six deep strong-lensing clusters with public lens models (critical curves, magnification).
- **Lens models:** https://archive.stsci.edu/prepds/frontier/lensmodels/
Multiple teams (e.g. CATS/Lenstool, Sharon, Zitrin); FITS and catalogs per cluster.
- **Main HLSP:** https://archive.stsci.edu/prepds/frontier/
Clusters: Abell 2744, MACS J0416, MACS J1149, Abell 370, MACS J0717, MACS J1149.
Place any downloaded HFF lens-model files in a subfolder here (e.g. `frontier/` or `hff/`) if you use them.
---
## Folder layout (suggested)
```
cluster_lensing_data/
README.md (this file)
clash/ CLASH Models (and optionally Data Files, Catalogs) per cluster
psf/ PSF models per filter (CLASH HLSP: hlsp_clash_hst_*_65mas_all_<filter>_v1_psf.fits)
frontier/ (optional: HFF lens models)
```
**Minimum for RST lensing check:** Put CLASH **Models** into `clash/` for one or more clusters. Add **PSF** models under `psf/` only if you need them for your own measurements from the images.
**FTP (same data):** The same data are available via FTP with SSL: `ftp archive.stsci.edu`, then `cd /pub/hlsp/clash`. The server requires TLS. Use the script in this folder to download without manual FTP:
- **Models only (recommended):** `python download_clash_ftp.py` — downloads only the `models/` subtree for each cluster into `clash/<cluster>/models/`.
- **Full tree (data + catalogs + models):** `python download_clash_ftp.py --all`.
- **Specific clusters:** `python download_clash_ftp.py --clusters a383 macs0416 macs1149`.
After downloading, point the RST lensing comparison script (or your own pipeline) at the files in this folder to compare RST deflection / mass profile to the public cluster data.
---
## Pipeline: run RST and compare to CLASH
1. **Download CLASH Models** (and optionally PSFs) as above into `clash/` and `psf/`.
2. **Run comparison:** From this folder run
`python run_clash_rst_comparison.py`
Requires: `numpy`, `matplotlib`, `astropy` (`pip install astropy`).
3. **What it does:** Loads CLASH LensPerfect deflection FITS for each cluster in `clash/`, computes a radial profile (mean |deflection| vs radius), runs the RST refractive solver (same formula as [[RST Refractive Lensing - Code]]), and compares normalized deflection shapes. Outputs:
- `comparison_results/clash_rst_comparison.png` — plot: CLASH vs RST vs GR (baryons-only) radial deflection (normalized).
- `comparison_results/clash_rst_comparison_report.txt` — radii and RST/CLASH ratio at inner/outer bins.
4. **First run:** For the first downloaded clusters (a383 has models; a1423 in the table had no `models/` in the FTP snapshot), only **a383** (Abell 383) is compared. The script uses dimensionless a0 for shape comparison; a full physical comparison would use \(a_0 = 1.04\times 10^{-10}\) m/s² and cluster \(M(r)\).