Terry Hubble Observations of Roman (THOR) is a Data Reduction Pipeline (DRP) for parallel HST Wide-field Camera 3 (WFC3) and Advanced Camera for Surveys (ACS) images taken as part of program GO-17776 (Terry et al.), a Precursor Survey of the Roman Galactic Bulge Time Domain Survey (GBTDS) Fields.
Hubble Advanced Mining Routine for Roman (HAMRR; pronounced "Hammer") is a subroutine which performs a cone search on the HST catalog and returns a list of stars with measured photometry, astrometry, color-magnitude diagrams luminosity functions, image cutouts, and more.
Installing THOR/HAMRR is straightforward. From a terminal, type:
git clone https://github.com/skterry/THOR.git
cd THOR
pip install -e .The pipeline is fully self-contained: every file THOR/HAMRR needs to run — the
PSF models, the geometric-distortion correction (GDC) reference files, the test
images, and the survey catalog — either already exists in the repo or is
downloaded automatically during pip install -e .. There are no additional
manual download steps.
This install command performs the full setup:
-
Compiles the Fortran sources in
src/thor/(hst1pass.F,thor_go_gaia.F, andthor_go_nogaia.F). Most Fortran compilers are supported (gfortran, ifort/ifx, flang, ...); however you can force a specific one withmake FC=<compiler>insrc/thor/, or by settingFCbefore installing. -
Downloads the reference files that
hst1pass/thor_gouse for PSF fitting and distortion correction. These are the standard STScI library products for WFC3/UVIS and ACS/WFC in F606W and F814W:a. PSF models (
STDPSF_*.fits) live insrc/thor/PSFs/.b. Geometric-distortion correction files (
STDGDC_*.fits) are downloaded tosrc/thor/GDCs/. -
Downloads two large data files (~1 GB each) into
data/. These are:a. A sample of images (from field HD_138) to test the THOR data reduction.
data/field_HD138/b. The full catalog of sources detected in the HST bulge survey.
data/thor_hst_wfc3_acs_bulge_v0.2_cat.fits.zipnote: this is a shared-risk catalog and has not been peer-reviewed or published (as of June 2026).
Reducing the HST bulge survey data with THOR requires two steps:
-
Reduce the ACS and WFC3 images:
source reduce_acs.src source reduce_wfc3.src
-
Collate the reduced data:
source collate_thor.src
These scripts can be run from inside the directory example/thor_HD138/*.XYM/ to learn the reduction process. If you have downloaded
external images from the survey and wish to reduce them with THOR, you will need to modify all *.src scripts.
Using HAMRR to query the HST bulge survey catalog(s) is relatively straightforward:
python path/to/hamrr.pyHAMRR can be run in two modes:
-
Interactive-mode via command line interface (CLI). This mode runs if there is no param file present (see below).
-
Parameter-file mode: If the file named
params.inexists in the directory wherehamrr.pyis run, the code will read all pre-defined arguments given in the param file.
Required arguments for hamrr.py:
catalog_path: Path to THOR-generated catalog (e.g./data/hlsp_thor_hst_wfc3_acs_bulge_early-release_v1.0_cat.fits.zip)ra: Right Ascension sky coordinate (Decimal degrees, HMS/DMS, or Colon-separated)dec: Declination sky coordinate (Decimal degrees, HMS/DMS, or Colon-separated)radius_arcsec: Search radius (arcseconds)
Optional arguments for hamrr.py:
save_results: Save the result table to a file? (yes/no) default: nosave_format: File format for saved table (fits/ecsv/votable) default: noneplot_cmd: Save the V-I, I color-magnitude diagram (CMD)? (yes/no) default: noplot_lf: Save a luminosity function (LF)? (yes/no) default: nolf_band: Passband for LF (F606W/F814W) default: F814Wlf_normalise: Normalize the LF by sky area? (yes/no) default: noneimage_cut: Save cutout images centered on queriedra, dec? (yes/no) default: noimagecut_size: Pixel size for the cutout (pix). default: pixel size cutout will match cone search size fromradius_arcsecargument aboveoutput_dir: Output directory name. default:output/
If you use data from the early-release catalog in data/hlsp_thor_hst_wfc3_acs_bulge_early-release_v1.0_cat.fits.zip
please cite the following work:
@article{terry2026hst,
title={An HST Wide-field Survey of the Galactic Bulge: Overview, Strategy, and First Results},
author={Terry, Sean K and Anderson, Jay and Beichman, Charles A and Bennett, David P and Bhattacharya, Aparna and Beaulieu, Jean-Philippe and Gaudi, B Scott and Green, Joel and Huston, Macy J and Lu, Jessica R and others},
journal={The Astrophysical Journal Letters},
volume={1003},
number={1},
pages={L1},
year={2026},
publisher={The American Astronomical Society}
}
If you use data from the full (shared-risk) catalog in data/thor_hst_wfc3_acs_bulge_v0.2_cat.fits.zip
please cite the following work:
@article{terry2026thor,
title={THOR and HAMRR},
author={Terry, Sean K and Anderson, Jay},
journal={Research Notes of the AAS},
volume={10},
number={6},
pages={167},
year={2026},
publisher={The American Astronomical Society}
}