<figure><img src="image_1.png" /></figure>

ORIGINAL ARTICLE

Astronomische
Nachrichten

Photometry and astrometry with JWST-II: NIRCam
distortion correction

M. Griggio<fnref n="1" />,<fnref n="2" />✉

D. Nardiello<fnref n="1" />,<fnref n="3" />✉

L. R. Bedin<fnref n="1" />✉

Correspondence

L. R. Bedin, Istituto Nazionale di
Astrofisica, Osservatorio Astronomico di
Padova, Vicolo dell'Osservatorio 5,
Padova, IT-35122, Italy.

Email: luigi.bedin@inaf.it

Funding information

Istituto Nazionale di Astrofisica;
Ministero dell'Istruzione, dell'Università e
della Ricerca, Grant/Award Number:
2017Z2HSMF

Abstract

In preparation to make the most of our own planned *James Webb Space Telescope* investigations, we take advantage of publicly available calibration and early-science observations to independently derive and test a geometric-distortion solution for NIRCam detectors. Our solution is able to correct the distortion to better than ~0.2 mas. Current data indicate that the solution is stable and constant over the investigated filters, temporal coverage, and even over the available filter combinations. We successfully tested our geometric-distortion solution in three cases: (i) field-object decontamination of M 92 field; (ii) estimate of internal proper motions of M 92; and (iii) measurement of the internal proper motions of the Large Magellanic Cloud system. To our knowledge, the here-derived geometric-distortion solution for NIRCam is the best available and we publicly release it, as many other investigations could potentially benefit from it. Along with our geometric-distortion solution, we also release a Python tool to convert the raw-pixels coordinates of each detector into distortion-free positions, and also to put all the ten detectors of NIRCam into a common reference system.

KEYWORDS

astrometry, techniques: image processing

1 | INTRODUCTION,
OBSERVATIONS, DATA-REDUCTION

The characterization of the geometric distortion (GD) of
an imager is of paramount importance to assess its use for
high-precision astrometry. This is particularly important
in the case of cameras of an out-of-atmosphere, brand-new
instrument, such as the *James Webb Space Telescope*
(JWST), arguably the world-wide most-important
astronomical facility.

In this work, we made use of part of JWST
public data collected with the Near Infrared Camera<fnref n="1" />
(NIRCam) under the Cycle 1 Calibration Program 1476
(PI: M. Boyer) to derive its GD correction. While standard
pipeline products for GD corrections of JWST's cam-
eras are expected to be released in the future by other
teams, we provide with this work the first, indepen-
dent, documented, and publicly available GD correction

<footnote n="1">¹Istituto Nazionale di Astrofisica,
Osservatorio Astronomico di Padova,
Padova, Italy</footnote>

<footnote n="2">²Dipartimento di Fisica, Università di
Ferrara, Ferrara, Italy</footnote>

<footnote n="3">³CNRS, CNES, Aix Marseille University
LAM, Marseille, France</footnote>

<footnote n="1">¹https://jwst-docs.stsci.edu/jwst-near-infrared-camera.</footnote>
<figure><img src="image_2.png" /></figure>

<figure><img src="image_3.png" /><figcaption>**FIGURE 1** (Left) depth-of-coverage of the 9 pointings for each considered filter in the SW channel. The studied region in the LMC cover about 6' × 3', and shows large overlaps between the SW's detectors. (Right) a three-color view of the region, where F090W, F150W, and F444W were used for blue, green, and red color, respectively.</figcaption></figure>

that allows an accuracy of ~ 0.2 mass on the stellar positions.

This paper is part of a series to build-up our capabilities to obtain *state-of-the-art* imaging astrometry and photometry with JWST. This is a necessary task for us to properly prepare and maximize the scientific returns of our planned (March 2023) proprietary JWST observations (GO-1979, PI: Bedin).

In our first paper Nardiello et al. (2022) (hereafter Paper I), we describe the procedure to derive high-accuracy point-spread functions (PSFs) for NIRCam in some filters, an essential step to derive high-precision photometry, especially in crowded environments. We made those PSFs publicly available.<fnref n="2" /> In this second paper, we also release to the public our GD correction of NIRCam.

Calibration Program 1476 will derive the GD for both channels of NIRCam by observing with JWST the Large Magellanic Cloud (LMC) calibration field observed multiple times with the Hubble Space Telescope (HST). This field is centered at $\alpha = 80^{\circ} .49030, \delta = -69^{\circ} .49816$, and is described in the JWST technical report Anderson et al. (2021).

However, in the present work we will not make use of this HST astrometric catalog to derive our GD correction of NIRCam. Instead, we will make use just of the new JWST observations to self-calibrate (i.e., to calibrate without exploiting observations of standard astrometric fields), leveraging the existing Gaia Data Release 3 (DR3) (Gaia Collaboration et al. 2022) to constrain the linear terms of our GD solution. In this sense, our work is an independent analysis and solution of the NIRCam GD, to be compared in the future with those that will be released by the instrument team.

We employed the set of images collected with the Short Wavelength (SW) channel in F090W, F150W, and

<table><caption>**TABLE 1** Log of the observations employed in this work.</caption><thead><tr><th>Filter</th><th>Pupil</th><th>t<sub>exp</sub> [s]</th><th>Readout pattern</th><th>N<sub>exp</sub></th></tr></thead><tbody><tr><td>F090W</td><td>CLEAR</td><td>21.474</td><td>RAPID</td><td>9</td></tr><tr><td>F150W</td><td>CLEAR</td><td>21.474</td><td>RAPID</td><td>9</td></tr><tr><td>F150W2</td><td>CLEAR</td><td>21.474</td><td>RAPID</td><td>9</td></tr><tr><td>F150W2</td><td>F162M</td><td>85.894</td><td>BRIGHT2</td><td>9</td></tr><tr><td>F150W2</td><td>F164N</td><td>118.104</td><td>BRIGHT1</td><td>18</td></tr><tr><td>F277W</td><td>CLEAR</td><td>21.474</td><td>RAPID</td><td>9</td></tr><tr><td>F444W</td><td>CLEAR</td><td>21.474</td><td>RAPID</td><td>9</td></tr><tr><td>F444W</td><td>F405N</td><td>118.104</td><td>BRIGHT1</td><td>9</td></tr><tr><td>F444W</td><td>F466N</td><td>257.682</td><td>SHALLOW4</td><td>9</td></tr><tr><td>F444W</td><td>F470N</td><td>257.682</td><td>SHALLOW4</td><td>9</td></tr></tbody></table>

