RGS Forward Response Tutorial
S2Fitting · XMM-Newton RGS · N132D multi-roll fusion

From a sky cube to RGS counts: point sources, extended sources and back-tracing

This tutorial breaks the RGS response into its physical factors: effective area, mirror PSF, exposure map, line-spread function (LSF/RMF) and PI order selection. The same factors then answer three questions: how a monochromatic point source at any position lands on the detector; how an extended source is built from point sources; and, in reverse, which sky positions, which lines and what fractions feed one channel of one strip.

Labels: verified from the algorithm documentation of rgsrmfgen-1.17 shipped with SAS 20.0.0, or from accepted project products; derived computed directly from the grating geometry; schematic the LSF/PSF shapes, bad-column position and N132D model in the interactive figures are teaching toys, not calibration data.

中文版 →

0 Setting the stage: optical path, coordinates and roll

RGS is a slitless dispersive spectrometer. The grazing-incidence mirror focuses the light; on the way to focus about half of the converging beam is intercepted by the reflection grating array (RGA), which deflects it by wavelength onto a row of nine CCDs. The rest continues to EPIC-MOS. Each detected photon carries two positions and one energy:

Sky S(ξ, η, E) each voxel = a monochromatic point source Mirror module effective area A_mir(E) 2-D PSF ψ (HEW ≈ 15″) Reflection grating array grating efficiency → A_m(E) mλ = d(cosβ − cosα) about half → EPIC-MOS Focal camera: 9 CCDs along β CCD: β, x, PI quantum efficiency q(E), exposure map ε(β, x) PI order selection (“banana”)
Figure 0-1. The light path and the response factors. The mirror sets the collecting area and the PSF; the gratings turn wavelength into dispersion angle β and set the efficiency of each order; on the CCDs, the position in β, bad pixels and gaps (the exposure map) and the CCD-energy (PI) order selection are all fixed to the detector and do not move with the source.

Two coordinate frames and the roll angle

Take the target reference point as the origin and write the sky offset as (ξ, η) in arcmin. In observation o the dispersion direction has position angle φo on the sky, set by the spacecraft roll. The source offsets along and across the dispersion are

$$\Delta_D=\xi\cos\phi_o+\eta\sin\phi_o,\qquad \Delta_X=-\xi\sin\phi_o+\eta\cos\phi_o .$$

A different roll rotates (ΔD, ΔX) for the same sky point while the source spectrum stays the same. Multi-roll fusion rests on exactly this.

Why an offset along the dispersion is a wavelength shift derived

In the grating equation

$$m\lambda=d\,(\cos\beta-\cos\alpha)$$

the incidence angle α follows the ray direction. A source displaced by ΔD along the dispersion rotates the whole converging beam by the same angle, so α changes by ΔD. The pipeline converts β to wavelength for the reference position, so the photon is recorded at

$$\lambda_{\rm det}=\lambda+\kappa_m\,\Delta_D,\qquad \kappa_m=\frac{d\sin\alpha}{|m|}\approx\frac{0.124\ \text{Å}}{|m|\ \text{arcmin}} .$$

For RGS α ≈ 1.58° and the groove density is about 646 lines/mm (d ≈ 15 490 Å), so in first order κ ≈ 15 490 × 0.0275 × 2.91×10−4 ≈ 0.124 Å per arcmin. At O VII 21.6 Å, a 1′ offset equals 0.124 Å, about 3.3 eV, or a line-of-sight velocity of about 1 700 km/s. The sign depends on how the DISP axis is defined; it is taken positive below.

In one sentence: for RGS, “where along the dispersion” and “which wavelength” are the same reading. The cross-dispersion direction records essentially only position.

1 A monochromatic point source at any position

Treat one voxel of the sky cube as a monochromatic point source at (ΔD, ΔX) with energy E. The expected counts in observation o, strip k and dispersion channel b are

