Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ site is being built up section by section.
:hidden:

system/index
reference/index
project/index
log/index
```
8 changes: 8 additions & 0 deletions project/day-one.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ cd rapid
git config core.hooksPath .githooks # the public-safety check, before your first push
```

A blobless clone downloads the full commit history but fetches the
contents of past versions of a file only when a command needs them, so
it is faster to make:

```sh
git clone --filter=blob:none -b rebuild git@github.com:Caltech-IPAC/rapid.git
```

## One epoch on your workstation

Run this on your workstation, the Personal EC2 from Setup above, not on a
Expand Down
33 changes: 33 additions & 0 deletions reference/access.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Access

This page states only what RAPID has already published about access to
its outputs, each statement with the published page it rests on. It
gives no date, location or address beyond those pages. What is
available, once it is, will be stated on this site's reference pages
([home page](../index)).

RAPID's outputs are public, for the whole time-domain astronomy
community. They are a public alert stream of transient and variable
candidates, carrying alert-driven forced-photometry histories, and
public source catalogs ([home page](../index)).

The alert stream keeps two months of alerts. The stream is not the
archive, so an archive with stated retention and ownership must exist
before alerts are published
([specification, Constraints](../system/specification.md#constraints)).

How alerts reach brokers and MAST, and how RAPID receives Roman's data,
has not been decided ([specification,
Edges](../system/specification.md#edges)). The working
target, which the team has yet to confirm, is that a detector image's
alerts are current within about an hour of the image's delivery to
RAPID ({ref}`latency <decision-latency>`).

What an alert contains, field by field, is on the [alert
packet](../system/alerts.md#the-alert-packet-schema-0008) page.

The pipeline's software is public under the BSD 3-Clause License, and
this site's text under CC BY 4.0 ([Project](../project/index)).
Questions go to <rapid@ipac.caltech.edu>, and announcements to the
community go to the `rapid-announce@lists.ipac.caltech.edu` list
([Team and contact](../project/team)).
39 changes: 39 additions & 0 deletions reference/acronyms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Acronyms

The acronyms in the pipeline's code at `rebuild` commit `ce36bb4a`
(2026-11-30) and on this site. Each expansion is the one its source
spells, and the Source column names where it was read: the code, a page
of this site, or the defining organisation's public page (read
2026-12-01). An acronym whose expansion no source read here states is
given its meaning in the pipeline instead.

| Acronym | Meaning | Source |
|---|---|---|
| ASDF | Advanced Scientific Data Format, the format of Roman's WFI data products and of the L2 files the pipeline reads | [ASDF Standard](https://www.asdf-format.org/projects/asdf-standard/en/latest/) |
| CRDS | Calibration Reference Data System, STScI's service for calibration reference files; the `psf` stage fetches the ePSF reference from it by name | [HST CRDS](https://hst-crds.stsci.edu/) |
| DSC | Discrete Source Classifier, Gaia DR3's source classification; its probabilities are in `gaiaMatch` | [Gaia DR3 Apsis III](https://arxiv.org/abs/2206.06710) |
| ePSF | effective PSF; the `psf` stage reduces the CRDS ePSF reference to the pipeline's science PSF | [difference](../system/difference) |
| FITS | Flexible Image Transport System, the format of every image the pipeline writes after intake | [FITS Support Office](https://fits.gsfc.nasa.gov/) |
| GBTDS | Galactic Bulge Time-Domain Survey, one of Roman's core community surveys | [STScI, Roman surveys and programs](https://www.stsci.edu/roman/surveys-and-programs.html) |
| HEALPix | Hierarchical Equal Area isoLatitude Pixelation of a sphere; `hp6` and `hp9` are nested HEALPix indexes at orders 6 and 9 | [HEALPix](https://healpix.sourceforge.io/) |
| HLWAS | High-Latitude Wide-Area Survey, one of Roman's core community surveys | [STScI, Roman surveys and programs](https://www.stsci.edu/roman/surveys-and-programs.html) |
| ICRS | International Celestial Reference System, the frame of every position in a packet | [USNO](https://aa.usno.navy.mil/faq/ICRS_doc) |
| IPAC | Infrared Processing and Analysis Center, at Caltech, where RAPID is based | [IPAC](https://www.ipac.caltech.edu/) |
| KONA | the solar-system prediction module the packet stage's solar-system match uses (`rapidpipe.science.alerts.kona`), from propagated Minor Planet Center orbits | code: `[packet]` settings |
| L2 | the SOC's calibrated image of one exposure on one SCA, the `_cal.asdf` file the `intake` stage reads | code: `rapidpipe/stages/intake.py` |
| LVS | Local Volume Sample, NED's local-volume galaxy catalog (NED-LVS), matched into `lvsMatches` | [NED](https://ned.ipac.caltech.edu/) |
| MAST | Barbara A. Mikulski Archive for Space Telescopes | [MAST](https://archive.stsci.edu/) |
| MJD | Modified Julian Date, the time unit of every `Mjd` field | [loop](../system/loop) |
| MPC | Minor Planet Center, of the International Astronomical Union; `ssMatch.designation` is its designation | [MPC](https://data.minorplanetcenter.net/swamo) |
| NED | NASA/IPAC Extragalactic Database, matched into `nedMatches` | [NED](https://ned.ipac.caltech.edu/) |
| PIT | Project Infrastructure Team, what RAPID is for the Roman mission | [home page](../index) |
| RAPID | Roman Alerts Promptly from Image Differencing | [home page](../index) |
| RuBR-AT | the real/bogus classifier that scores each difference-image detection; its score is `reliability` | code: `param_registry.py` |
| RUWE | re-normalised unit weight error, Gaia's astrometric fit quality, in `gaiaMatch.ruwe` | [ESA, Gaia DR2 known issues](https://www.cosmos.esa.int/web/gaia/dr2-known-issues) |
| SCA | Sensor Chip Assembly, one of the WFI's 18 detectors; `detector` in a packet | [Roman documentation](https://roman-docs.stsci.edu/roman-instruments/the-wide-field-instrument/wfi-characterization-activities/wfi-ground-testing-campaigns) |
| SFFT | Saccadic Fast Fourier Transform, the image-subtraction method of the published difference image | [Hu et al., arXiv:2109.09334](https://arxiv.org/abs/2109.09334) |
| SIP | Simple Imaging Polynomial, the FITS convention for image distortion | [FITS registry, SIP](https://fits.gsfc.nasa.gov/registry/sip.html) |
| SMDC | the NASA AWS environment RAPID runs in, reached through the SMDC AWS portal | [day one](../project/day-one) |
| SOC | Science Operations Center; STScI is Roman's | [STScI, Roman partners](https://www.stsci.edu/roman/about/partners) |
| WFI | Wide Field Instrument, Roman's imager | [STScI, Roman](https://www.stsci.edu/roman) |
| ZOGY | the image-subtraction method of Zackay, Ofek and Gal-Yam (2016), run beside SFFT as a diagnostic | [licence audit](../log/2026-11-08-licence-audit) |
23 changes: 23 additions & 0 deletions reference/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Reference

Short reference pages for a reader of RAPID's outputs, each read from the
pipeline's code on its `rebuild` branch at the commit it names. They are
placeholders, written before the first community data release, and are
revised in place as the pipeline changes.

- [The alert packet](../system/alerts.md#the-alert-packet-schema-0008): every field of schema 00.08, with its type and meaning
- [Products and formats](products): what each stage makes and in what format
- [Quality columns and InfoBits](quality): the status, InfoBits and quality measurements on each image
- [Sky tiling](tiling): the fields the sky is divided into, and the HEALPix indexes beside them
- [Acronyms](acronyms)
- [Access](access): what RAPID has published about access to its outputs

```{toctree}
:hidden:

products
quality
tiling
acronyms
access
```
36 changes: 36 additions & 0 deletions reference/products.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Products and formats

Read from the pipeline's `rebuild` branch at commit `ce36bb4a`
(2026-11-30), from each stage module's docstring and the files it writes.
This page lists what the pipeline makes today, a placeholder until RAPID
publishes products. What reaches users, and where, is on
[Access](access).

Each stage job writes its files under its own prefix, with a
`manifest.json` written last, and declares rows in the pipeline's
database. A row names its file by path and MD5 checksum. Every FITS file
the pipeline keeps is gzipped at level 1 (`.fits.gz`).

| Stage | What it makes | Format |
|---|---|---|
| `intake` | One calibrated SOC L2 image (`<stem>_cal.asdf`) converted to FITS, the pixels its DQ bits mark set to NaN, with its limiting magnitude measured: `<stem>_cal.fits.gz` | gzipped FITS; an `l2files` row and, for one SCA of each exposure, an `exposures` row |
| `psf` | The science PSF of one filter and SCA, reduced from the CRDS ePSF reference the L2 file names, normalised to unit sum: `sciimage_psf_<filter>_sca<NN>.fits` | FITS; a `psfs` row |
| `reference` | A field's reference image, coadded by awaicgen from the L2 images that overlap the field in one filter: the mosaic, its coverage map and its uncertainty image, 9,100 pixels square at 0.11 arcsec per pixel, north up, centred on the field's [tile](tiling); the mosaic's SExtractor catalog; with the PSF-fit catalog enabled, the PSF used and the Photutils PSF-fit catalog | gzipped FITS; SExtractor text catalog; PSF-fit catalog as text and Parquet; `refimages`, `refimimages`, `refimcatalogs` and `refimmeta` rows, the last holding the [quality columns](quality) |
| `difference` | One epoch minus its reference. SFFT's positive difference image (`sfftdiffimage_masked.fits.gz`), its uncertainty, its mask and its PSF are published; ZOGY's and the naive subtraction's images are kept beside them as diagnostics. Also the background-subtracted science image and the resampled, gain-matched reference the cutouts are cut from, and the positive and negative PSF-fit catalogs of SFFT and ZOGY | gzipped FITS; PSF-fit catalogs as Parquet; a `diffimages` row; the source sets (`sources` from the PSF-fit catalogs, `xsources` from SFFT's SExtractor catalogs), and the objects and memberships each source joins |
| `packet` | The alert packets of one difference image: `packets/<expid>-<sca>-<fid>.avro`, one Avro object container, deflate level 1, one record per block, schema 00.08 ([fields](../system/alerts.md#the-alert-packet-schema-0008)); beside it `packets.parquet` (each record's block offset and length), `forced.parquet` (the forced photometry the packets carry) and `external.parquet` (the catalog matches) | Avro; Parquet |

The packet job also sends each packet, its Avro block, to the alert
topic as one message.

## Fluxes and identifiers

The fluxes in the packets are in nJy, each calibrated with its own
image's AB zero point (`zptmag`, the magnitude of 1 DN/s) and the value of
the image's pixel area map at the source. The database tables and
the Parquet files keep the instrumental fluxes.

Images and catalogs carry the pipeline's own identifiers: `expid` for an
exposure (a serial the database hands out, the same for every SCA of the
exposure, with the Roman observation identifiers beside it), `rid` for an
L2 image, `rfid` for a reference, `pid` for a difference image, and
`field` for the [sky tile](tiling) an image is centred on.
117 changes: 117 additions & 0 deletions reference/quality.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Quality columns and InfoBits

Read from the pipeline's `rebuild` branch at commit `ce36bb4a`
(2026-11-30): `database/schema.sql`, `cdf/infobitsref.txt`,
`rapidpipe/science/reference/infobits.py`,
`rapidpipe/products/diffimage.py`,
`rapidpipe/science/difference/metrics.py` and the `[reference.infobits]`
and `[gate]` tables of `rapidpipe/settings/foundation-thin.toml`.

Three kinds of quality record exist. Each image row carries a `status`
and an InfoBits mask; a reference also has a row of measurements; and
each difference job records quality numbers that the quality gate reads
before the job's alerts are sent.

## Status and InfoBits on each image row

| Table | Column | Meaning |
|---|---|---|
| `l2files` | `status` | 1 when intake converted the file; 0 is the column's default |
| `l2files` | `infobits` | always 0: no bit is defined for an L2 image |
| `refimages` | `status` | 1, or 0 when a fatal InfoBit is set (below). A status 0 reference is published but its binding is refused, so no difference is made against it |
| `refimages` | `infobits` | the reference's InfoBits (below) |
| `diffimages` | `infobitssci` | the catalog-outcome mask (below) |
| `diffimages` | `infobitsref` | the InfoBits of the reference it was made against |
| `diffimages` | `status` | 1 when the difference job finished |
| `psfs` | `status` | 1 when the PSF was made |

## A reference's InfoBits

The reference stage grades each new reference. A bit is set when its
condition holds. A measurement that could not be made sets no bit. The
thresholds are `[reference.infobits]`'s, values the pipeline inherited as
provisional ("loose enough that a normal reference image raises no
bit"). Bits 5, 6, 7 and 16 are evaluated only when the reference's
PSF-fit catalog is enabled (`[reference.psfcat] enabled`): a catalog that
was not attempted is not one that failed. The bits listed in
`fatalinfobits` set the reference's status to 0. The bits not listed are
reserved. The mosaic's FITS header carries each defined bit's definition
as a `BITnn` card, with the threshold filled in.

| Bit | Value | Set when | Threshold |
|---|---|---|---|
| 0 | 1 | the mosaic's median background is above `t00` | 1.0 DN/s |
| 1 | 2 | the robust pixel noise, 0.5 (p84 − p16), is above `t01` | 0.1 DN/s |
| 2 | 4 | NaN or saturated pixels are more than `t02` per cent of the covered pixels | 65 per cent |
| 3 | 8 | the mode of the point sources' FWHM in the SExtractor catalog is above `t03` | 1.0 arcsec |
| 4 | 16 | the 90th percentile of the same sources' FWHM is above `t04` | 2.0 arcsec |
| 5 | 32 | the limiting magnitude from the PSF-fit catalog's flux uncertainties is below `t05` | 15.0 mag |
| 6 | 64 | the limiting magnitude from the background noise and the PSF is below `t06` | 15.0 mag |
| 7 | 128 | the PSF-fit catalog has fewer than `t07` sources | 10 |
| 8 | 256 | the SExtractor catalog has fewer than `t08` sources | 10 |
| 10 | 1024 | the robust spread, 0.5 (p84 − p16), of the coadded frames' zero points is above `t10` | 3.5 mag |
| 16 | 65536 | the PSF-fit catalog could not be made | |

Pixels are in DN/s at the filter's reference zero point, and both
limiting magnitudes are at S/N 5 (`maglim_snr`).

## A difference image's catalog-outcome mask

`diffimages.infobitssci` has one bit for each differencer and sign, set
when no Photutils PSF-fit catalog was produced for that image and sign.
When ZOGY is switched off its two bits are never set.

| Bit | Value | No PSF-fit catalog for |
|---|---|---|
| 0 | 1 | ZOGY, positive |
| 1 | 2 | ZOGY, negative |
| 2 | 4 | SFFT, positive |
| 3 | 8 | SFFT, negative |
| 4 | 16 | naive subtraction, positive |
| 5 | 32 | naive subtraction, negative |

## A reference's measurements: `refimmeta`

One row per reference, the columns of the pipeline it was ported from.

| Column | Meaning |
|---|---|
| `field`, `fid` | the reference's sky tile and filter |
| `hp6`, `hp9` | the level-6 and level-9 nested HEALPix indexes of its centre |
| `nframes` | images in the stack |
| `mjdobsmin`, `mjdobsmax` | the earliest and latest MJD of the input images |
| `npixnan` | NaN pixels in the reference image |
| `clmean`, `clstddev`, `clnoutliers` | the pixel mean after clipping, the standard deviation after clipping and reinflating, and the pixels clipping discarded |
| `gmedian` | the global pixel median |
| `datascale` | the global robust spread, 0.5 (p84 − p16) |
| `gmin`, `gmax` | the global minimum and maximum pixel values |
| `cov5percent` | the coverage-depth metric, for a depth of at least 5 |
| `medncov` | the median of the depth-of-coverage image |
| `medpixunc` | the median of the uncertainty image |
| `fwhmmedpix`, `fwhmminpix`, `fwhmmaxpix` | the median, minimum and maximum `FWHM_IMAGE` of the SExtractor catalog's point sources, in pixels |
| `nsxcatsources` | sources in the SExtractor catalog |
| `npucatsources` | sources in the Photutils PSF-fit catalog when it was attempted; null when none is made |

## A difference job's quality numbers

The difference job records these in its manifest's `metrics`, and the
database's `job_metrics` view exposes them. A number the job could not
measure, for too few stars or no sources, is absent, never zero.

| Metric | Meaning |
|---|---|
| `core_fraction`, `ring_fraction` | at isolated bright reference stars, the difference image's sum within the core radius, and between it and the ring radius, over the star's reference flux; each the median over the stars used, counted in `n_residual_stars`. Near zero for a clean subtraction |
| `registration_dx_px`, `registration_dy_px` | the median centroid of the science image minus the reference's at the reference stars, in pixels, counted in `n_registration_stars` |
| `usable_fraction` | the difference image's pixels that are finite and at or above the coverage threshold, over all its pixels |
| `n_sources`, `n_sources_snr_gt20` | the sources kept, and those whose fit flux over its error is above 20 |
| `on_reference_star_fraction` | the share of the sources within a few pixels of a reference catalog source |
| `n_in_bright_footprint`, `bright_footprint_fraction` | the sources inside a bright reference source's footprint, and their share of the sources above the bright S/N cut |
| `sci_star_sigma_px` | the median second-moment width of the registration stars on the science image, beside the ePSF's `sci_psf_sigma_px` |
| `n_sources_near_bright_px`, `n_sources_ring_snr_gt20` | sources near a bright reference pixel, and bright sources in a ring around the brightest stars, two counts of subtraction residuals |

The quality gate holds a difference image's alerts back when, once the
run has `[gate] min_epochs` published differences, its
`n_sources_snr_gt20` is above a factor times the run's median, its
`core_fraction` or `ring_fraction` is beyond its bound, its
`usable_fraction` is below `usable_fraction_min`, or its registration
offset is above `registration_max_px`.
Loading