F150W2 filters, and with the Long Wavelength (LW) channel in F277W and F444W. We also, test the derived GD solution in the available filter combos: F150W2 + F162N, F150W2 + F164N, F444W + F405N, F444W + F466N, and F444W + F470N.

For each filter, JWST observed the field with 9 different pointings in such a way a given star is placed in 9 different positions of a detector (Figure 1). Each pointing is an exposure obtained with a single integration. In Table 1 we report all the observations used in this work.

We extracted catalogs of positions and fluxes for point sources from the NIRCam calibrated images<fnref n="3" /> (cal) by adopting the procedure described in Paper I. Briefly, for each image, we used a list of bright, isolated, unsaturated stars to perturb the 5 × 5 library effective PSFs (ePSFs) obtained in Paper I, in such a way as to take into account the time variations of the JWST ePSFs. Briefly, the software we adopted measured the flux and the positions of the stars by fitting the library ePSFs, subtracted the models of these stars from the image, and calculated the

<footnote n="2">²https://web.oapd.inaf.it/bedin/files/PAPERs_eMATERIALs/JWST/Paper_01/.</footnote>

<footnote n="3">³https://jwst-pipeline.readthedocs.io/.</footnote>
<figure><img src="image_4.png" /><figcaption>**FIGURE 2** To give an idea of the richness of isolated well-measurable sources in the field we show a zoom-in of a portion of ~150'' × 44'', around the brightest and reddest source (Gaia DR3 4, 657, 988, 450, 340, 570, 624, 2MASS 05212923-6, 927, 554, WISE J052129.23-692, 755.4) visible in right panel of Figure 1 (a red super-giant belonging to LMC classified as an extreme AGB star by Boyer et al. 2011).</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>**FIGURE 3** The quality-of-fit (QFIT) distribution before (top panel) and after (bottom panel) the ePSF perturbation. The median QFIT value decreases from 0.056 to 0.030, with an improvement of ~50% in the PSF fitting. The figure refers to an image in F090W filter, namely jw01476001003_02101_00001, module B, detector 2.</figcaption></figure>

average of the normalized residuals that are finally added to the library ePSFs. The routine carried out 11 rounds of iterations, and at each iteration, the residuals are used to adjust the last obtained PSFs. Figure 2 shows a zoom-in of the studied region at a meaningful scale to display individual sources; it is representative of the entire field, which is rather homogeneous and rich in bright sources, relatively isolated, and well-measurable.

In Figure 3 we show why it is important to perturb the library ePSF. In the top panel, the quality-of-fit parameter (QFIT) obtained employing the library ePSFs (from Paper

I) is shown as a function of the instrumental magnitudes ($m_{instr} = -2.5 \log \Sigma(\text{counts}_{\text{used pixels}})$). The parameter QFIT essentially quantifies the difference between the adopted ePSF model and the observed stars on the images. In the bottom panel, the same PSF diagnostic is shown when the perturbed ePSFs are used. In this case, the QFIT parameter significantly decreases, getting closer to zero, so the PSF better resembles the real stars. This translates into improved astrometry, photometry, and source separations.

We adopted the software `img2xym` developed by Anderson et al. (2006), and adapted to the NIRCam images, to extract positions and fluxes of the stars by fitting the perturbed ePSFs; we searched for sources with a total flux ≥ 50 counts and whose peaks are isolated at least 5 pixel from the closest brighter pixel. The software identifies the peaks that satisfy these criteria among the image, and for each of them, it fits the local ePSF obtained by the bi-linear interpolation of the 4 closest perturbed ePSF of the grid. Through a chi-square minimization, it measures the position and flux of each source. We refer the reader to Paper I for a more detailed description of the data reduction.

## 2 | GEOMETRIC DISTORTION CORRECTION

Our derivation of the GD correction for NIRCam followed the empirical approach and procedure successfully applied to derive the GD correction of many other cameras at the focus of space-and ground-based telescopes (Anderson et al. 2006; Anderson & King 2003; Bellini et al. 2011; Bellini & Bedin 2009; Kerber et al. 2019; Libralato et al. 2014; Libralato et al. 2015).

Our GD solution is derived independently for each of the ten 2048 × 2048 pixels NIRCam detectors (8
<figure><img src="image_6.png" /><figcaption>FIGURE 4 Geometric distortion map of NIRCam short (top) and long (bottom) wavelength channel for both module A (left) and module B (right); detector number is shown in red on the bottom left corner of each vector plot. The size of the residual vectors is magnified by a factor of 20. For each detector, we also show the single residual trends along x and y axes. Units are in raw NIRCam pixels. The color map represents the pixels' area variation across the detectors (see text).</figcaption></figure>

for SW, and 2 LW), and it is made up of three parts. First, a backbone third-order polynomial (Section 2.1) derived through a self-calibration procedure; second, a first-order polynomial derived by exploiting the Gaia DR3 reference system, to fix the linear terms of the GD (Section 2.2), and third, a fine-scale table that accounts for spatial high-frequency systematic residuals that the polynomial correction can not absorb (Section 2.3). More details on self-calibration of the GD can be found in the work by Anderson & King (2003), of which we will give a brief description in the next sub-section.

The procedure that we will describe in the next sections has been applied independently to each detector of both modules (A and B). The final distortion map is shown in Figure 4. The color map represents the pixels' area variation across the detectors due to the GD, which is relevant to show for those investigations dealing with surface brightness. Each 128 × 128 pixels region in the vector plots of Figure 4 is colored according to the ratio between the GD corrected area and the raw area. We computed the GD corrected area using the corrected positions of the corners of each region, thus the value represents the mean area variation of the pixels in that region.
**2.1 | Polynomial correction**