$$C_{o,k}(b)=T_o\int dE\;F(E)\;R_{o,k}\!\left(b\mid E;\,\Delta_D,\Delta_X\right).$$

To is the exposure in seconds inside the good time intervals (the EXPOSURE of the PHA file) and F(E) the photon flux. The algorithm page of rgsrmfgen writes the response R as a product of two kinds of factor verified:

$$R_{o,k}(b\mid E;\Delta)=\sum_{m}\underbrace{A_m(E)\,L_m\!\big(\beta_b-\beta_m(E,\Delta_D)\mid E\big)}_{\text{moves with the source}}\;\underbrace{Q_{o,k}(b,E;\Delta_X)\,P_m(b,E)}_{\text{fixed to the detector}}\;+\;(\text{large-angle scattering term}).$$

The cross-dispersion “acceptance” and the order-selection efficiency are

$$Q_{o,k}(b,E;\Delta_X)=\sum_{x\in k}\varepsilon_o(b,x)\;\psi_X\!\big(x-\Delta_X\mid\beta_b\big)\;q_o(b,E),\qquad P_m(b,E)=\int_{\text{banana}(b)}\rho(\mathrm{PI}\mid E)\,d\mathrm{PI}.$$

The factors are explained one by one below and then combined in the interactive bench.

1a Effective area Am(E): travels with the photon

Mirror collecting area × fraction intercepted by the gratings × grating efficiency of order m, times the time-dependent effective-area correction (dyneffareacorr, interpolated by observation date from Chebyshev parameters in the calibration files). Over a few arcmin, as for N132D, off-axis vignetting of the mirror is small, so A can be treated as a function of E alone. The CCD quantum efficiency q enters Q separately, per read-out node, because it belongs to the CCD where the photon lands.

1b The mirror PSF: split in two

The mirror PSF ψ is two-dimensional. After the gratings its two directions play completely different roles:

So there is no stand-alone 2-D PSF file that “sends photons to a place on the CCD” and can be used directly: half of it is already part of the LSF.

1c LSF / RMF: maps to β, not to PI

Lm describes how photons of energy E are spread over dispersion channels β, peaking at βm(E, ΔD). When the source moves along the dispersion, the whole LSF shifts in β with almost no change of shape. At 21.6 Å a FWHM of 0.062 Å is about 1.7 eV, finer than the roughly 5 eV of XRISM Resolve, provided the source is a point.

1d Exposure map ε(β, x): fixed to the detector

The exposure map comes from rgsfilter/rgsproc. It contains the live-time fraction within the good time intervals, bad pixels and columns, the gaps between CCDs and the read-out node structure, on the detector (β, x) grid. When the source moves along the dispersion the line shifts in β but a bad column does not, so the same bad column blocks different wavelengths. This is why the ARF cannot be written as a function of E alone: the ARF produced with witharffile=yes already folds in the exposure map and strip acceptance at the reference position, and is valid for that one source position only.

Bookkeeping: To enters once; ε is a fraction between 0 and 1. The project's earlier probe tests already count it this way.

1e PI order selection Pm(b, E): the banana

Different orders overlap at the same β: 21.6 Å in first order and 10.8 Å in second order land at the same place. Their photon energies differ by a factor of two (0.574 keV versus 1.148 keV), which the CCD can separate. The selection region in the (β, PI) plane is curved, the “banana”; Pm is the fraction of the CCD energy redistribution ρ that falls inside it. For a selected first-order spectrum the other orders have P close to, but not exactly, zero.

Figure 1-1. Diffraction orders in the (λdet, PI) plane. The horizontal axis is the channel wavelength in first-order units; a photon of order m has true energy |m|×12.398/λdet keV. The shaded band is a schematic first-order selection region whose width follows the scale of the CCD energy resolution schematic. The vertical line marks O VII r: first order at 0.574 keV and second order at the same place at 1.148 keV are cleanly separated.

1f Factor table