The polynomial GD solution is represented by a third-order polynomial; we checked that higher-orders (fifth and seventh) do not provide better results. We chose the pixel $(x_0, y_0) = (1024, 1024)$ in each detector as a reference position and solved for the distortion with respect to it, using the normalized coordinates $(\tilde{x}, \tilde{y}) = (\frac{x-x_0}{x_0}, \frac{y-y_0}{y_0})$ (cfr. Anderson & King 2003; Bellini et al. 2011).

To derive the polynomial coefficients we performed a series of iterations in which we alternate two main tasks: building the master frame, which will be the temporary reference system closer to the distortion-free solution than the previous iteration, and calculating the residuals between the positions of the sources as measured on the master frame and those measured in the raw catalogs. These residuals are then used to derive the polynomial coefficients. The polynomial correction is performed as follows:

* We selected the sources in each catalog with instrumental magnitude in the range $-12.5 < m_{instr} < -8$ and with QFIT lower than 0.1, to avoid artifacts, saturated and poorly measured stars which would affect the distortion solution.

* We conformally transformed the positions of each star in each catalog into the reference system of the central dither, and we built a master frame by averaging the positions and fluxes of the sources that are measured in at least three exposures.

* At this point, we computed the conformal transformations $(T)$ between stars in each catalog and the master frame.

* The inverse transformation $(T^{-1})$ is then used to compute the positions of the master frame's stars in the raw-coordinate system of each image, which are then cross-identified with the closest source after applying the inverse GD correction derived in the previous iteration (which, of course, at the first iteration is equal to the identity). Each such cross-identification generates a pair of positional residuals $\delta x = x_{raw} - X^{T^{-1}\circ GD^{-1}}$ and $\delta y = y_{raw} - Y^{T^{-1}\circ GD^{-1}}$, where $(x_{raw}, y_{raw})$ and $(X, Y)$ are the coordinates in the raw catalogs and the master frame reference systems respectively.

* We performed a least-square fit of the residuals to obtain the coefficients for the two third-order polynomials that are added to those derived at the previous iteration. To ensure convergence, the 75% of the correction is then applied to all stars' positions.

The procedure is iterated over up to 45 iterations, until convergence is reached, starting from the corrected

catalogs, each time refining the master frame and the polynomial coefficients. At the end of the procedure, we had a set of coefficients for each filter. The polynomials derived independently for each filter turned out to be in agreement within the uncertainties, therefore we computed a weighted mean (using the inverse of the errors on the coefficients as weights) to get a single final polynomial for each individual detector. While the polynomials for filter combinations were marginally in agreement with those obtained for single filters, they were not used to compute the average polynomials.

**2.2 | GD linear terms**

So far, the first epoch of calibration program 1476 has observations collected at one single orientation of the telescope. This makes it not possible to solve for the linear terms of the GD (Anderson & King 2003). For this reason, we will make leverage of the existing astrometric flat field provided by Gaia DR3 to perform this task.

While common sources are very few, faint, and poorly measured, we need only 3 stars, in principle, to fix these linear terms, as the most general linear transformation has only 6 parameters (therefore the 2D positions of three stars would be sufficient).

Nevertheless, in each detector, there are always at least 350 stars in common between Gaia and NIRCam observations of program 1476 for the SW channel, and at least 1200 for LW channel, more than enough for our purposes.

We then proceeded in the same way as described in the previous section, but this time using Gaia (projected onto the tangent plane of each exposure) as a master frame, starting with the catalogs corrected with the third-order polynomial, and using all the filters together. We needed 10 iterations to reach convergence.

The residuals between the inter-comparison between all the dithered exposures for detector A1 are shown in Figure 5: we notice the presence of small spatial residuals, that we wanted to remove. We corrected these systematics with a lookup table as described in the next section.

**2.3 | Fine-structure table of residuals**

The systematic residuals observed in Figure 5 could not be removed with the polynomial corrections. Additional iterations did not provide any improvements. For this reason, we decided to proceed with a fine-structure table of residuals.

We followed two different procedures for the SW channel and the LW channel; for the SW channel, we employed again a self-calibration procedure. We started from the
<figure><img src="image_7.png" /><figcaption>FIGURE 5 Positional residuals given by the inter-comparison between all the dithered exposures (for detector A1) in F150W and F150W2 filters after the two polynomials have been applied. The black dots represent the mean residual in each slice of 128 pixels. The red error bars are calculated as $\sigma = 68.27^{\text{th}}$ percentile of the residual distribution (after a 3$\sigma$-clipping), and the black error bars are $\sigma/\sqrt{n-1}$, with n the number of points used to compute the mean.</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>FIGURE 6 As Figure 5 but after applying also the fine-scale table correction. These black dots are our internal errors, which are always smaller than 20 µ as, and are the formal uncertainty of our GD correction; whereas the larger error bars (in red) show the positional random error for the individual “typical” source.</figcaption></figure>

catalogs corrected with the two polynomials and followed the first four steps of the bullet list in Section 2.1. We then divided the residuals into a lookup table of 16 × 16 cells in x and y. To each cell, we assigned a residual in x and y using the 3$\sigma$-clipped mean of the residuals in that cell. The positions of the stars are then corrected with the residual calculated with a bilinear interpolation of the four most adjacent cells (cfr. Libralato et al. 2014). This procedure is iterated over 10 times to converge. The systematic residuals were successfully corrected; after the correction, the inter-comparison of corrected frames is consistent with the sub-mass level (Figure 6, assuming a pixel scale of 31.23 mas, see Section 2.6).

We applied the same self-calibration procedure to the LW channel, unsuccessfully. After 10 iterations, the residuals between the inter-comparison of dithered exposures did not show any clear trend. However, the comparison of these positions with the Gaia catalog showed a global trend in the residual distribution: we suspect that the data are insufficient for a self-calibration of the GD for the LW channel. Indeed, the dither pattern (which is the same for

both channels) offers larger inter-comparison overlaps for SW than for LW.

Therefore, we exploited our just corrected SW catalogs to build a distortion-free master frame, on which we can calibrate also the LW channel. We proceeded with the same steps that we followed to derive the SW channel lookup table, but this time as a master frame we employed the one built employing the SW corrected catalogs. Adopting this procedure, also in this case, 10 iterations were sufficient to reach convergence.

This is the final step that concludes the derivation of our GD correction for the NIRCam detectors. In Section 5 we will give details about the Python routine, which we release as electronic material part of this publication, that will enable readers to transform the raw pixel coordinate of each of the 10 individual detectors of NIRCam into a distortion-free frame.

## 2.4 | Gaia validation

Although our formal (internally estimated) errors provide uncertainties smaller than 20 µ as, these very likely are underestimates of the true errors. However, it is not easy to compare these corrected positions with other catalogs able to reach similar accuracy for such faint stars. The only available is Gaia DR3 which, however, we used to fix the linear terms. Therefore, while we will not be able to independently test the linear terms of our solution, we will nonetheless still be able to test the accuracy of the non-linear terms of our GD correction.

Unfortunately, common sources are faint for Gaia and we end up being limited by the errors in the Gaia catalog in both positions and motions. Gaia DR3 gives positions at the epoch 2016.0, while the new JWST observations are collected at epoch ~2022.53. Given the internal proper-motion dispersion for LMC stars in this field (which also has a distribution far from being Gaussian) of about 40 km s⁻¹ (Anderson et al. 2021), and assuming a distance of 50 kpc, in 6.53 years (2022.53–2016.0), we expect a dispersion of 1.1 mas.

We cross-identified the sources in our SW and LW catalog of a single image (namely jw01476001003_02101_00001 in F090W and jw01476001001_02101_00001 in F277W) with the Gaia DR3 catalog, projected onto the tangent plane of each detector (as in Section 2.2), and derived the transformations to bring the positions of our catalogs into the tangent plane coordinate system. The residuals between the transformed positions and Gaia are shown in Figure 7 (left panels), where the dispersions are labeled within each panel as $\sigma$ and expressed in mas, for both coordinates. The right panel shows the CMD in Gaia bands for
<figure><img src="image_9.png" /><figcaption>**FIGURE 7** *Left:* positional residuals between the positions measured by us and those given by Gaia DR3 catalog, for the SW channel (top) and the LW channel (bottom). *Right:* color-magnitude diagram in the Gaia filters for the common sources.</figcaption></figure>

sources in common with JWST. We have tried to extrapolate Gaia positions to epoch 2022.53 by employing the tabulated Gaia proper motions, however, this had the effect of significantly enlarging the residual dispersion, making these extrapolations useless. This is mainly due to both the large errors (0.1–0.5 mas/yr) on proper motions for faint sources (G > 17) in the Gaia catalog, that produce sizeable effects in six years, and the lack of proper motion measurements for very faint stars (G > 20).

The average observed dispersion for the two coordinates in the SW channel is 1.48 mas; 1.74 mass for LW channel. To infer from this the errors of our GD correction, one should subtract in quadrature the other contributions that participate to enlarge the dispersion, such as the LMC's internal motions (~1.1 mas), the errors in the Gaia catalog (~0.25, mass Gaia Collaboration et al. 2021), and the positioning errors for the bulk of these stars in the JWST images (0.7 mas, i.e., the red error bars in Figure 6). Summing in quadrature these contributions for the bulk of the stars we obtain ~1.3 mas. Subtracting in quadrature this value from the observed dispersion for SW, we obtain a residual of ~0.6 mas, which here we entirely ascribe to the residual in our GD correction. Doing the same for the LW we obtain again ~0.6 mas.

This is a rough estimate for the minimum limit in the accuracy of our GD correction and is mainly affected by the strongly non-Gaussian internal proper-motion distributions for LMC stars (see figure 15 of Anderson et al. 2021, and section 4.3 of this work). Indeed, in next the sections, we will put significantly smaller upper limits to this estimated accuracy for the here-presented GD correction.

<figure><img src="image_10.png" /><figcaption>**FIGURE 8** Positional residuals in x and y (top and middle) and magnitude residuals (bottom) from the inter-comparison of dithered images in F090W after the GD correction have been applied. Red lines indicate the median value of the residuals for well-measured sources ($-13.5 < m < -10$, $QFIT < 0.2$).</figcaption></figure>

## 2.5 | Internal errors

Figures 5 and 6 give positional residuals for the bulk of the measured sources in the field (red error bars), here instead, we want to show these quantities as a function of the instrumental magnitude for the individual sources. This is possible by inter-comparing the positions and magnitudes measured employing the same filter (9 dithered images), which provides an estimate of the expected r.m.s. of the quantities, as measured in a single image, for individual sources. In Figure 8, we show for the case of detector A1 in F090W these trends, with median values of 0.013 pixels (i.e., 0.4 mas) for the 1-D positioning, and 16 milli-mag in the photometry for well-measured sources, that is, those with $-13.5 < m < -10$ and $QFIT < 0.2$. Similar results are obtained for the other detectors/filters. In the following applications and considerations, it is important to distinguish the difference between these random errors for individual sources and the systematic errors of GD residuals.

## 2.6 | Putting detector-based positions into a common reference system

In this section, we derive the transformations to bring the positions measured by each detector of a given image into a common reference system (which arbitrarily we chose to be that of A1). We remark that for investigations
requiring the most possible accurate differential astrometry, it is always optimal to compare position measurements as locally as possible, provided that there are enough reference sources within the field. However, some projects might have limited reference objects, and would require an understanding of the distortion across the entire NIRCam field of view. To derive these transformations we exploited the Gaia catalog. We considered each of the nine dithers separately, and we treated every filter independently. We proceeded as follows:

* first, we downloaded a portion of the Gaia DR3 catalog large enough to cover both modules A and B of the considered exposure;

* we projected it onto the plane tangent to the center of the two modules;

* we transformed Gaia positions into the reference system of A1;

* finally, we used the Gaia positions on A1 to derive the six parameter transformations to bring all the other detectors on the reference system of A1.