Physical factorWhen the source moves along the dispersionWhen the source moves across the dispersionCalibration file (CCF)
Mirror area, grating efficiency Am(E)essentially unchangedessentially unchangedXRT2/3_XAREAEF, RGS1_EFFAREACORR
LSF Lm (incl. dispersion part of mirror PSF)shifts in βunchangedRGS1_LINESPREADFUNC, XRT2/3_XPSF
Cross-dispersion PSF ψXunchangedshifts relative to the fixed strips; acceptance changesRGS1_CROSSPSF
Exposure map ε (bad columns, gaps, nodes)does not move; blocks different wavelengthsdoes not moveRGS1_BADPIX etc., via rgsfilter
CCD quantum efficiency qdoes not move (belongs to the CCD)does not moveRGS1_QUANTUMEF
PI order selection Pmdoes not movedoes not moveRGS1_REDIST

CCF names are those present in a standard calibration set; only files whose role is unambiguous are listed, and the grating-geometry parameter file is not broken out.

count density (one hue, light → dark)schematic bad columnboundaries of the three fixed strips
Figure 1-2. Point-source bench schematic. Monochromatic O VII r photons (21.622 Å including the LMC redshift z = 0.00093). Top: the image on the detector, with λdet (converted for the reference position) across and cross-dispersion x up; dashed lines bound three fixed strips 0.75′ wide. Bottom: the first-order spectrum in each strip. Drag ΔD: the line moves by 0.124 Å per arcmin in λdet and passes the fixed schematic bad column. Drag ΔX: photons are redistributed among the strips. The cross-dispersion PSF is a Gaussian core plus Lorentzian wings tuned so that about 87 % of a central source lands in the central strip; in the real reference observation 0210681301, the RMF row-sum areas of a central source in the three strips are 2.29 / 42.18 / 3.17 cm², i.e. about 88.5 % of the three-strip total in the central strip.

2 Extended sources: a linear sum of point sources

Photon counts are linear in source brightness. An extended source is every voxel treated as the monochromatic point source of section 1, then summed:

$$C_{o,k}(b)=T_o\iint d\xi\,d\eta\int dE\;S(\xi,\eta,E)\;R_{o,k}\!\big(b\mid E;\,\Delta_D(\xi,\eta),\,\Delta_X(\xi,\eta)\big).$$

Discretized, this is a matrix product \(\mathbf C_{o,k}=\mathbf G_{o,k}\,\mathbf s\): s holds the amplitudes of each spectral component in each voxel, and each column of G is the count spectrum of “this component at this position” folded through the response of section 1. The project's 27-path operator is G sampled at the centres of a 3×3 grid.