At the end of this procedure, for each filter, we have nine transformations for each detector (one for each of the nine dithers). We checked the consistency between the coefficients derived from each dither, and given the general agreement among them, we computed the final transformation averaging all the nine estimates. Furthermore, as the coefficients were compatible even in different filters, we also averaged the coefficients obtained in the three filters for the SW-channel, and averaged those in the two filters for the LW channel, resulting in six parameters for the transformation of each detector into a common reference system, independently of the adopted filter.

In Section 5, we describe the Python software, which we release with this publication, that enables users to put all the 10 individual detectors of NIRCam into a common distortion-free meta-chip frame.

## 2.7 | The absolute scale

The transformation between A1 and Gaia let us infer the pixel scale of our GD-corrected pixel reference system. For each of the filters, we observe the nine dithers to agree within few $10^{-5}$, with a pixel scale of about 31.23 mas/px (see Table 2).

In the case of HST, the telescope was orbiting at 7 km s$^{-1}$ around the Earth, a speed that causes scale variation due to velocity aberration of about 7/300000 parts, that is, also of few $10^{-5}$, and every 2 hours (Cox & Gilliland 2003); therefore variations of the same order of

<table><caption>TABLE 2 Mean pixel scale (S) and VA_SCALE.</caption><thead><tr><td>Filter</td><td>S [mas/px]</td><td>σ<sub>S</sub> [mas/px]</td><td>VA_SCALE - 1</td></tr></thead><tbody><tr><td>F090W</td><td>31.23227</td><td>0.00005</td><td>3.65488 × 10<sup>-6</sup></td></tr><tr><td>F150W</td><td>31.23115</td><td>0.00006</td><td>3.64514 × 10<sup>-6</sup></td></tr><tr><td>F150W2</td><td>31.23086</td><td>0.00008</td><td>3.64028 × 10<sup>-6</sup></td></tr></tbody></table>

what we observe here for JWST. However, unlike HST, JWST is not orbiting at 7 km/s around the Earth. Nevertheless, JWST (as well as HST) is still orbiting the Sun with a velocity slightly less than 30 km s$^{-1}$, that is, causing scale variations due to velocity aberration of about 30/300000, or 1 part in 10,000, a very sizeable effect, although with a much slower ~6 months time-frame. These effects (of 1 part in 10,000) need to be properly accounted for in all applications which blindly rely on the absolute scale of the telescope (assuming JWST will prove to have a scale stable down to this level). For this purpose, the calibration pipeline includes in the header of each image the expected velocity aberration scale factor (VA_SCALE) calculated on the base of the expected absolute velocity of the Observatory. We note that the values of the VA_SCALE reported in the header of each image of the here-employed 1476 data-set, remains well below the few $10^{-5}$ scatter observed. In the lack of other observations, we assumed this to be the limit of the plate-scale stability for JWST.

We are deriving our absolute scales comparing directly to the absolute astrometric reference frame of Gaia DR3, therefore, to retrieve the true scale of our GD solution we should first divide for the VA_SCALE factor. The results obtained for the average of the scale of detector A1 compared to Gaia DR3, for all images collected in filters F090W, F150W, and F150W2, are shown in Table 2. The values for each filter are the averaged values obtained from the nine dithers. Note that the scale for filter F090W is significantly different (at ~14 σ) from the one for the two filters F150W and F150W2, which are instead marginally consistent (~2.8 σ) among them.

Finally, we note that this is the scale to apply to our -here-derived- GD solution, that is normalized to a specific chip location. Other GD solutions might refer to different pixels, and therefore might have slightly different scales.

## 3 | COLOR-MAGNITUDE DIAGRAMS

The dither pattern of the observations provides large overlaps, which in turn, allows us to compare the photometry obtained from the different detectors of a module to
<table><caption>TABLE 3 Relative photometric zero-points for SW and LW channels.</caption><thead><tr><th colspan="3">SW Channel</th></tr><tr><th>Detector</th><th>F090W</th><th>F150W</th></tr></thead><tbody><tr><td>A1</td><td>+0.00 ± 0.00</td><td>+0.00 ± 0.00</td></tr><tr><td>A2</td><td>+0.06 ± 0.03</td><td>+0.02 ± 0.02</td></tr><tr><td>A3</td><td>+0.06 ± 0.02</td><td>+0.06 ± 0.02</td></tr><tr><td>A4</td><td>+0.00 ± 0.02</td><td>-0.04 ± 0.02</td></tr><tr><td>B1</td><td>+0.00 ± 0.00</td><td>+0.00 ± 0.00</td></tr><tr><td>B2</td><td>-0.02 ± 0.02</td><td>-0.01 ± 0.02</td></tr><tr><td>B3</td><td>-0.09 ± 0.02</td><td>-0.06 ± 0.02</td></tr><tr><td>B4</td><td>-0.17 ± 0.02</td><td>-0.18 ± 0.01</td></tr><tr><td>δ (A1B1)</td><td>-0.31 ± 0.06</td><td>-0.20 ± 0.07</td></tr></tbody><thead><tr><th colspan="3">LW Channel</th></tr><tr><th>Detector</th><th>F277W</th><th>F444W</th></tr></thead><tbody><tr><td>δ (AB)</td><td>+0.03 ± 0.11</td><td>-0.06 ± 0.07</td></tr></tbody></table>

register the zero points of the detectors into a common photometric reference system. In the case of the SW channel, we chose as reference system the first image obtained with detectors A1 and B1, and, for each filter and module, we transformed the positions and magnitudes of the stars measured in all the images into the reference system defined by this first image. We do this for each module, separately. We averaged the transformed positions and magnitudes of each detector, to obtain a more robust catalog of stars measured in at least three images and we iterated refining the transformations by using as reference system the new catalog containing the mean positions and magnitudes. We report in Table 3 the photometric zero-points of each detector within each module of the SW channel compared to detectors A1 and B1 (which by definition have null shifts).

Even if the overlap between modules A and B is small, we also were able to measure the zero points $δ\text{mag} = \text{mag}[A] - \text{mag}[B]$ between the catalogs obtained with the different modules in one filter (it means the zero-point between A1 and B1 in the case of SW channel, and A and B in the case of LW channel). We found $δ\text{F090W} = -0.31 ± 0.06$, $δ\text{F150W} = -0.20 ± 0.07$, $δ\text{F277W} = +0.03 ± 0.11$, and $δ\text{F444W} = -0.06 ± 0.07$.

For each filter, we carried out selections by using quality parameters like the photometric RMS and the quality-of-fit, as done in Paper I. Figure 9 shows the F090W versus F090W-X instrumental CMDs of the stars in the LMCs observed by NIRCam in the F090W, F150W, F277W, and F444W filters and that passed the quality

selections. The deepest CMD is the F090W-F150W one, which reaches two magnitudes below the MS turn-off with an SN~5; the same signal is reached by the F444W filter two magnitudes brighter, making this filter the shallowest among those used in this work to follow the MS stars of the LMC.

## 4 | DEMONSTRATIVE APPLICATIONS

In this section, we demonstrate that applying our just-derived GD correction to positions of sources, and comparing these positions with those measured in an earlier archival *HST* data set, we are able to detect stellar motions at sub-mass level precision.

To this aim, we considered three applications, sorted by increasing difficulty: (1) the cluster-field separation in the case of the globular cluster M92; (2) the estimate of the internal motion of the same cluster; and finally (3) the clear detection of the internal motions in the LMC system, a stellar system at ~50 kpc.

### 4.1 | Field-object decontamination in M92

To compute the displacements of the stars in a field centered in M92, we adopted as the first epoch the *HST* observations collected under program GO-10775 (PI: Sarajedini, Sarajedini et al. 2007, epoch 2006.27), and as a second epoch the *JWST* data from the ERS-1334 (PI: Weisz, epoch 2022.47). For the first epoch, we used the catalog obtained by Nardiello et al. (2018), while for the second epoch we used the catalogs obtained in Paper I, corrected by using the GD solution of this work. We matched the *HST* F814W catalog with the *JWST* F090W and F150W catalogs by using 6-parameter global transformations. Sources that moved the least, and by far the large majority, are M92 member stars, therefore the zero of the motion coincides with the mean motion of the cluster. Top panel of Figure 10 shows the resulting vector-point diagram (VPD) of the displacements of the stars in $δt = 16.2$ yrs. We arbitrarily defined as field stars all the sources with a proper motion larger than ~0.9 mas/yr (red points), which is about 3.5 $σ$ of the internal distribution (see next sect.). The bottom panel shows, for the same sources in the VPD, the $m_{F090W}$ versus $m_{F814W} - m_{F150W}$ CMD, employing the same symbols and color codes.

Unfortunately, M92 is not an ideal target for a striking demonstration of the cluster-members field-objects decontamination, mainly because of the extremely sparse
<figure><img src="image_11.png" /></figure>

**FIGURE 9** The F090W versus F090W–X CMDs, with X = F150W, F277W, F444W, of the stars in the LMC, obtained with the data used in this work.

<figure><img src="image_12.png" /></figure>

**FIGURE 10** *Top:* vector-point-diagram of proper motions for sources in the common field between images collected with *HST* under program GO-10775, and the available images from *JWST* program ERS-1334. A black circle defines our arbitrary criterion to separate members (gray) and field objects (orange). *Bottom:* CMD in filters F814W–F150W versus F090W; color code is the same as top panel.

density of Galactic and extra-galactic sources in the direction of M92, where we count about 15 sources.

**4.2 | M92 internal dispersion**

The globular cluster M92 (NGC 6341) is a relatively massive system ($3.5 \times 10^5 M_{\odot}$) located at a distance of ~8.5 kpc and with a half-mass of 4.5 pc, that is, $110''$ (Vasiliev & Baumgardt 2021, hereafter VB21). In the radial range explored by the combined *HST–JWST* epochs, that is, 20–100 arcsec from the center of the cluster, according to the literature, we expect internal-velocity dispersion between 8 and $5.5 \text{ km s}^{-1}$ (i.e., between 0.20 and 0.12 mass yr$^{-1}$, VB21).

In this section, we further test our GD correction estimating the internal-proper motion dispersion for M92, and in the process we will also obtain a check on the precision of NIRCam astrometry.

We consider positions (X, Y) measured within *JWST* at epoch 2022.47, in the two filters F090W and F150W, separately. With those positions, we computed the displacements of sources in F090W and F150W, with respect to those measured within *HST* at epoch 2006.27, for each filter separately. We selected best-measured sources in all data sets, in the brightest 2 magnitudes just below the saturation and with photometric diagnostics *QFIT* and r.m.s. selected as described in Figure 5 of Paper I. We plot the two displacements in top panels of Figure 11. The first epoch is identical for the two computed displacements, and the second epoch is essentially *also* the same. Indeed, F150W images were collected only a few minutes after F090W images, which does not change much from the time baseline of ~16.2 years. The two displacements correlate with the identity (red line, not a fit) in both coordinates (X on the left, Y on the right). Assuming Gaussian distributions for both the dispersion along the red line ($\sigma_{\|}$), and
<figure><img src="image_13.png" /><figcaption>**FIGURE 11** (Top:) Correlation between positional displacements obtained using an *HST* epoch collected in 2006.27 with filter ACS/WFC/F814W, and two different *JWST* data sets, in filters NIRCam/SW/F090W and F150W, both collected in 2022.47. The identity is indicated by the red line. X-coordinate on the (left), and Y on the (right). (Bottom:) Histogram of the displacement distributions along and perpendicular to the identity line. Note the different scale for the two quantities, given in the opposite axes (see text).</figcaption></figure>

perpendicularly to it ($\sigma_{\perp}$), we can derive crude estimates for both dispersions in the M92's internal motions ($\sigma_{\text{intr}}$) and for the errors ($\sigma_{\text{err}}$). Bottom panels in Figure 11 show the histograms for displacements along the parallel (in orange) and perpendicular (in blue) to the identity line.