2a Four consequences

  1. Extent along the dispersion becomes line broadening. Each voxel's line moves by κΔD in λdet; summed, the line profile is the source brightness projected on the dispersion axis convolved with the point-source LSF. N132D spans about 1.5–2′, i.e. 0.19–0.25 Å, or about 5–7 eV at O VII, three to four times the point-source LSF.
  2. Position and velocity are degenerate. A line-of-sight velocity v shifts a line by λv/c. In a single roll this is identical to a change of ΔD: \(\delta\Delta_D=\lambda v/(c\,\kappa)\approx0.58'\,(v/1000\ \mathrm{km\,s^{-1}})\) at 21.6 Å. Between rolls the position shift rotates with ΔD and the velocity shift does not, which is what separates them.
  3. Mixing across the dispersion. A strip collects not only its own patch of sky but also photons from neighbouring sky leaking through the wings of ψX. These are the extra paths of the 27-path operator over the 9-path one.
  4. Detector features are softened. Voxels at different ΔD place the same line at different β, so a bad column blocks only part of them; in the summed spectrum it becomes a shallow dip instead of the full notch of a point source. This requires the exposure map to be applied on the detector, not shifted with the source.

2b The standard extended-source approximation and its assumptions

rgsrmfgen with withangdist=yes (and the XSPEC convolution model rgsxsrc) provides the standard treatment: a one-dimensional angular distribution p(ΔD) along the dispersion is convolved into the narrow LSF. According to the documentation the distribution has the same shape at all energies and is rescaled to channels by order and central energy verified. This amounts to assuming

$$S(\xi,\eta,E)=f(E)\,I(\xi,\eta)\;\Rightarrow\;R^{\rm ext}_{k}(b\mid E)=\int d\Delta_D\;p(\Delta_D)\,R_k\!\left(b\mid E;\Delta_D,\,\Delta_X^{\rm ref}\right),\qquad p(\Delta_D)=\int_{k}I\,d\Delta_X .$$

It requires one spectrum for the whole source (no velocity field, no line-ratio variation), and evaluates the cross-dispersion acceptance at the reference position. Because angdist is convolved into the LSF while the exposure map is still applied where photons land, bad columns are handled correctly. One caution: do not convolve the mirror PSF a second time. p(ΔD) should be the intrinsic brightness of the source, since the mirror PSF is already in the point-source LSF; switch off withmirrorpsf only if p is taken from an image that already contains the PSF.

The voxel-by-voxel sum (the integral at the start of this section) makes none of these assumptions: every voxel can have its own spectrum, velocity and line ratios, and the cross-dispersion acceptance follows its true position. The price is that G gains a column per voxel and component, and each column needs one point-source response.

Sky brightness (schematic). Arrow: dispersion direction +ΔD; dashed band: the sky region of the selected strip; thin grid: the common 3×3 sky grid (0.75′).

voxel-by-voxel sum (reference)single-spectrum angdist approximationcentral point source
Figure 2-1. Extended-source bench schematic. Toy N132D: a shell of radius 0.75′ (brighter to the south, r:i:f = 1:0.15:0.60, east–west velocity gradient of ±500 km/s), plus a knot at (−0.35′, +0.45′) with line-of-sight velocity +1200 km/s and r:i:f = 1:0.30:1.30. The three curves are normalized to the same total counts, so only shapes are compared. Rotate the roll: the voxel-by-voxel answer changes with the projection; the angdist approximation follows only the brightness projection and loses the velocity and line-ratio differences; the point source does not change at all. With the velocity field and the knot switched off, the angdist approximation almost coincides with the reference, showing that its error comes from the single-spectrum assumption.

3 Looking back from the CCD: where do the photons of this channel come from?

Read the sum of section 2 backwards. For observation o, strip k and channel b, the fraction contributed by sky position (ξ, η) and energy E is

$$w_{o,k,b}(\xi,\eta,E)=\frac{T_o\,S(\xi,\eta,E)\,R_{o,k}\!\big(b\mid E;\Delta(\xi,\eta)\big)}{C_{o,k}(b)},\qquad \iint\!\!\int w\,d\xi\,d\eta\,dE=1 .$$

For a line of rest wavelength λℓ, only sky positions that satisfy

$$\Delta_D^{(\ell)}(\xi,\eta)\approx\frac{\lambda_b-\lambda_\ell\,(1+z+v/c)}{\kappa}\;\pm\;\frac{\mathrm{FWHM}_{\rm LSF}}{2\kappa}$$

can send photons into channel λb. On the sky this is a narrow band perpendicular to the dispersion direction, about 0.5′ wide (0.062 Å / 0.124 Å per arcmin). Each line has its own band; the bands are parallel and offset by (λi−λr)/κ ≈ 1.65′ and (λf−λr)/κ ≈ 4.0′. Across the dispersion the bands are cut by the strip (plus the wings of ψX). A velocity field bends the bands, because v changes with position. The continuum comes from all positions, each contributing its continuum at λb−κΔD.

Three more sources of counts lie outside the sky cube and need separate bookkeeping:

The bench below draws two rolls for the same channel. The bands have different directions in the two rolls; only where they intersect are the position and velocity consistent with both observations. That is the geometric meaning of multi-roll fusion.

O VII r (21.602 Å)O VII i (21.807 Å)O VII f (22.101 Å)continuum
Figure 3-1. Back-tracing bench schematic. One column per roll. Each sky pixel takes the colour of its largest component; the depth of colour is proportional (linearly) to its contribution to the selected channel, over a pale grey sky brightness. Hover to see one pixel's breakdown. The vertical line in the small spectrum marks the selected channel. The bars give the fraction from each spectral component; the 3×3 table gives the fraction from each common sky cell, with the part outside listed separately. Put λb near the r line and open the angle between the rolls from 0° to 90°: the band that supplies r photons rotates with the roll. Move λb to 21.70–21.75 Å: r photons come from the +ΔD side and i photons from the −ΔD side (the two bands are 1.65′ apart), so one channel mixes two lines. The knot's +1200 km/s moves its band by about 0.7′.

4 Back to the project

What the current 27-path operator does

The 27-path operator of the reference observation 0210681301 samples Ro,k at the nine centres of a common 3×3 sky grid: the source position given to rgsrmfgen is moved through a private source list while the three extraction strips stay fixed, giving 9 positions × 3 strips verified (accepted probes of the reference observation). It is not a “point sources only” approximation. Building an extended source from point-source responses is exactly the linear sum; the limits are that each cell is represented by its centre (within-cell integration is not yet validated) and that every position needs its own rgsrmfgen run (about one minute and about 29 MB per file on our machine). With several rolls, the same nine sky cells map through each observation's φo to their own (ΔD, ΔX): 3 observations × 3 strips × 9 cells = 81 paths (not yet run).

Refining the cube without paying N times

The factor table of section 1 points to a shortcut: only A·L moves with the source, while ε, q, the ψX acceptance and P stay on the detector. In principle, then, no new response is needed along ΔD: shift the LSF and multiply by the detector factors; only a few positions along ΔX are needed. This rests on three acceptance tests proposed, not yet run:

  1. At fixed ΔX and several ΔD, compare “shift plus detector factors” with direct rgsrmfgen output, and measure the shift invariance and the deviations at bad columns and gaps.
  2. The relative L1 error at held-out positions not used to build the emulator, against the threshold of 0.001 used in the earlier probe tests.
  3. The standard extended-source response from withangdist, compared with the emulator's integral in the single-spectrum case.

Once these pass, a cube of any resolution and any roll can use the same emulator for mocks and fits. Reproducing the pipeline does not remove calibration uncertainty: the effective area (a few per cent), the LSF wings and, above all, the pointing and wavelength zero point of each observation remain nuisance parameters. The last matters most for velocities: a 1″ pointing error is about 2 mÅ, or about 30 km/s.

What “XRISM level” means here

At O VII 21.6 Å the first-order RGS LSF for a point source is about 1.7 eV FWHM, already finer than the roughly 5 eV of Resolve. The 1.5–2′ extent of N132D broadens it to about 5–7 eV, the Resolve scale, and within one roll position and velocity are degenerate. The aim of multi-roll fusion is to use the fact that the position term rotates between rolls while the velocity term does not, to decompose the extended-source broadening back into a spatial distribution and a velocity field and approach point-source resolution. Also, to our knowledge the Resolve gate valve has not been opened, so Resolve has almost no effective area below about 1.7 keV and the O VII band still relies on RGS.

What on this page is established

ContentStatusBasis
Factor structure of the response (narrow/broad LSF, ε×ψX acceptance, q, PI selection, angdist behaviour)verifiedrgsrmfgen-1.17 algorithm documentation shipped with SAS 20.0.0
Central-source areas in the three strips, 2.29 / 42.18 / 3.17 cm²verifiedaccepted probes of reference observation 0210681301
κ ≈ 0.124 Å per arcmin, velocity–position and eV conversionsderivedgrating equation with nominal α and d
LSF/PSF shapes, bad-column position and N132D model in the benchesschematicteaching toys; not for quantitative conclusions
White-box emulator and its three testsproposedawaiting acceptance