Any error in the *HST* 2006 epoch has the effect to move a source only along the red line. So, the cross dispersion, that is, perpendicular to the red line, reflects the errors only in the two *JWST* epochs. Assuming the same dispersion for the two filters, $\sigma_{\text{JWST}}$, we can write $\sigma_{\text{JWST}} = \sigma_{\perp}/\sqrt{2}$. Taking the average in X and Y we obtain $\sigma_{\perp} = 0.25$ mas, and therefore $\sigma_{\text{JWST}} = 0.18$ mass for the single *JWST* epoch (note, dispersion of displacements not of proper motions). This is essentially, just another way to put an upper limit to the errors in our GD correction, although, internal to the method.

As four single *JWST* images participate in the precision of the single filter, we can multiply by a factor $\sqrt{(4-1)}$ to get the precision for the typical star in the individual image, about 0.3 mas, or ~0.01 pixel; consistent with positioning precision for the best measured sources, which

means that the errors in our GD corrections should be negligible with respect to it.

Now, we try to infer an estimate of the intrinsic proper-motion dispersion of M92 stars in the region covered by the two epochs. Similarly to what was done for the errors, we can assume that $\sigma_{\text{obs}} = \sigma_{\parallel}/\sqrt{2}$. Again, taking the average of X and Y we obtain a $\sigma_{\parallel} = 4.15$ mas, and therefore $\sigma_{\text{obs}} = 2.93$ mas. To know the intrinsic displacement dispersion we need to subtract in quadrature the errors. To the errors this time participate one *JWST* and one *HST* epoch. So, we sum in quadrature the errors just derived above $\sigma_{\text{JWST}} = 0.18$ mas, and assume *HST* errors from the literature. For best stars we expect 0.32 mass (from Bellini et al. 2011), but as four *HST* images from 2006 participate to determine the positions, we take $\sigma_{\text{HST}} = 0.32 \text{ mas}/\sqrt{(4-1)} = 0.18$ mas. This makes the total errors, sum in quadrature of $\sigma_{\text{JWST}}$ and $\sigma_{\text{HST}}$, amount to $\sigma_{\text{err}} = 0.25$ mas; negligible when compared to $\sigma_{\text{obs}}$ (as obvious from a glance to Figure 11). Nevertheless, the intrinsic dispersion of the observed displacement is
$$ \sigma_{\text{intr}} = \sqrt{\sigma_{\text{obs}}^2 - \sigma_{\text{err}}^2} = 2.92 \text{ mas}. $$

Finally, taking into account the time base-line of 16.2 yr, we derive an estimate for the internal proper motion of M92 stars of 0.18 mass yr⁻¹; consistent with the value found by VB21 in the core (0.2 mass yr⁻¹ in the centre, and 0.1 mass yr⁻¹ at 100 arcsec). Indeed, our star sample is biased toward the centre, due to the spatial distribution of sources in a globular cluster.

The result is even more remarkable, taking into account that in the process of deriving displacement, we use a global transformation to transform from *HST* into *JWST* master frames, letting us completely at the mercy of residual in the GD of both *JWST* and ACS (which are sizable in this particular data set, cfr. section 4.3 of Anderson et al. 2021, but thankfully diluted in a 16.2 yr time baseline). This means that by using a local transformations approach (as described in, e.g., Anderson et al. 2006; Bedin et al. 2003; Bellini et al. 2018; Libralato et al. 2022) residual errors of various origins, could be suppressed. For these reasons, the results presented in this section are even more impressive.

## 4.3 | LMC internal dispersion

To detect the internal proper motion dispersion of LMC stars, we adopted as a first epoch the *HST* data collected during the calibration program CAL/OTA-10753 (PI: Diaz-Miller). The data set consists of 5 × 19 s+2 × 32 s+25 × 343 s+10 × 423 s ACS/WFC images in F606W filter and observations were carried out between 25 April and July 9, 2006 (mean epoch *t* ~ 2006.39). A catalog of
<figure><img src="image_14.png" /><figcaption>**FIGURE 12** Displacements positions for sources in the LMC field as measured in archival *HST* images in year 2006.39, and the corresponding positions as measured in *JWST* in filter F090W at epoch 2022.53.</figcaption></figure>

sources was extracted for each image by using the software *hst1pass* (Anderson 2022). These catalogs were matched with *Gaia* DR3 catalog of the same region by using 6-parameter global transformations to orient and transform all the positions of the stars in the same reference system; the transformed positions were then (3σ-clipped) averaged to obtain a catalog of stars with positions referred to the epoch 2006.39. We performed the same transformations with the *JWST* GD corrected catalogs in F090W; the final product consists of a catalog with positions corresponding to the epoch 2022.53. We matched the *HST* ACS/WFC/F606W catalog from 2006.39 with the F090W catalog obtained with *JWST* in 2022.53, by using 6-parameter global (i.e., not local) transformations.

The displacements, converted in proper motions assuming a time baseline of $\delta t = 16.14$ yr, are shown in Figure 12. Beside the flip of the $\mu_\alpha^*$ axis, and the zero of the motions referred to LMC stars rest frame, the VPD distribution we obtained employing *JWST* is completely consistent with the one characterized in great detail by Anderson et al. (2021), for the same region of the LMC. The VPD has the same strongly non-Gaussian distribution in both $\alpha$ and $\delta$, with three-lobed shape, clearly recognizable also in our Figure 12. This further, demonstrate that our NIRCam GD correction enables us to obtain high-precision results comparable to what obtainable with *HST*.

As a final note, a more solid estimate of the internal velocity dispersion within LMC would be obtained

by performing a local transformation approach (as for example in Bedin et al. 2014).

## 5 | CONCLUSION

In this work, we have exploited *JWST* observations of a field in the LMC and *Gaia* DR3 to calibrate the GD of the ten NIRCam detectors. We exploited the calibrated positions coupling them with archival *HST* observations to measure the proper motions of sources within a field in the core of the Galactic globular cluster M92. Our measurements were able to clearly disentangle field objects from cluster members, and even to measure their internal kinematic. We also were able to measure the internal dispersion of stars within one extra-galactic system, the LMC. In all cases, our results are in agreement with the literature and in line with state-of-the-art astrometry.

Indeed, it is worth mentioning that the here-presented GD correction was successfully employed in the recent work by Nardiello et al. (2023): where it allowed for the first detection of brown dwarf candidates in a GC, as result of careful image registration, and accurate proper-motion memberships derived by the coupling with existing *HST* archival material collected ~12 years earlier.

Finally, we publicly release two Python tools to apply our GD correction to the raw coordinates of NIRCam detectors, and to put all the detector-based positions into a common, distortion-free, global reference system. The routine *raw2cor.py* takes as input a list of raw coordinates, the module (A or B) and the detector (1–5), and applies the third-degree polynomial, the linear terms, and the fine-scale table, giving as output the corrected coordinates. The routine *xy2meta.py* requires the same input as *raw2cor.py*, but in addition to the GD corrections, it also applies the transformations to bring all the coordinates into a common reference system, which are given as output. These routines are released as electronic material with this paper and are also downloadable from the following url: https://oapd.inaf.it/bedin/files/PAPERS_eMATERIALs/JWST/Paper_02/Python.

## ACKNOWLEDGMENTS

The authors MG, DN and LRB acknowledge support by MIUR under PRIN program #2017Z2HSMF and by PRIN-INAFF 2019 under program #10-Bedin. This work is based on observations made with the NASA/ESA/CSA James Webb Space Telescope. The data were obtained from the Mikulski Archive for Space Telescopes at the Space Telescope Science Institute, which is operated by the Association of Universities for Research in Astronomy, Inc., under NASA contract NAS 5-03127 for *JWST*.
The data employed in this work are associated with cal-
ibration program CAL-1476 (PI: Boyer) and early release
science program ERS-1334 (PI: Weisz). This research is
also based on observations made with the NASA/ESA
HST obtained from the Space Telescope Science Institute,
which is operated by the Association of Universities for
Research in Astronomy, Inc., under NASA contract NAS
5-26555. These observations are associated with programs
CAL/OTA-10753 (PI: Diaz-Miller), GO-10775 (PI: Saraje-
dini). This work has made use of data from the European
Space Agency (ESA) mission Gaia (https://www.cosmos.
esa.int/gaia), processed by the Gaia Data Processing
and Analysis Consortium (DPAC, https://www.cosmos.
esa.int/web/gaia/dpac/consortium). Open Access Fund-
ing provided by Istituto nazionale di astrofisica within the
CRUI-CARE Agreement.

ORCID

M. Griggio https://orcid.org/0000-0002-5060-1379

D. Nardiello https://orcid.org/0000-0003-1149-3659

L. R. Bedin https://orcid.org/0000-0003-4080-6466

REFERENCES

Anderson, J. 2022, One-Pass HST Photometry with hst1pass., Instru-
ment Science Report WFC3 2022-5, 55.

Anderson, J., Bedin, L. R., Piotto, G., Yadav, R. S., & Bellini, A. 2006, *A&A*, **454**(3), 1029.

Anderson, J., Fall, M., & the Astrometry Working Group 2021, The JWST Calibration Field: Absolute Astrometry and Proper Motions with GAIA and a Second HST Epoch., JWST Technical Report JWST-STScI-007716, SM-12, 36.

Anderson, J., & King, I. R. 2003, PASP, 115 (803), 113.

Bedin, L. R., Piotto, G., King, I. R., & Anderson, J. 2003, *AJ*, **126**(1), 247.

Bedin, L. R., Ruiz-Lapuente, P., González Hernández, J. I., Canal, R., Filippenko, A. V., & Mendez, J. 2014, *MNRAS*, **439**(1), 354.

Bellini, A., Anderson, J., & Bedin, L. R. 2011, PASP, 123(903), 622.

Bellini, A., & Bedin, L. R. 2009, PASP, 121(886), 1419.

Bellini, A., Libralato, M., Bedin, L. R., et al. 2018, ApJ, 853(1), 86.

Boyer, M. L., Srinivasan, S., van Loon, J. T., et al. 2011, AJ, 142(4), 103.

Cox, C., & Gilliland, R. L. 2003, The Effect of Velocity Aberration on ACS Image Processing. In HST Calibration Workshop: Hubble after the Installation of the ACS and the NICMOS Cooling System p. 58.

Gaia Collaboration, Brown, A. G. A., Vallenari, A., et al. 2021, A&A, **649**, A1.

Gaia Collaboration, Vallenari, A., Brown, A. G. A., et al. 2022, arXiv e-prints, arXiv:2208.00211.

Kerber, L. O., Libralato, M., Souza, S. O., et al. 2019, MNRAS, 484(4), 5530.

Libralato, M., Bellini, A., Bedin, L. R., et al. 2015, June, MNRAS, 450(2), 1664.

Libralato, M., Bellini, A., Bedin, L. R., Piotto, G., Platais, I., Kissler-Patig, M., & Milone, A. P. 2014, A&A, 563, A80.

Libralato, M., Bellini, A., Vesperini, E., et al. 2022, ApJ, 934(2), 150.

Nardiello, D., Bedin, L. R., Burgasser, A., Salaris, M., Cassisi, S., Griggio, M., & Scalco, M. 2022, MNRAS, 517(1), 484.

Nardiello, D., Griggio, M., & Bedin, L. R. 2023, MNRAS, 521(1), L39.

Nardiello, D., Libralato, M., Piotto, G., et al. 2018, MNRAS, 481(3), 3382.

Sarajedini, A., Bedin, L. R., Chaboyer, B., et al. 2007, AJ, 133(4), 1658.

Vasiliev, E., & Baumgardt, H. 2021, MNRAS, 505(4), 5978.

SUPPORTING INFORMATION

Additional supporting information can be found online
in the Supporting Information section at the end of this
article.

How to cite this article: Griggio, M., Nardiello, D., & Bedin, L. R. 2023, *Astron. Nachr.*, **344**, e230006. https://doi.org/10.1002/asna.20230006