###### Abstract

We prove that in every $2$-colouring of the edges of $K_{\mathbb{N}}$ there
exists a monochromatic infinite path $P$ such that $V(P)$ has upper density at
least ${(12+\sqrt{8})}/{17}\approx 0.87226$ and further show that this is best
possible. This settles a problem of Erdős and Galvin.

title = Upper Density of Monochromatic Infinite Paths, author = Jan Corsten,
Louis DeBiasio, Ander Lamaison, and Richard Lang, plaintextauthor = Jan
Corsten, Louis DeBiasio, Ander Lamaison, Richard Lang, keywords = infinite
graph, Ramsey, upper density, regularity lemma., year=2019, number=4,
received=10 August 2018, revised=24 December 2018, published=30 October 2019,
doi=10.19086/aic.10810,

[classification=text]

##  1 Introduction

Given a complete graph $K_{n}$, whose edges are coloured in red and blue, what
is the longest monochromatic path one can find? Gerencsér and Gyárfás [4]
proved that there is always a monochromatic path on
$\left\lceil(2n+1)/3\right\rceil$ vertices, which is best possible. It is
natural to consider a density analogue of this result for 2-colourings of
$K_{\mathbb{N}}$. The _upper density_ of a graph $G$ with
$V(G)\subseteq\mathbb{N}$ is defined as

$\bar{d}(G)=\limsup_{t\rightarrow\infty}\frac{|V(G)\cap\\{1,2,\ldots,t\\}|}{t}.$

The _lower density_ is defined similarly in terms of the infimum and we speak
of the _density_ , whenever lower and upper density coincide.

Erdős and Galvin [3] described a $2$-colouring of $K_{\mathbb{N}}$ in which
every monochromatic infinite path has lower density $0$ and thus we restrict
our attention to upper densities. Rado [9] proved that every $r$-edge-coloured
$K_{\mathbb{N}}$ contains $r$ vertex-disjoint monochromatic paths which
together cover all vertices. In particular, one of them must have upper
density at least $1/r$. Erdős and Galvin [3] proved that in every
$2$-colouring of $K_{\mathbb{N}}$ there is a monochromatic path $P$ with
$\bar{d}(P)\geq 2/3$. Moreover, they constructed a $2$-colouring of
$K_{\mathbb{N}}$ in which every monochromatic path $P$ has upper density at
most $8/9$. DeBiasio and McKenney [2] recently improved the lower bound to
$3/4$ and conjectured the correct value to be $8/9$. Progress towards this
conjecture was made by Lo, Sanhueza-Matamala and Wang [8], who raised the
lower bound to $(9+\sqrt{17})/16\approx 0.82019$.

We prove that the correct value is in fact ${(12+\sqrt{8})}/{17}\approx
0.87226$.

######  Theorem 1.1.

There exists a 2-colouring of the edges of $K_{\mathbb{N}}$ such that every
monochromatic path has upper density at most ${(12+\sqrt{8})}/{17}$.

######  Theorem 1.2.

In every $2$-colouring of the edges of $K_{\mathbb{N}}$, there exists a
monochromatic path of upper density at least ${(12+\sqrt{8})}/{17}$.

Now that we have solved the problem for two colours, it would be very
interesting to make any improvement on Rado’s lower bound of $1/r$ for $r\geq
3$ colours (see [2, Corollary 3.5] for the best known upper bound). In
particular for three colours, the correct value is between $1/3$ and $1/2$.

##  2 Notation

We write $\mathbb{N}$ to be the positive integers with the standard ordering.
Throughout the paper when referring to a finite graph on $n$ vertices, it is
always assumed that the vertex set is $[n]=\\{1,2,\dots,n\\}$ and that it is
ordered in the natural way. An _infinite path_ $P$ is a graph with vertex set
$V(P)=\\{v_{i}:i\in\mathbb{N}\\}$ and edge set
$E(P)=\\{v_{i}v_{i+1}:i\in\mathbb{N}\\}$. While paths are defined to be one-
way infinite, all of the results mentioned above on upper density of
monochromatic infinite paths apply equally well to two-way infinite paths. For
a graph $G$ with $V(G)\subseteq\mathbb{N}$ and $t\in\mathbb{N}$, we define

$d(G,t)=\frac{|V(G)\cap[t]|}{t}.$

Thus we can express the upper density of $G$ as
$\bar{d}(G)=\limsup_{t\rightarrow\infty}d(G,t).$

##  3 Upper bound

In this section, we will prove Theorem 1.1. Let $q>1$ be a real number, whose
exact value will be chosen later on. We start by defining a colouring of the
edges of the infinite complete graph. Let $A_{0},A_{1},\dots$ be a partition
of $\mathbb{N}$, such that every element of $A_{i}$ precedes every element of
$A_{i+1}$ and $|A_{i}|=\lfloor q^{i}\rfloor$. We colour the edges of
$G=K_{\mathbb{N}}$ such that every edge $uv$ with $u\in A_{i}$ and $v\in
A_{j}$ is red if $\min\\{i,j\\}$ is odd, and blue if it is even. A
straightforward calculation shows that for $q=2$, every monochromatic path $P$
in $G$ satisfies $\bar{d}(P)\leq 8/9$ (see Theorem 1.5 in [3]). We will
improve this bound by reordering the vertices of $G$ and then optimizing the
value of $q$.

For convenience, we will say that the vertex $v\in A_{i}$ is red if $i$ is odd
and blue if $i$ is even. We also denote by $B$ the set of blue vertices and by
$R$ be the set of red vertices. Let $b_{i}$ and $r_{i}$ denote the $i$-th blue
vertex and the $i$-th red vertex, respectively. We define a monochromatic red
matching $M_{r}$ by forming a matching between $A_{2i-1}$ and the first
$|A_{2i-1}|$ vertices of $A_{2i}$ for each $i\geq 1$. Similarly, we define a
monochromatic blue matching $M_{b}$ by forming a matching between $A_{2i}$ and
the first $|A_{2i}|$ vertices of $A_{2i+1}$ for each $i\geq 0$.

Figure 1: The colouring for $q=2$ and the reordering by $f$.

Next, let us define a bijection $f\colon\mathbb{N}\to V(G)$, which will serve
as a reordering of $G$. Let $r_{t}^{*}$ denote the $t$-th red vertex not in
$M_{b}$, and $b_{t}^{*}$ denote the $t$-th blue vertex not in $M_{r}$. The
function $f$ is defined as follows. We start enumerating blue vertices, in
their order, until we reach $b_{1}^{*}$. Then we enumerate red vertices, in
their order, until we reach $r_{1}^{*}$. Then we enumerate blue vertices again
until we reach $b_{2}^{*}$. We continue enumerating vertices in this way,
changing colours whenever we find an $r_{t}^{*}$ or a $b_{t}^{*}$. (See Figure
1.) Finally, for every $H\subseteq G$, we define

$\bar{d}(H;f)=\limsup_{t\rightarrow\infty}\frac{|V(H)\cap f([t])|}{t}.$

Note that $\bar{d}(H;f)$ is the upper density of $H$ in the reordered graph
$f^{-1}(G)$.

######  Claim 3.1.

Let $P_{r}$ and $P_{b}$ be infinite monochromatic red and blue paths in $G$,
respectively. Then $\bar{d}(P_{r};f)\leq\bar{d}(M_{r};f)$ and
$\bar{d}(P_{b};f)\leq\bar{d}(M_{b};f)$.

######  Claim 3.2.

We have

$\bar{d}(M_{r};f),\leavevmode\nobreak\
\bar{d}(M_{b};f)\leq\frac{q^{2}+2q-1}{q^{2}+3q-2}.$

We can easily derive Theorem 1.1 from these two claims. Note that the rational
function in Claim 3.2 evaluates to ${(12+\sqrt{8})}/{17}$ at
$q\coloneqq\sqrt{2}+1$. It then follows from Claim 3.1 and 3.2, that every
monochromatic path $P$ in $G$ satisfies
$\bar{d}(P;f)\leq{(12+\sqrt{8})}/{17}$. Thus we can define the desired
colouring of $K_{\mathbb{N}}$, by colouring each edge $ij$ with the colour of
the edge $f(i)f(j)$ in $G$.

It remains to prove Claim 3.1 and 3.2. The intuition behind Claim 3.1 is that
in every monochromatic red path $P_{r}$ there is a red matching with the same
vertex set, and that $M_{r}$ has the largest upper density among all red
matchings, as it contains every red vertex and has the largest possible upper
density of blue vertices. Note that the proof of Claim 3.1 only uses the
property that $f$ preserves the order of the vertices inside $R$ and inside
$B$.

###### Proof of Claim 3.1.

We will show $\bar{d}(P_{r};f)\leq\bar{d}(M_{r};f)$. (The other case is
analogous.) We prove that, for every positive integer $k$, we have
$|V(P_{r})\cap f([k])|\leq|V(M_{r})\cap f([k])|$. Assume, for contradiction,
that this is not the case and let $k$ be the minimum positive integer for
which the inequality does not hold. Every red vertex is saturated by $M_{r}$,
so $|V(P_{r})\cap f([k])\cap B|>|V(M_{r})\cap f([k])\cap B|$. By the
minimality of $k$, $f(k)$ must be in $P_{r}$ but not in $M_{r}$, and in
particular it must be blue.

Let $f(k)\in A_{2i}$. Since $f(k)\not\in M_{r}$, we know that $f(k)$ is not
among the first $|A_{2i-1}|$ vertices of $A_{2i}$. Therefore, since $f$
preserves the order of the vertices inside $B$, $f([k])$ contains the first
$|A_{2i-1}|$ blue vertices in $A_{2i}$, and hence

$|V(P_{r})\cap f([k])\cap B|>|V(M_{r})\cap f([k])\cap
B|=\sum_{j=1}^{i}|A_{2j-1}|.$ (1)

On the other hand, every edge between two blue vertices is blue, so the
successor of every blue vertex in $P_{r}$ is red, and in particular there is a
red matching between $V(P_{r})\cap B$ and $R$ saturating $V(P_{r})\cap B$. So
by (1), the number of red neighbours of $V(P_{r})\cap f([k])\cap B$ is at
least $|V(P_{r})\cap f([k])\cap B|>\sum_{j=1}^{i}|A_{2j-1}|$. Observe that by
the definition of $f$, we have $V(P_{r})\cap f([k])\cap
B\subseteq\bigcup_{j=0}^{i}A_{2j}$. Hence the red neighbourhood of
$V(P_{r})\cap f([k])\cap B$ is contained in $\bigcup_{j=1}^{i}A_{2j-1}$, a
contradiction. ∎

###### Proof of Claim 3.2.

Let $\ell_{r}(t)$ and $\ell_{b}(t)$ denote the position of $r_{t}^{*}$ among
the red vertices and of $b_{t}^{*}$ among the blue vertices, respectively. In
other words, let $\ell_{r}(t)=i$ where $r_{t}^{*}=r_{i}$ and $\ell_{b}(t)=j$
where $b_{t}^{*}=b_{j}$ (so for example in Figure 1, $\ell_{r}(4)=9$ and
$\ell_{b}(4)=14$). Note that $f(\ell_{b}(t)+\ell_{r}(t))=r_{t}^{*}$, so for
$\ell_{b}(t-1)+\ell_{r}(t-1)\leq k\leq\ell_{b}(t)+\ell_{r}(t)-1$, $f([k])$ has
exactly $t-1$ vertices outside of $M_{b}$ and at least $t-1$ vertices outside
of $M_{r}$. As a consequence, we obtain

$\bar{d}(M_{r};f),\leavevmode\nobreak\
\bar{d}(M_{b};f)\leq\limsup_{k\to\infty}(1-h(k))=\limsup\limits_{t\rightarrow\infty}\left(1-\frac{t-1}{\ell_{r}(t)+\ell_{b}(t)-1}\right),$
(2)

where $h(k)=(t-1)/k$ if $\ell_{b}(t-1)+\ell_{r}(t-1)\leq
k\leq\ell_{b}(t)+\ell_{r}(t)-1$. It is easy to see that

$\displaystyle\ell_{r}(t)=t+\sum\limits_{j=0}^{i}|A_{2j}|\quad$
$\displaystyle\text{for}\quad\sum\limits_{j=0}^{i-1}(|A_{2j+1}|-|A_{2j}|)<t\leq\sum\limits_{j=0}^{i}(|A_{2j+1}|-|A_{2j}|),\text{
and}$ $\displaystyle\ell_{b}(t)=t+\sum\limits_{j=1}^{i}|A_{2j-1}|\quad$
$\displaystyle\text{for}\quad\sum\limits_{j=1}^{i-1}(|A_{2j}|-|A_{2j-1}|)<t-|A_{0}|\leq\sum\limits_{j=1}^{i}(|A_{2j}|-|A_{2j-1}|).$

Note that $\ell_{r}(t)-t$ and $\ell_{b}(t)-t$ are piecewise constant and non-
decreasing. We claim that, in order to compute the right hand side of (2), it
suffices to consider values of $t$ for which
$\ell_{r}(t)-t>\ell_{r}(t-1)-(t-1)$ or $\ell_{b}(t)-t>\ell_{b}(t-1)-(t-1)$.
This is because we can write

$1-\frac{t-1}{\ell_{r}(t)+\ell_{b}(t)-1}=\frac{1}{2}+\frac{(\ell_{r}(t)-t)+(\ell_{b}(t)-t)+1}{2(\ell_{r}(t)+\ell_{b}(t)-1)}.$

In this expression, the second fraction has a positive, piecewise constant
numerator and a positive increasing denominator. Therefore, the local maxima
are attained precisely at the values for which the numerator increases. We
will do the calculations for the case when $\ell_{r}(t)-t>\ell_{r}(t-1)-(t-1)$
(the other case is similar), in which we have

$\displaystyle t$
$\displaystyle=1+\sum\limits_{j=0}^{i-1}(|A_{2j+1}|-|A_{2j}|)=1+\sum\limits_{j=0}^{i-1}(1+o(1))q^{2j}(q-1)=(1+o(1))\frac{q^{2i}}{q+1},$
$\displaystyle\ell_{r}(t)$
$\displaystyle=t+\sum\limits_{j=0}^{i}|A_{2j}|=(1+o(1))\left(\frac{q^{2i}}{q+1}+\sum\limits_{j=0}^{i}q^{2j}\right)=(1+o(1))\frac{(q^{2}+q-1)q^{2i}}{q^{2}-1},\text{
and}$ $\displaystyle\ell_{b}(t)$
$\displaystyle=t+\sum\limits_{j=1}^{i}|A_{2j-1}|=(1+o(1))\left(\frac{q^{2i}}{q+1}+\sum\limits_{j=1}^{i}q^{2j-1}\right)=(1+o(1))\frac{(2q-1)q^{2i}}{q^{2}-1}.$

Plugging this into (2) gives the desired result. ∎

##  4 Lower bound

This section is dedicated to the proof of Theorem 1.2. A _total colouring_ of
a graph $G$ is a colouring of the vertices and edges of $G$. Due to an
argument of Erdős and Galvin, the problem of bounding the upper density of
monochromatic paths in edge coloured graphs can be reduced to the problem of
bounding the upper density of monochromatic path forests in totally coloured
graphs.

######  Definition 4.1 (Monochromatic path forest).

Given a totally coloured graph $G$, a forest $F\subseteq G$ is said to be a
_monochromatic path forest_ if $\Delta(F)\leq 2$ and there is a colour $c$
such that all leaves, isolated vertices, and edges of $F$ receive colour $c$.

######  Lemma 4.2.

For every $\gamma>0$ and $k\in\mathbb{N}$, there is some
$n_{0}=n_{0}(k,\gamma)$ so that the following is true for every $n\geq n_{0}$.
For every total $2$-colouring of $K_{n}$, there is an integer $t\in[k,n]$ and
a monochromatic path forest $F$ with $d(F,t)\geq{(12+\sqrt{8})}/{17}-\gamma$.

Some standard machinery related to Szemerédi’s regularity lemma, adapted to
the ordered setting, will allow us to reduce the problem of bounding the upper
density of monochromatic path forests to the problem of bounding the upper
density of monochromatic simple forests.

######  Definition 4.3 (Monochromatic simple forest).

Given a totally coloured graph $G$, a forest $F\subseteq G$ is said to be a
_monochromatic simple forest_ if $\Delta(F)\leq 1$ and there is a colour $c$
such that all edges and isolated vertices of $F$ receive colour $c$ and at
least one endpoint of each edge of $F$ receives colour $c$.

######  Lemma 4.4.

For every $\gamma>0$, there exists $k_{0},N\in\mathbb{N}$ and $\alpha>0$ such
that the following holds for every integer $k\geq k_{0}$. Let $G$ be a totally
$2$-coloured graph on $kN$ vertices with minimum degree at least
$(1-\alpha)kN$. Then there exists an integer $t\in[k/8,kN]$ and a
monochromatic simple forest $F$ such that
$d(F,t)\geq{(12+\sqrt{8})}/{17}-\gamma$.

The heart of the proof is Lemma 4.4, which we shall prove in Section 4.3. But
first, in the next two sections, we show how to deduce Theorem 1.2 from Lemmas
4.2 and 4.4.

###  4.1 From path forests to paths

In this section we use Lemma 4.2 to prove Theorem 1.2. Our exposition follows
that of Theorem 1.6 in [2].

###### Proof of Theorem 1.2.

Fix a $2$-colouring of the edges of $K_{\mathbb{N}}$ in red and blue. We
define a $2$-colouring of the vertices by colouring $n\in\mathbb{N}$ red if
there are infinitely many $m\in\mathbb{N}$ such that the edge $nm$ is red and
blue otherwise.

Case 1. Suppose there are vertices $x$ and $y$ of the same colour, say red,
and a finite set $S\subseteq\mathbb{N}$ such that there is no red path
disjoint from $S$ which connects $x$ to $y$.

We partition $\mathbb{N}\setminus S$ into sets $X,Y,Z$, where $x^{\prime}\in
X$ if and only if there is a red path, disjoint from $S$, which connects
$x^{\prime}$ to $x$ and $y^{\prime}\in Y$ if and only if there is a red path
disjoint from $S$ which connects $y$ to $y^{\prime}$. Note that every edge
from $X\cup Y$ to $Z$ is blue. Since $x$ and $y$ are coloured red, both $X$
and $Y$ are infinite, and by choice of $x$ and $y$ all edges in the bipartite
graph between $X$ and $Y\cup Z$ are blue. Hence there is a blue path with
vertex set $X\cup Y\cup Z=\mathbb{N}\setminus S$.

Case 2. Suppose that for every pair of vertices $x$ and $y$ of the same colour
$c$, and every finite set $S\subseteq\mathbb{N}$, there is a path from $x$ to
$y$ of colour $c$ which is disjoint from $S$.

Let $\gamma_{n}$ be a sequence of positive reals tending to zero, and let
$a_{n}$ and $k_{n}$ be increasing sequences of integers such that

$a_{n}\geq n_{0}(k_{n},\gamma_{n})$ and
$k_{n}/(a_{1}+\dots+a_{n-1}+k_{n})\rightarrow 1$,

where $n_{0}(k,\gamma)$ is as in Lemma 4.2. Let $\mathbb{N}=(A_{i})$ be a
partition of $\mathbb{N}$ into consecutive intervals with $|A_{n}|=a_{n}$. By
Lemma 4.2 there are monochromatic path forests $F_{n}$ with $V(F_{n})\subseteq
A_{n}$ and initial segments $I_{n}\subseteq A_{n}$ of length at least $k_{n}$
such that

$|V(F_{n})\cap
I_{n}|\geq\left(\frac{12+\sqrt{8}}{17}-\gamma_{n}\right)|I_{n}|.$

It follows that for any $G\subseteq K_{\mathbb{N}}$ containing infinitely many
$F_{n}$’s we have

$\bar{d}(G)\geq\limsup_{n\rightarrow\infty}\frac{|V(F_{n})\cap
I_{n}|}{a_{1}+\dots+a_{n-1}+|I_{n}|}\geq\limsup_{n\rightarrow\infty}\frac{12+\sqrt{8}}{17}-\gamma_{n}=\frac{12+\sqrt{8}}{17}.$

By the pigeonhole principle, there are infinitely many $F_{n}$’s of the same
colour, say blue. We will recursively construct a blue path $P$ which contains
infinitely many of these $F_{n}$’s. To see how this is done, suppose we have
constructed a finite initial segment $p$ of $P$. We will assume as an
inductive hypothesis that $p$ ends at a blue vertex $v$. Let $n$ be large
enough that $\min(A_{n})$ is greater than every vertex in $p$, and $F_{n}$ is
blue. Let $F_{n}=\\{P_{1},\dots,P_{s}\\}$ for some $s\in\mathbb{N}$ and let
$w_{i},w_{i}^{\prime}$ be the endpoints of the path $P_{i}$ (note that $w_{i}$
and $w_{i}^{\prime}$ could be equal) for every $i\in[s]$. By the case
assumption, there is a blue path $q_{1}$ connecting $v$ to $w_{1}$, such that
$q_{1}$ is disjoint from $A_{1}\cup\dots\cup A_{n}$. Similarly, there is a
blue path $q_{2}$ connecting $w_{1}^{\prime}$ to $w_{2}$, such that $q_{2}$ is
disjoint from $A_{1}\cup\dots\cup A_{n}\cup\\{q_{1}\\}$. Continuing in this
fashion, we find disjoint blue paths $q_{3},\dots,q_{s}$ such that $q_{i}$
connects $w_{i-1}^{\prime}$ to $w_{i}$. Hence, we can extend $p$ to a path
$p^{\prime}$ which contains all of the vertices of $F_{n}$ and ends at a blue
vertex. ∎

###  4.2 From simple forests to path forests

In this section we use Lemma 4.4 to prove Lemma 4.2. The proof is based on
Szemerédi’s Regularity Lemma, which we introduce below. The main difference to
standard applications of the Regularity Lemma is, that we have to define an
ordering of the reduced graph, which approximately preserves densities. This
is done by choosing a suitable initial partition.

Let $G=(V,E)$ be a graph and $A$ and $B$ be non-empty, disjoint subsets of
$V$. We write $e_{G}(A,B)$ for the number of edges in $G$ with one vertex in
$A$ and one in $B$ and define the _density_ of the pair $(A,B)$ to be
$d_{G}(A,B)=e_{G}(A,B)/(|A||B|)$. The pair $(A,B)$ is _$\varepsilon$ -regular_
(in $G$) if we have $|d_{G}(A^{\prime},B^{\prime})-d_{G}(A,B)|\leq\varepsilon$
for all $A^{\prime}\subseteq A$ with $|A^{\prime}|\geq\varepsilon|A|$ and
$B^{\prime}\subseteq B$ with $|B^{\prime}|\geq\varepsilon|B|$. It is well-
known (see for instance [5]) that dense regular pairs contain almost spanning
paths. We include a proof of this fact for completeness.

######  Lemma 4.5.

For $0<\varepsilon<1/4$ and $d\geq 2\sqrt{\varepsilon}+\varepsilon$, every
$\varepsilon$-regular pair $(A,B)$ with density at least $d$ contains a path
with both endpoints in $A$ and covering all but at most
$2\sqrt{\varepsilon}|A|$ vertices of $A\cup B$.

###### Proof.

We will construct a path $P_{k}=(a_{1}b_{1}\dots a_{k})$ for every
$k=1,\ldots,\lceil(1-\sqrt{\varepsilon})|A|\rceil$ such that $B_{k}\coloneqq
N(a_{k})\setminus V(P_{k})$ has size at least $\varepsilon|B|$. As
$d\geq\varepsilon$, this is easy for $k=1$. Assume now that we have
constructed $P_{k}$ for some $1\leq k<(1-\sqrt{\varepsilon})|A|$. We will show
how to extend $P_{k}$ to $P_{k+1}$. By $\varepsilon$-regularity of $(A,B)$,
the set $\bigcup_{b\in B_{k}}N(b)$ has size at least $(1-\varepsilon)|A|$. So
$A^{\prime}\coloneqq\bigcup_{b\in B_{k}}N(b)\setminus V(P_{k})$ has size at
least $(\sqrt{\varepsilon}-\varepsilon)|A|\geq\varepsilon|A|$. Let
$B^{\prime}=B\setminus V(P_{k})$ and note that
$|B^{\prime}|\geq\sqrt{\varepsilon}|B|$ as $k<(1-\sqrt{\varepsilon})|A|$ and
$|A|=|B|$. By $\varepsilon$-regularity of $(A,B)$, there exists $a_{k+1}\in
A^{\prime}$ with at least $(d-\varepsilon)|B^{\prime}|\geq 2\varepsilon|B|$
neighbours in $B^{\prime}$. Thus we can define $P_{k+1}=(a_{1}b_{1}\dots
a_{k}b_{k}a_{k+1})$, where $b_{k}\in B_{k}\cap N(a_{k+1})$. ∎

A family of disjoint subsets $\\{V_{i}\\}_{i\in[m]}$ of a set $V$ is said to
_refine_ a partition $\\{W_{j}\\}_{j\in[\ell]}$ of $V$ if, for all $i\in[m]$,
there is some $j\in[\ell]$ with $V_{i}\subseteq W_{j}$.

######  Lemma 4.6 (Regularity Lemma [6, 10]).

For every $\varepsilon>0$ and $m_{0},\ell\geq 1$ there exists
$M=M(\varepsilon,m_{0},\ell)$ such that the following holds. Let $G$ be a
graph on $n\geq M$ vertices whose edges are coloured in red and blue and let
$d>0$. Let $\\{W_{i}\\}_{i\in[\ell]}$ be a partition of $V(G)$. Then there
exists a partition $\\{V_{0},\dots,V_{m}\\}$ of $V(G)$ and a subgraph $H$ of
$G$ with vertex set $V(G)\setminus V_{0}$ such that the following holds:

  1. _(i)_

$m_{0}\leq m\leq M$;

  2. _(ii)_

$\\{V_{i}\\}_{i\in[m]}$ refines $\\{W_{i}\cap V(H)\\}_{i\in[\ell]}$;

  3. _(iii)_

$|V_{0}|\leq\varepsilon n$ and $|V_{1}|=\dots=|V_{m}|\leq\lceil\varepsilon
n\rceil$;

  4. _(iv)_

$\deg_{H}(v)\geq\deg_{G}(v)-(d+\varepsilon)n$ for each $v\in V(G)\setminus
V_{0}$;

  5. _(v)_

$H[V_{i}]$ has no edges for $i\in[m]$;

  6. _(vi)_

all pairs $(V_{i},V_{j})$ are $\varepsilon$-regular and with density either 0
or at least $d$ in each colour in $H$.

Before we start with the proof, we will briefly describe the setup and proof
strategy of Lemma 4.2. Consider a totally $2$-coloured complete graph
$G=K_{n}$. Denote the sets of red and blue vertices by $R$ and $B$,
respectively. For $\ell\geq 4,$ let $\\{W_{j}\\}_{j\in[\ell]}$ be a partition
of $[n]$ such that each $W_{j}$ consists of at most $\lceil n/{\ell}\rceil$
subsequent vertices. The partition $\\{W^{\prime}_{j}\\}_{j\in[2\ell]}$, with
parts of the form $W_{i}\cap R$ and $W_{i}\cap B$, refines both
$\\{W_{j}\\}_{j\in[\ell]}$ and $\\{R,B\\}$. Suppose that $V_{0}\cup\dots\cup
V_{m}$ is a partition obtained from Lemma 4.6 applied to $G$ and
$\\{W^{\prime}_{j}\\}_{j\in[2\ell]}$ with parameters $\varepsilon$, $m_{0}$,
$2\ell$ and $d$. We define the $(\varepsilon,d)$-_reduced graph_
${G^{\prime}}$ to be the graph with vertex set $V({G^{\prime}})=[m]$ where
$ij$ is an edge of ${G^{\prime}}$ if and only if if $(V_{i},V_{j})$ is an
$\varepsilon$-regular pair of density at least $d$ in the red subgraph of $H$
or in the blue subgraph of $H$. Furthermore, we colour $ij$ red if
$(V_{i},V_{j})$ is an $\varepsilon$-regular pair of density at least $d$ in
the red subgraph of $H$, otherwise we colour $ij$ blue. As
$\\{V_{i}\\}_{i\in[m]}$ refines $\\{R,B\\}$, we can extend this to a total
2-colouring of $G^{\prime}$ by colouring each vertex $i$ red, if
$V_{i}\subseteq R$, and blue otherwise. By relabelling the clusters, we can
furthermore assume that $i<j$ if and only if
$\max\\{V_{i}\\}<\max\\{V_{j}\\}$. Note that, by choice of
$\\{W_{j}\\}_{j\in[\ell]}$, any two vertices in $V_{i}$ differ by at most
$n/\ell$. Moreover, a simple calculation (see [7, Proposition 42]) shows that
${G^{\prime}}$ has minimum degree at least $(1-d-3\varepsilon)m$.

Given this setup, our strategy to prove Lemma 4.2 goes as follows. First, we
apply Lemma 4.4 to obtain $t^{\prime}\in[m]$ and a, red say, simple forest
$F^{\prime}\subseteq G^{\prime}$ with
$d(F^{\prime},t^{\prime})\approx{(12+\sqrt{8})}/{17}$. Next, we turn
$F^{\prime}$ into a red path forest $F\subseteq G$. For every isolated vertex
$i\in V(F^{\prime})$, this is straightforward as $V_{i}\subseteq R$ by the
refinement property. For every edge $ij\in E(F^{\prime})$ with $i\in R$, we
apply Lemma 4.5 to obtain a red path that almost spans $(V_{i},V_{j})$ and has
both ends in $V_{i}$. So the union $F^{\prime}$ of these paths and vertices is
indeed a red path forest. Since the vertices in each $V_{i}$ do not differ too
much, it will follow that $d(F,t)\approx{(12+\sqrt{8})}/{17}$ for
$t=\max\\{V_{t^{\prime}}\\}$.

###### Proof of Lemma 4.2.

Suppose we are given $\gamma>0$ and $k\in\mathbb{N}$ as input. Let
$k_{0},N\in\mathbb{N}$ and $\alpha>0$ be as in Lemma 4.4 with input
$\gamma/4$. We choose constants $d,\varepsilon>0$ and
$\ell,m_{0}\in\mathbb{N}$ satisfying

$2\sqrt{\varepsilon}+\varepsilon\leq 1/\ell,d\leq\alpha/8$ and $m_{0}\geq
4N/d,2k_{0}N$.

We obtain $M$ from Lemma 4.6 with input $\varepsilon,m_{0}$ and $2\ell$.
Finally, set $n_{0}=16k\ell MN$.

Now let $n\geq n_{0}$ and suppose that $K_{n}$ is an ordered complete graph on
vertex set $[n]$ and with a total $2$-colouring in red and blue. We have to
show that there is an integer $t\in[k,n]$ and a monochromatic path forest $F$
such that $|V(F)\cap[t]|\geq({(12+\sqrt{8})}/{17}-\gamma)t$.

Denote the red and blue vertices by $R$ and $B$, respectively. Let
$\\{W^{\prime}_{j}\\}_{j\in[\ell]}$ refine $\\{R,B\\}$ as explained in the
above setting. Let $\\{V_{0},\dots,V_{m}\\}$ be a partition of $[n]$ with
respect to $G=K_{n}$ and $\\{W^{\prime}_{j}\\}_{j\in[\ell]}$ as detailed in
Lemma 4.6 with totally 2-coloured $(\varepsilon,d)$-reduced graph
$G^{\prime\prime}$ of minimum degree $\delta(G^{\prime\prime})\geq(1-4d)m$.
Set $k^{\prime}=\lfloor m/N\rfloor\geq k_{0}$ and observe that the subgraph
${G^{\prime}}$ induced by $G^{\prime\prime}$ in $[k^{\prime}N]$ satisfies
$\delta({G^{\prime}})\geq(1-8d)m\geq(1-\alpha)m$ as $m\geq 4N/d$. Thus we can
apply Lemma 4.4 with input ${G^{\prime}}$, $k^{\prime}$, $\gamma/4$ to obtain
an integer $t^{\prime}\in[k^{\prime}/8,k^{\prime}N]$ and a monochromatic (say
red) simple forest $F^{\prime}\subseteq{G^{\prime}}$ such that
$d(F^{\prime},t^{\prime})\geq{(12+\sqrt{8})}/{17}-\gamma/4$.

Set $t=\max V_{t^{\prime}}$. We have that $V_{t^{\prime}}\subseteq W_{j}$ for
some $j\in[\ell]$. Recall that $i<j$ if and only if
$\max\\{V_{i}\\}<\max\\{V_{j}\\}$ for any $i,j\in[m]$. It follows that
$V_{i}\subseteq[t]$ for all $i\leq t^{\prime}$. Hence

$t\geq
t^{\prime}|V_{1}|\geq\frac{k^{\prime}}{8}|V_{1}|\geq\left\lfloor\frac{m}{N}\right\rfloor\frac{(1-\varepsilon)n}{8m}\geq\frac{n}{16N}.$
(3)

This implies $t\geq k$ by choice of $n_{0}$. Since $[t]$ is covered by
$V_{0}\cup W_{j}\cup\bigcup_{i\in[t^{\prime}]}V_{i}$, it follows that

$\displaystyle t^{\prime}|V_{1}|$ $\displaystyle\geq t-|V_{0}|-|W_{j}|$
$\displaystyle\geq\left(1-\varepsilon\frac{n}{t}-\frac{4}{\ell}\frac{n}{t}\right)t$
$\displaystyle\geq\left(1-16\varepsilon
N-\frac{64N}{\ell}\right)t\leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \text{ (by
}\eqref{equ:t-geq-n/64N})$
$\displaystyle\geq\left(1-\frac{\gamma}{2}\right)t.$ (4)

For every edge $ij\in E(F^{\prime})$ with $V_{i}\subseteq R$, we apply Lemma
4.5 to choose a path $P_{ij}$ which starts and ends in $V_{i}$ and covers all
but at most $2\sqrt{\varepsilon}|V_{1}|$ vertices of each $V_{i}$ and $V_{j}$.
We denote the isolated vertices of $F^{\prime}$ by $I^{\prime}$. For each
$i\in I^{\prime}$ we have $V_{i}\subseteq R$. Hence the red path forest
$F\coloneqq\bigcup_{i\in I^{\prime}}V_{i}\cup\bigcup_{ij\in
E(F^{\prime})}P_{ij}\subseteq K_{n}$ satisfies

$\displaystyle|V(F)\cap[t]|$ $\displaystyle=\sum_{i\in
I^{\prime}}|V_{i}\cap[t]|+\sum_{ij\in E(F^{\prime})}|V(P_{ij})\cap[t]|$
$\displaystyle\geq\sum_{i\in I^{\prime}\cap[t^{\prime}]}|V_{i}|+\sum_{i\in
V(F^{\prime}-I^{\prime})\cap[t^{\prime}],}(|V_{i}|-2\sqrt{\varepsilon}|V_{1}|)$
$\displaystyle\geq(1-2\sqrt{\varepsilon})|V_{1}||V(F^{\prime})\cap[t^{\prime}]|$
$\displaystyle\geq(1-2\sqrt{\varepsilon})\left(\frac{12+\sqrt{8}}{17}-\frac{\gamma}{4}\right)t^{\prime}|V_{1}|$
$\displaystyle\overset{\eqref{equ:t-t'}}{\geq}\left(\frac{12+\sqrt{8}}{17}-\gamma\right)t$

as desired. ∎

###  4.3 Upper density of simple forests

In this section we prove Lemma 4.4. For a better overview, we shall define all
necessary constants here. Suppose we are given $\gamma^{\prime}>0$ as input
and set $\gamma=\gamma^{\prime}/4$. Fix a positive integer $N=N(\gamma)$ and
let $0<\alpha\leq\gamma/(8N)$. The exact value of $N$ will be determined later
on. Let $k_{0}=\lceil 8/\gamma\rceil$ and fix a positive integer $k\geq
k_{0}$. Consider a totally 2-coloured graph $G^{\prime}$ on $n=kN$ vertices
with minimum degree at least $(1-\alpha)n$.

Denote the sets of red and blue vertices by $R$ and $B$, respectively. As it
turns out, we will not need the edges inside $R$ and $B$. So let $G$ be the
spanning bipartite subgraph, obtained from $G^{\prime}$ by deleting all edges
within $R$ and $B$. For each red vertex $v$, let $d_{b}(v)$ be the number of
blue edges incident to $v$ in $G$. Let $a_{1}\leq\dots\leq a_{|R|}$ denote the
degree sequence taken by $d_{b}(v)$. The whole proof of Lemma 4.4 revolves
around analysing this sequence.

Fix an integer $t=t(\gamma,N,k)$ and subset $R^{\prime}\subseteq R$,
$B^{\prime}\subseteq B$. The value of $t$ and nature of $R^{\prime}$,
$B^{\prime}$ will be determined later. The following two observations explain
our interest in the sequence $a_{1}\leq\dots\leq a_{|R|}$.

######  Claim 4.7.

If $a_{j}>j-t$ for all $1\leq j\leq|R^{\prime}|-1$, then there is a blue
simple forest covering all but at most $t$ vertices of $R^{\prime}\cup B$.

###### Proof.

We write $R^{\prime}=\\{v_{1},\dots,v_{|R^{\prime}|}\\}$ such that
$d_{b}(v_{i})\leq d_{b}(v_{j})$ for every ${1\leq i\leq j\leq|R^{\prime}|}$.
By assumption, we have $d_{b}(v_{j})\geq a_{j}>j-t$ for all $1\leq
j\leq|R^{\prime}|-1$. Thus we can greedily select a blue matching containing
$\\{v_{t},v_{t+1},\dots,v_{|R^{\prime}|-1}\\}$, which covers all but $t$
vertices of $R^{\prime}$. Together with the rest of $B$, this forms the
desired blue simple forest. ∎

######  Claim 4.8.

If $a_{i}<i+t$ for all $1\leq i\leq|B^{\prime}|-t$, then there is a red simple
forest covering all but at most $t+\alpha n$ vertices of $R\cup B^{\prime}$.

###### Proof.

Let $X^{\prime}$ be a minimum vertex cover of the red edges in the subgraph of
$G$ induced by $R\cup B^{\prime}$. If $|X^{\prime}|\geq|B^{\prime}|-t-\alpha
n$, then by König’s theorem there exists a red matching covering at least
$|B^{\prime}|-t-\alpha n$ vertices of $B^{\prime}$. This together with the
vertices in $R$ yields the desired red simple forest.

Suppose now that $|X^{\prime}|<|B^{\prime}|-t-\alpha n$. Since every edge
between $R\setminus(X^{\prime}\cap R)$ and $B^{\prime}\setminus(X^{\prime}\cap
B^{\prime})$ is blue, we have for every vertex $v$ in
$R\setminus(X^{\prime}\cap R)$,

$d_{b}(v)\geq|B^{\prime}|-|X^{\prime}\cap B^{\prime}|-\alpha n=|X^{\prime}\cap
R|+|B^{\prime}|-|X^{\prime}|-\alpha n>|X^{\prime}\cap R|+t.$

In particular, this implies $a_{i}\geq i+t$ for $i=|X^{\prime}\cap R|+1$. So
$|B^{\prime}|-t+1\leq|X^{\prime}\cap R|+1$ by the assumption in the statement.
Together with

$|X^{\prime}\cap R|+1\leq|X^{\prime}|+1<|B^{\prime}|-t-\alpha
n+1<|B^{\prime}|-t+1,$

we reach a contradiction. ∎

Motivated by this, we introduce the following definitions.

######  Definition 4.9 (Oscillation, $\ell^{+}(t)$, $\ell^{-}(t)$).

Let $a_{1},\dots,a_{n}$ be a non-decreasing sequence of non-negative real
numbers. We define its _oscillation_ as the maximum value $T$, for which there
exist indices $i,j\in[n]$ with $a_{i}-i\geq T$ and $j-a_{j}\geq T$. For all
$0<t\leq T$, set

$\displaystyle\ell^{+}(t)$ $\displaystyle=\min\\{i\in[n]\colon\ a_{i}\geq
i+t\\},$ $\displaystyle\ell^{-}(t)$ $\displaystyle=\min\\{j\in[n]\colon\
a_{j}\leq j-t\\}.$

Suppose that the degree sequence $a_{1},\dots,a_{|R|}$ has oscillation $T$ and
fix some positive integer $t\leq T$. We define $\ell$ and $\lambda$ by

$\ell=\ell^{+}(t)+\ell^{-}(t)=\lambda t.$ (5)

The next claim combines Claims 4.7 and 4.8 into a density bound of a
monochromatic simple forest in terms of the ratio $\ell/t=\lambda$. (Note
that, in practice, the term $\alpha n$ will be of negligible size.)

######  Claim 4.10.

There is a monochromatic simple forest $F\subseteq G$ with

$d(F,\ell+t)\geq\frac{\ell-\alpha n}{\ell+t}=\frac{\lambda t-\alpha
n}{(1+\lambda)t}.$

###### Proof.

Let $R^{\prime}=R\cap[\ell+t]$ and $B^{\prime}=B\cap[\ell+t]$ so that
$\ell^{+}(t)+\ell^{-}(t)=\ell=|R^{\prime}|+|B^{\prime}|-t$. Thus we have
either $\ell^{-}(t)\geq|R^{\prime}|$ or $\ell^{+}(t)>|B^{\prime}|-t$. If
$\ell^{-}(t)\geq|R^{\prime}|$, then $a_{j}>j-t$ for every $1\leq
j\leq|R^{\prime}|-1$. Thus Claim 4.7 provides a blue simple forest $F$
covering all but at most $t$ vertices of $[\ell+t]$. On the other hand, if
$\ell^{+}(t)>|B^{\prime}|-t$, then $a_{i}<i+t$ for every $1\leq
i\leq|B^{\prime}|-t$. In this case Claim 4.8 yields a red simple forest $F$
covering all but at most $t+\alpha n$ vertices of $[\ell+t]$. ∎

Claim 4.10 essentially reduces the problem of finding a dense linear forest to
a problem about bounding the ratio $\ell/t$ in integer sequences. It is, for
instance, not hard to see that we always have $\ell\geq 2t$ (which, together
with the methods of the previous two subsections, would imply the bound
$\bar{d}(P)\geq 2/3$ of Erdős and Galvin). The following lemma provides an
essentially optimal lower bound on $\ell/t=\lambda$. Note that for
$\lambda=4+\sqrt{8}$, we have
$\frac{\lambda}{\lambda+1}={(12+\sqrt{8})}/{17}$.

######  Lemma 4.11.

For all $\gamma\in\mathbb{R}^{+}$, there exists $N\in\mathbb{N}$ such that,
for all $k\in\mathbb{R}^{+}$ and all sequences with oscillation at least $kN$,
there exists a real number $t\in[k,kN]$ with

$\ell:=\ell^{+}(t)+\ell^{-}(t)\geq\left(4+\sqrt{8}-\gamma\right)t.$

The proof of Lemma 4.11 is deferred to the last section. We now finish the
proof of Lemma 4.4. Set $N=N(\gamma)$ to be the integer returned by Lemma 4.11
with input $\gamma=\gamma^{\prime}/4$. In order to use Lemma 4.11, we have to
bound the oscillation of $a_{1},\dots,a_{|R|}$:

######  Claim 4.12.

The degree sequence $a_{1},\dots,a_{|R|}$ has oscillation $T\geq kN/8$ or
there is a monochromatic simple forest $F\subseteq G$ with
$d(F,n)\geq{(12+\sqrt{8})}/{17}-\gamma$.

Before we prove Claim 4.12, let us see how this implies Lemma 4.4.

###### Proof of Lemma 4.4.

By Claim 4.12, we may assume that the sequence $a_{1},\dots,a_{|R|}$ has
oscillation at least $kN/8$. By Lemma 4.11, there is a real number
$t^{\prime}\in\left[k/8,{kN}/8\right]$ with

$\ell=\ell^{+}(t^{\prime})+\ell^{-}(t^{\prime})\geq(4+\sqrt{8}-\gamma)t^{\prime}.$

Let $t=t(\gamma,N,k)=\left\lceil t^{\prime}\right\rceil$. Since the $a_{i}$’s
are all integers, we have $\ell^{+}(t)=\ell^{+}(t^{\prime})$ and
$\ell^{-}(t)=\ell^{-}(t^{\prime})$. Let $F\subseteq G$ be the monochromatic
simple forest obtained from Claim 4.10. As $n=kN$, $\ell\geq
t^{\prime}\geq{k/8\geq 1/\gamma}$, $\alpha\leq\gamma/(8N)$, and by (5), it
follows that

$\displaystyle d(F,\ell+t)$ $\displaystyle\geq\frac{\ell-\alpha
n}{\ell+t}=\frac{1-\alpha n/\ell}{1+\frac{t}{\ell}}\geq\frac{1-8\alpha
N}{1+\frac{t^{\prime}}{\ell}{+\frac{1}{\ell}}}\geq\frac{1}{1+\frac{t^{\prime}}{\ell}}{-2\gamma}$
$\displaystyle\geq\frac{1}{1+\frac{1}{4+\sqrt{8}-\gamma}}-2\gamma=\frac{4+\sqrt{8}-\gamma}{5+\sqrt{8}-\gamma}-2\gamma$
$\displaystyle\geq\frac{4+\sqrt{8}}{5+\sqrt{8}}-4\gamma=\frac{12+\sqrt{8}}{17}-\gamma^{\prime},$

as desired. ∎

To finish, it remains to show Claim 4.12. The proof uses König’s theorem and
is similar to the proof of Claim 4.8.

###### Proof of Claim 4.12.

Let $X$ be a minimum vertex cover of the red edges. If
$|X|\geq{|B|}-(1/8+\alpha)n$, then König’s theorem implies that there is a red
matching covering all but at most $(1/8+\alpha)n$ blue vertices. Thus adding
the red vertices, we obtain a red simple forest $F$ with $d(F,kN)\geq
7/8-\alpha\geq{(12+\sqrt{8})}/{17}-\gamma$. Therefore, we may assume that
$|X|<{|B|}-(1/8+\alpha)n$. Every edge between $R\setminus(X\cap R)$ and
$B\setminus(X\cap B)$ is blue. So there are at least ${|R|}-|X\cap R|$ red
vertices $v$ with

$d_{b}(v)\geq{|B|}-|X\cap B|-\alpha n=|X\cap R|+{|B|}-|X|-\alpha n>|X\cap
R|+n/8.$

This implies that $a_{i}\geq i+n/8$ for $i=|X\cap R|+1$. (See Figure 2.)

Figure 2: The sequence $a_{1},\dots,a_{|R|}$ has oscillation at least $kN/8$.

Let $Y$ be a minimum vertex cover of the blue edges. Using König’s theorem as
above, we can assume that $|Y|\leq{|R|}-{n}/{8}$. Every edge between
$R\setminus(Y\cap R)$ and $B\setminus(Y\cap B)$ is red. It follows that there
are at least ${|R|}-|Y\cap R|$ red vertices $v$ with

$d_{b}(v)\leq|Y\cap B|=|Y|-|Y\cap R|\leq{|R|}-|Y\cap R|-\frac{n}{8}.$

This implies that $a_{j}\leq j-{n}/8$ for $j={|R|}-|Y\cap R|$. Thus
$a_{1},\dots,a_{|R|}$ has oscillation at least $n/8=kN/8$. ∎

###  4.4 Sequences and oscillation

We now present the quite technical proof of Lemma 4.11. We will use the
following definition and related lemma in order to describe the oscillation
from the diagonal.

######  Definition 4.13 ($k$-good, $u_{\text{o}}(k)$, $u_{\text{e}}(k)$).

Let $a_{1},\dots,a_{n}$ be a sequence of non-negative real numbers and let $k$
be a positive real number. We say that the sequence is $k$-_good_ if there
exists an odd $i$ and an even $j$ such that $a_{i}\geq k$ and $a_{j}\geq k$.
If the sequence is $k$-good, we define for all $0<t\leq k$

$\displaystyle u_{\text{o}}(t)$
$\displaystyle=a_{1}+\dots+a_{i_{o}-1}\quad\text{where }i_{o}=\min\\{i\colon\
a_{i}\geq t,i\text{ odd}\\},$ $\displaystyle u_{\text{e}}(t)$
$\displaystyle=a_{1}+\dots+a_{i_{e}-1}\quad\text{where }i_{e}=\min\\{i\colon\
a_{i}\geq t,i\text{ even}\\}.$

######  Lemma 4.14.

For all $\gamma\in\mathbb{R}^{+}$ there exists $N\in\mathbb{N}$ such that for
all $k\in\mathbb{R}^{+}$ and all $(kN)$-good sequences, there exists a real
number $t\in[k,kN]$ with

$u_{\text{o}}(t)+u_{\text{e}}(t)\geq\left(3+\sqrt{8}-\gamma\right)t.$

First we use Lemma 4.14 to prove Lemma 4.11.

###### Proof of Lemma 4.11.

Given $\gamma>0$, let $N$ be obtained from Lemma 4.14. Let
$k\in\mathbb{R}^{+}$ and $a_{1},\dots,a_{n}$ be a sequence with oscillation at
least $kN$. Suppose first that $a_{1}\geq 1$. Partition $[n]$ into a family of
non-empty intervals $I_{1},\dots,I_{r}$ with the following properties:

  * •

For every odd $i$ and every $j\in I_{i}$, we have $a_{j}\geq j$.

  * •

For every even $i$ and every $j\in I_{i}$, we have $a_{j}<j$.

Define $s_{i}=\max\left\\{|a_{j}-j|\colon\ j\in I_{i}\right\\}$. Intuitively,
this is saying that the values in the odd indexed intervals are “above the
diagonal” and the values in the even indexed intervals are “below the
diagonal” and $s_{i}$ is the largest gap between sequence values and the
“diagonal” in each interval.

Since $a_{1},\dots,a_{n}$ has oscillation at least $kN$, the sequence
$s_{1},\dots,s_{r}$ is $(kN)$-good and thus by Lemma 4.14, there exists
$t\in[k,kN]$ such that

$u_{\text{o}}(t)+u_{\text{e}}(t)\geq\left(3+\sqrt{8}-\gamma\right)t.$ (6)

Since the sequence $a_{1},a_{2},\dots,a_{n}$ is non-decreasing, $a_{j}-j$ can
decrease by at most one in each step and thus we have $|I_{i}|\geq s_{i}$ for
every $i\in[r-1]$. Moreover, we can find bounds on $\ell^{+}(t)$ and
$\ell^{-}(t)$ in terms of the $s_{i}$:

  * •

$\ell^{+}(t)$ must lie in the interval $I_{i}$ with the smallest odd index
$i_{o}$ such that $s_{i_{o}}\geq t$, therefore $\ell^{+}(t)\geq
s_{1}+\dots+s_{i_{o}-1}=u_{\text{o}}(t)$.

  * •

$\ell^{-}(t)$ must lie in the interval $I_{j}$ with the smallest even index
$i_{e}$ such that $s_{i_{e}}\geq t$. Moreover, it must be at least the $t$-th
element in this interval, therefore $\ell^{-}(t)\geq
s_{1}+\dots+s_{i_{e}-1}+t=u_{\text{e}}(t)+t$.

Combining the previous two observations with (6) gives

$\ell^{+}(t)+\ell^{-}(t)\geq
u_{\text{o}}(t)+u_{\text{e}}(t)+t\geq\left(4+\sqrt{8}-\gamma\right)t,$

as desired.

If $0\leq a_{1}<1$, we start by partitioning $[n]$ into a family of non-empty
intervals $I_{1},\dots,I_{r}$ with the following properties:

  * •

For every even $i$ and every $j\in I_{i}$, we have $a_{j}\geq j$.

  * •

For every odd $i$ and every $j\in I_{i}$, we have $a_{j}<j$.

From this point, the proof is analogous. ∎

Finally, it remains to prove Lemma 4.14. The proof is by contradiction and the
main strategy is to find a subsequence with certain properties which force the
sequence to become negative eventually.

###### Proof of Lemma 4.14.

Let $\rho=3+\sqrt{8}-\gamma$ and let $m:=m(\rho)$ be a positive integer which
will be specified later. Suppose that the statement of the lemma is false for
$N=6\cdot 4^{m}$ and let $a_{1},\dots,a_{n}$ be an $(Nk)$-good sequence
without $t$ as in the statement. We first show that $a_{i}$ has a long
strictly increasing subsequence. Set

$I=\\{i\colon\ a_{i}\geq k,a_{i}>a_{j}\text{ for all }j<i\\},$

denote the elements of $I$ by $i_{1}\leq i_{2}\leq\dots\leq i_{r}$ and let
$a^{\prime}_{j}=a_{i_{j}}$. Consider any $j\in[r-1]$ and suppose without loss
of generality that $i_{j+1}$ is odd. For $\delta$ small enough, this implies
$u_{\text{o}}(a^{\prime}_{j}+\delta)=a_{1}+\dots+a_{i_{j+1}-1}\geq
a^{\prime}_{1}+\dots+a^{\prime}_{j}$, and
$u_{\text{e}}(a^{\prime}_{j}+\delta)\geq a_{1}+\dots+a_{i_{j+1}}\geq
a^{\prime}_{1}+\dots+a^{\prime}_{j+1}$. By assumption we have
$u_{\text{o}}(a^{\prime}_{j}+\delta)+u_{\text{e}}(a^{\prime}_{j}+\delta)<\rho(a^{\prime}_{j}+\delta)$.
Hence, letting $\delta\rightarrow 0$ we obtain
$2\left(a^{\prime}_{1}+\dots+a^{\prime}_{j}\right)+a^{\prime}_{j+1}\leq\rho
a^{\prime}_{j}$, which rearranges to

$a^{\prime}_{j+1}\leq(\rho-2)a^{\prime}_{j}-2\left(a^{\prime}_{1}+\dots+a^{\prime}_{j-1}\right).$
(7)

In particular, this implies
$a^{\prime}_{j+1}\leq(\rho-2)a^{\prime}_{j}<4a^{\prime}_{j}$. Moreover, we
have $a_{1}^{\prime}\leq u_{\text{o}}(k)$ if $i_{1}$ is even and
$a_{1}^{\prime}\leq u_{\text{e}}(k)$ if $i_{1}$ is odd. Therefore,

$6k\cdot 4^{m}=kN\leq a_{r}^{\prime}<4^{r}\cdot a_{1}^{\prime}\leq
4^{r}\max\\{u_{\text{o}}(k),u_{\text{e}}(k)\\}\leq
4^{r}(u_{\text{o}}(k)+u_{\text{e}}(k))<4^{r}\cdot\rho k<6k\cdot 4^{r}$

and thus $r\geq m$.

Finally, we show that any sequence of reals satisfying (7), will eventually
become negative, but since $a_{i}^{\prime}$ is non-negative this will be a
contradiction.

We start by defining the sequence $b_{1},b_{2},\dots$ recursively by $b_{1}=1$
and $b_{i+1}=(\rho-2)b_{i}-2(b_{1}+\dots+b_{i-1})$. Note that

$\displaystyle b_{i+1}$ $\displaystyle=(\rho-2)b_{i}-2(b_{1}+\dots+b_{i-1})$
$\displaystyle=(\rho-1)b_{i}-b_{i}-2(b_{1}+\dots+b_{i-1})$
$\displaystyle=(\rho-1)b_{i}-((\rho-2)b_{i-1}-2(b_{1}+\dots+b_{i-2}))-2(b_{1}+\dots+b_{i-1})$
$\displaystyle=(\rho-1)b_{i}-\rho b_{i-1}$

So equivalently the sequence is defined by,

$b_{1}=1,\leavevmode\nobreak\ b_{2}=\rho-2,\text{ and
}b_{i+1}=(\rho-1)b_{i}-\rho b_{i-1}\text{ for }i\geq 2.$

It is known that a second order linear recurrence relation whose
characteristic polynomial has non-real roots will eventually become negative
(see [1]). Indeed, the characteristic polynomial $x^{2}-(\rho-1)x+\rho$ has
discriminant $\rho^{2}-6\rho+1<0$ and so its roots $\alpha,\bar{\alpha}$ are
non-real. Hence the above recursively defined sequence has the closed form of
$b_{i}=z\alpha^{i}+\bar{z}\bar{\alpha}^{i}=2\text{Re}\left(z\alpha^{i}\right)$
for some complex number $z$. By expressing $z\alpha^{i}$ in polar form we can
see that $b_{m}<0$ for some positive integer $m$. Note that the calculation of
$m$ only depends on $\rho$.

Now let $a^{\prime}_{1},\dots,a^{\prime}_{m}$ be a sequence of non-negative
reals satisfying (7). We will be done if we can show that $a_{j}^{\prime}\leq
a_{1}^{\prime}b_{j}$ for all $1\leq j\leq m$; so suppose
$a^{\prime}_{s}>a^{\prime}_{1}b_{s}$ for some $s$, and such that
$\\{a^{\prime}_{j}\\}_{j=1}^{m}$ and $\\{a^{\prime}_{1}b_{j}\\}_{j=1}^{m}$
coincide on the longest initial subsequence. Let $p$ be the minimum value such
that $a^{\prime}_{p}\neq a^{\prime}_{1}b_{p}$. Clearly $p>1$. Applying (7) to
$j=p-1$ we see that

$\displaystyle
a^{\prime}_{p}\leq(\rho-2)a^{\prime}_{p-1}-2(a^{\prime}_{1}+\dots+a^{\prime}_{p-2})$
$\displaystyle=(\rho-2)a^{\prime}_{1}b_{p-1}-2(a^{\prime}_{1}b_{1}+\dots+a^{\prime}_{1}b_{p-2})$
$\displaystyle=a_{1}^{\prime}((\rho-2)b_{p-1}-2(b_{1}+\dots+b_{p-2}))=a^{\prime}_{1}b_{p}$

and thus $a^{\prime}_{p}<a^{\prime}_{1}b_{p}$.

Let $\beta={(a^{\prime}_{1}b_{p}-a^{\prime}_{p})}/{a^{\prime}_{1}}>0$. Now
consider the sequence $a^{\prime\prime}_{j}$ where
$a^{\prime\prime}_{j}=a^{\prime}_{j}$ for $j<p$ and
$a^{\prime\prime}_{j}=a^{\prime}_{j}+\beta a^{\prime}_{j-p+1}$ for $j\geq p$.
Then $a^{\prime\prime}_{p}=a^{\prime}_{1}b_{p}=a^{\prime\prime}_{1}b_{p}$.
Clearly, this new sequence satisfies (7) for every $j<p$. Furthermore, we have

$\displaystyle a^{\prime\prime}_{p+j}$ $\displaystyle=a^{\prime}_{p+j}+\beta
a^{\prime}_{j+1}$
$\displaystyle\leq(\rho-2)a^{\prime}_{p+j-1}-2\left(a^{\prime}_{1}+\dots+a^{\prime}_{p+j-2}\right)+\beta(\rho-2)a^{\prime}_{j}-2\beta\left(a^{\prime}_{1}+\dots+a^{\prime}_{j-1}\right)$
$\displaystyle=(\rho-2)a^{\prime\prime}_{p+j-1}-2\left(a^{\prime\prime}_{1}+\dots+a^{\prime\prime}_{p+j-2}\right)$

for every $j\geq 0$. Hence, the whole sequence satisfies (7). We also have
$a^{\prime\prime}_{s}\geq
a^{\prime}_{s}>a^{\prime}_{1}b_{s}=a^{\prime\prime}_{1}b_{s}$. This
contradicts the fact that $a_{j}^{\prime}$ was such a sequence which coincided
with $a_{1}^{\prime}b_{j}$ on the longest initial subsequence. ∎

## Acknowledgments

This project began as part of the problem session of the “Extremal Graph
Theory and Ramsey Theory” focus week of the “Rio Workshop on Extremal and
Structural Combinatorics” held at IMPA, Rio de Janeiro, Brazil in January
2018. We thank the organisers of the workshop and IMPA for the stimulating
working environment.

We also thank the referees for their careful reading of the paper and their
helpful suggestions.

## References

  * [1] J. R. Burke and W. A. Webb, _Asymptotic behavior of linear recurrences_ , Fibonacci Quarterly 19 (1981), no. 4, 318–321.
  * [2] L. DeBiasio and P. McKenney, _Density of monochromatic infinite subgraphs_ , Combinatorica (2019). https://doi.org/10.1007/s00493-018-3724-2.
  * [3] P. Erdős and F. Galvin, _Monochromatic infinite paths_ , Discrete Mathematics 113 (1993), no. 1, 59–70.
  * [4] L. Gerencsér and A. Gyárfás, _On Ramsey-type problems_ , Ann. Sci. Budapest. Eötvös Sect. Math 10 (1967), 167–170.
  * [5] P. Haxell, _Partitioning complete bipartite graphs by monochromatic cycles_ , Journal of Combinatorial Theory, Series B 69 (1997), no. 2, 210–218.
  * [6] J. Komlós and M. Simonovits, _Szemerédi’s Regularity Lemma and its applications in graph theory_ , Combinatorics, Paul Erdős is Eighty (D. Miklós, V. T. Sós, and T. Szőnyi, eds.), vol. 2, Bolyai Society Mathematical Studies, 1996, pp. 295–352.
  * [7] D. Kühn and D. Osthus, _Embedding large subgraphs into dense graphs_ , Surveys in Combinatorics (2009), 137–168.
  * [8] A. Lo, N. Sanhueza-Matamala, and G. Wang, _Density of monochromatic infinite paths_ , Electronic Journal of Combinatorics 25 (2018), no. 4, P4.29.
  * [9] R. Rado, _Monochromatic paths in graphs_ , Ann. Discrete Math 3 (1978), 191–194.
  * [10] E. Szemerédi, _Regular partitions of graphs_ , Colloq. Internat. CNRS 260 (1976), 399–401.

[jc] Jan Corsten
London School of Economics, Department of Mathematics, London WC2A 2AE.
jcorstenlseacuk [ld] Louis DeBiasio
Miami University, Department of Mathematics, Oxford, OH, 45056, United States.
debiasldmiamiohedu [al] Ander Lamaison
Institut für Mathematik, Freie Universität Berlin and Berlin Mathematical
School, Berlin, Germany.
lamaisonzedatfu-berlinde [rl] Richard Lang
University of Waterloo, Combinatorics & Optimization, Waterloo, ON, N2L 3G1,
Canada.
r7languwaterloocl


Further author information: E-mail<EMAIL_ADDRESS>
# Astrometric and Wavelength Calibration of the NIRSpec Instrument during
Commissioning using a model-based approach

Nora Lützgendorf  European Space Agency, c/o STScI, 3700 San Martin Drive,
Baltimore, MD 21218, USA  Giovanna Giardino  ATG Europe for the European Space
Agency, Noordwijk, The Netherlands  Catarina Alves de Oliveira  European Space
Agency, ESAC, Madrid, Spain  Peter Zeidler  AURA for the European Space
Agency, STScI, Baltimore, USA  Pierre Ferruit  European Space Agency, ESAC,
Madrid, Spain  Peter Jakobsen  Cosmic Dawn Center, Niels Bohr Institute,
University of Copenhagen, Denmark  Nimisha Kumari  AURA for the European Space
Agency, STScI, Baltimore, USA  Timothy Rawle  European Space Agency, c/o
STScI, 3700 San Martin Drive, Baltimore, MD 21218, USA  Stephan M. Birkmann
European Space Agency, c/o STScI, 3700 San Martin Drive, Baltimore, MD 21218,
USA  Torsten Böker  European Space Agency, c/o STScI, 3700 San Martin Drive,
Baltimore, MD 21218, USA  Charles Proffitt  Space Telescope Science Institute,
Baltimore, USA  Marco Sirianni  European Space Agency, c/o STScI, 3700 San
Martin Drive, Baltimore, MD 21218, USA  Maurice Te Plate  European Space
Agency, c/o STScI, 3700 San Martin Drive, Baltimore, MD 21218, USA  Sangmo
Tony Sohn  Space Telescope Science Institute, Baltimore, USA

###### Abstract

The NIRSpec instrument for the James Webb Space Telescope (JWST) is a highly
versatile near-infrared spectrograph that can be operated in various observing
modes, slit apertures, and spectral resolutions. Obtaining dedicated
calibration data for all possible combinations of aperture and disperser is an
intractable task. We have therefore developed a procedure to derive a highly
realistic model of the instrument’s optical geometry across the entire field
of view, using calibration data acquired through only a subset of NIRSpec
apertures, which nevertheless allows the light paths within the spectrograph
to be accurately computed for all apertures and all observing modes. This
parametric instrument model thus provides the basis for the extraction of
wavelength-calibrated spectra from any NIRSpec exposure, regardless of
observing mode or aperture used. Optimizing the NIRSpec instrument model and
deriving its final wavelength and astrometric calibration was one of the most
crucial elements of the NIRSpec commissioning phase. Here, we describe the
process of re-fitting the NIRSpec instrument model with in-orbit commissioning
data, and present its final performance in terms of wavelength accuracy and
astrometric calibration.

###### keywords:

James Webb Space Telescope; JWST; Near-Infrared Spectrograph; NIRSpec;
Commissioning; Wavelength Calibration, Astrometric Calibration

##  1 INTRODUCTION

The Near Infrared Spectrograph (NIRSpec) onboard the James Webb Space
Telescope (JWST) has four main scientific observing modes: Fixed Slits (FS),
Multi-object spectroscopy (MOS), Integral Field Unit (IFU) mode and Bright
Object Time Series (BOTS). Operating in the near infrared in the wavelength
range of $0.6-5.3\,{\mu{\rm m}}$, and using a collection of gratings and a
prism that allow to take spectra in low (R=100), medium (R=1000) and high
(R=2700) resolution, NIRSpec is designed to take up to 200 spectra at once,
for example to study high-redshift galaxies and the early universe. A detailed
description of the NIRSpec design, observing modes, and scientific use cases
can be found in [1, 2, 3, 4].

Because of its complexity especially in the MOS mode (which has $\sim$ 250000
individual shutters), calibrating the wavelength and astrometric solutions
using a static method for each individual shutter and disperser is impossible.
In addition, the grating wheel assembly (GWA), which is the center piece of
the internal light path, has limited angular positioning repeatability. This
means that whenever the GWA returns to the same grating, it does so with a
slightly different position, causing the spectra on the detector to shift by
small amounts, both in the dispersion and cross-dispersion direction.

Therefore, we have developed a procedure that uses calibration data acquired
for a limited subset of the NIRSpec apertures to derive a highly realistic
model of the instrument’s optical geometry. The NIRSpec instrument model
consists of a collection of coordinate transforms between the various optical
planes illustrated in Fig. 1 (OTE, FORE, COL, CAM, IFU-FORE, IFU-POST - see
Fig. 2 for acronyms), each represented by a paraxial transformation (rotation,
magnification and offset) and a 5th-degree 2-D polynomial representing the
local distortions. The model also relies on a set of geometrical parameters
that capture the physical properties of key optical elements (MSA, IFU slicer,
GWA and FPA), for example the locations of the individual quadrants in the
micro shutter assembly (MSA) plane, the precise orientation of the dispersers
in the GWA, or the location and orientation of the detectors in the FPA.

---
Figure 1: Schematic overview of the NIRSpec instrument model. The purpose of
the model is to describe the light path through the instrument from sky to the
detector and vice versa. It is composed of coordinate transforms and
geometrical parameters and splits into three main parts: The spectrograph
model describing the path between the MSA and the detector, the grating wheel
sensor calibration and the astrometric calibration.

The model is split up into three parts that require independent calibration,
but build on each other. The first is the spectrograph or internal model. It
describes the light path from the MSA plane to the detector and back. It can
be fit for all dispersers by using the internal calibration lamps, and thus
does not require on-sky data. The procedure of fitting this part of the model
is described in section 3. The second part of the model is the grating wheel
sensor calibration described in [5] and summarized in section 4. The remaining
FORE optical transforms are fit in the astrometric calibration step by
registering the positions of stars on the detector with an astrometric
catalogue as described in 5. Note that the OTE transform as shown in Fig. 1 is
fixed to a pre-launch model, as it is not possible to fit this transform
individually in flight. Figure 2 lists all of the free parameters of the
model, color coded by its three components. In total, the NIRSpec instrument
model consists of $>900$ free parameters.

---
Figure 2: Overview of all model parameters that are fit in commissioning. The
different parts of the model are highlighted in the corresponding colors as in
figure 1. The total number of parameters fit in commissioning is $>$ 900.

##  2 DATA

The final version of the instrument model was fit using in-flight
commissioning data obtained as part of the 6-month long NIRSpec commissioning
campaign between December 25, 2021 and July 15, 2022 (see [6] for a detailed
description). In addition, data taken during various ground campaigns as well
as simulations were used to obtain absolute wavelength calibration of the
internal lamps, and to develop procedures to prepare for commissioning. In the
next sections, those campaigns and data are briefly summarized.

###  2.1 Instrument-level test campaigns

The first two instrument test campaigns took place at Industrieanlagen-
Betriebsgesellschaft mbH (IABG) facilities in Ottobrunn, Germany, in 2011 and
2013. The instrument was enclosed in a vacuum chamber cooled by gaseous
Helium, and illuminated by external calibration light sources that used a
cryo-mechanism to switch between flat-field illumination and a grid of
pinholes. Using this set-up, an Argon lamp spectrum was used to perform the
first spectral calibration of the instrument, and to assign absolute
wavelengths to the internal calibration lamps (see [7] for more details).
Furthermore, the pinhole mask was placed at the OTEIP plane of the instrument
and used to derive a first calibration of the NIRSpec FORE optical transforms
(astrometric calibration). Analysis of the data showed that the measurements
were consistent with the as-designed optical transforms that were therefore
kept as the baseline FORE optical transforms.

###  2.2 Higher-level test campaigns

After the delivery to NASA in 2013, NIRSpec was installed on the Integrated
Science Instrument Module (ISIM), together with the other JWST science
instruments. The fully assembled ISIM underwent two cryogenic test campaigns
in 2014 (CV2) and 2015 (CV3) at the Goddard Space Flight Center (GSFC).
Between CV2 and CV3, the instrument needed to be refurbished by replacing the
MSA and FPA subsystems with new parts. This made the CV3 test campaign a
crucial step in the calibration of NIRSpec, since for the first time, it was
in its final flight configuration. Therefore, the spectrograph model needed to
be completely redone.

The final cryogenic test campaign was done after ISIM was integrated with the
Optical Telescope Element (OTE), which together form the Optical Telescope
Element and Integrated Science Module (OTIS). In 2017, OTIS was shipped to
Johnson Space Center (JSC) and underwent extended cryogenic testing over the
course of three months. For the NIRSpec instrument model, a subset of data was
taken to apply a reduced model fit, mostly monitoring smaller differences in
the geometric parameters (such as shifts in the MSA quadrants). This was a
good test to see how the model changed after NIRSpec underwent environmental
testing (vibe and acoustic).

###  2.3 Simulations

In addition to data taken by cryogenic test campaigns, we also produced a set
of simulations using the instrument performance simulator (IPS, see [8, 9]])
for NIRSpec which was developed by the Centre de Recherche Astrophysique de
Lyon (CRAL) and delivered to ESA. This was particularly important for data
that we could not reproduce with ground testing campaigns such as the
astrometric calibration on sky. As the simulator uses the instrument model to
generate the exposures, those could not be used to obtain a preliminary model
fit for the FORE optics, but they were used to develop the routines necessary
to perform the fit once on-sky data became available.

###  2.4 Commissioning Data

The final dataset used to perform the model fit was taken during the NIRSpec
commissioning campaign. All exposures were processed with the NIRSpec
Commissioning Team ramps-to-slopes pipeline that applies the following
corrections: bias subtraction, reference pixel subtraction, linearity
correction, dark subtraction and finally count-rate estimation, including jump
detection and cosmic-ray rejection [10].

The data set needed to update the spectrograph part of the model was taken in
Commissioning Activity Request (CAR) NIRSpec-041 (Instrument Model Update,
Proposal ID 1132). This CAR used internal lamp exposures in imaging, MOS, FS
and IFS modes. For imaging, the MSA was configured to a (3x3) checkerboard and
a customized pattern with crosses, used for a first manual adjustment without
the full fit. In order to determine the location of spectra through individual
shutters (a.k.a. ‘traces’), a combination of four different slitlet
configurations for each grating/lamp combination was used, in order to cover
the detector area as evenly as possible. This data set also included IFU
exposures and their dedicated ‘leakage’ exposures, i.e. exposures with the IFU
closed which only contain traces from failed open shutters (which can then be
subtracted). Each combination of grating and MSA configuration was observed
with the LINE, FLAT, and REF lamps at the same GWA position (i.e. without any
intermittent GWA movement). Before changing to the next grating, the GWA was
‘spun around’ once, and a REF lamp exposure was taken at each position. These
extra observations were used for the grating wheel sensor calibration (see [5]
for a full list of data).

The exposures used for the remaining FORE portion of the model (a.k.a.
astrometric calibration) were taken in CAR NIRSpec-019 (Astrometric
Calibration, PID 1120). They consist of undispersed images of the JWST
astrometric reference field (located in the Large Magellanic Cloud [11, 12]
through all seven NIRSpec filters, acquired with the GWA in the MIRROR
position, the MSA configured to ALLOPEN, and the IFU aperture unblocked. For
each filter, two images were obtained, separated by a half-shutter small angle
maneuver (SAM) in order to be able to correct for obscuration by the MSA bars
that separate the individual shutters.

Lastly, internal lamp exposures using the TEST lamp, the GWA in MIRROR, and
four MSA configurations with customized test patterns (CROSS5-C, (1x1) and
(3x3) checkerboards) were also taken as part of PID 1120. The purpose of these
was to acquire internal exposures at the exact same grating wheel positions as
the on-sky exposures, to provide the most accurate means to derive the
transformation between the sky and the MSA plane. This approach was mostly a
safeguard against the possibility that the existing sensor calibration derived
from the PID 1141 data was not yet accurate enough.

##  3 SPECTROGRAPH MODEL

The spectrograph (or internal) portion of the NIRSpec instrument model
describes the light-path from the MSA plane to the detector and back. It can
be calibrated on the ground and in space by using the NIRSpec internal
calibration lamps. A full description of the fitting process and the first
results obtained during the IABG tests can be found in [7].

The full fit procedure of the spectroscopic model is outlined in figure 3. The
red and blue boxes (manual adjustments and extraction of reference points) are
described in sections 3.1 and 3.2, respectively. Green boxes represent the
different steps when fitting to the extracted reference data, and the yellow
box denotes the final verification step (both discussed in section 3.4).

---
Figure 3: Schematic workflow of the spectrograph model fit. Red boxes
represent manual adjustments, blue boxes reference point creation and
extractions, green boxes fits and the yellow box verification.

###  3.1 Manual adjustments

The process of creating reference points in order to fit the model partially
relies on the extraction of traces and spectra using the model itself. It is
therefore important that the initial model we start with is already relatively
close to the final model, in order to avoid mis-identification of shutters or
lines if the offset is too large. Therefore, we have developed routines in the
form of Python GUIs that allow a rough adjustment of the model parameters in a
manual procedure, without having to extract every source and perform the
(time-consuming) full fit.

Manual adjustments of the model are done for imaging mode by adjusting the
mirror angles dependent on the positions of the slit images on the detector,
and for the spectroscopic mode in dispersion and cross-dispersion direction by
manually moving extraction windows on-top of traces and line positions in
spectra.

###  3.2 Extraction of the reference points

The next step in the fit of the spectrograph model is the extraction of the
reference points (i.e. the measured points on the detector). We have developed
and optimized methods to obtain highly accurate centroid positions on the
detector, which are different for imaging or spectroscopic mode data.

####  3.2.1 Imaging reference points

For the imaging reference points, we use a 3x3 checkerboard MSA configuration.
This provides a good compromise between having as many points as possible with
the best spatial coverage, and avoiding crowding of the shutters that would
complicate the centroid measurements. We use Source Extractor [13] to find and
extract the centroids of the shutter images on the detector. The extraction
parameters were optimized for the microshutters’ shape and contrast. We then
cross-reference the shutter centroids with a shutter operability file to avoid
having contaminated shutters and mis-identifications in the list. This results
in a cleaner cut of the extracted shutter positions.

####  3.2.2 Spectral reference points

For the spectral reference points, two steps are needed: 1) tracing the
spectra on the detector, and 2) measuring the center of emission lines in the
spectral direction. To trace the spectra on the detector, we use exposures
taken with the FLAT calibration lamps. Those calibration lamps include five
continuum sources intended for spectral flat-fielding that employ filters
matching the five long-pass order-separation filters in the FWA (see [1]). The
spectra on the detector are captured within a so-called ‘extraction window’,
and the flux-weighted centroid of light is calculated along each detector
column (the y-direction), thus defining the ‘trace’ as a function of column
number (the x-direction). A 4th-degree polynomial (3rd-degree for the prism
due to its shorter traces) is fit to the trace for each aperture and exposure
(see figure 4). These polynomials are later used to obtain the exact (x,y)
position of a given reference point on the detector.

---
Figure 4: Example for a polynomial fit to a spectral trace on the detector, in
this case for shutter (349,135) in MSA quadrant 4. The y-values were derived
by computing the weighted mean for each pixel column on the detector. The
polynomial fit to the data (orange line) is compared to the trace position
predicted by the current model (green line).

For the spectral reference points, we use the LINE calibration lamps, most of
which are Fabry-Perot type interference filters that produce 5 to 6
Lorentzian-profiled wavelength calibration lines in each of NIRSpec bands,
thus covering the full $0.6-5.3\mu$m spectral range. A separate calibration
lamp (REF) uses an Erbium-doped filter that provides an absolute wavelength
reference near $1.4\mu m$ with sharp absorption features. The spectra are
extracted for all modes and apertures and flat-fielded using the before-
mentioned FLAT lamp exposures. Afterwards, they are rectified and extracted to
a 1D spectrum using the NIRSpec Instrument Pipeline Software (NIPS [14]). For
each spectrum, the centroid positions of the emission and absorption lines are
extracted using the center of gravity approach [15] with a peak fraction of
ft=0.6 and customized extraction windows for each line, based on previous
measurements and knowledge of the line positions (see Fig. 5).

---
Figure 5: LINE and REF lamp spectra used for the extraction of reference
points in the model fit. The derived centers of gravity are depicted by red
dashed lines while the predicted line positions are shown with the yellow
dotted lines.

The final set of spectral reference points is computed by determining the
position of all spectral line on the detector, using the measured wavelengths
and the polynomials derived from the traces. Note that this approach uses the
model under the assumption that the spatial variations of the distortions are
small and smooth. The process is repeated after the first model fit, to allow
for an iterative approach of the reference point creation.

###  3.3 The imaging model

For very early commissioning activities such as creation of the MSA
operability files (see [16]), a model for the imaging mode was needed in order
to be able to identify individual shutters. This could be achieved using TEST
lamp exposures through a (3x3) checkerboard configuration of the MSA.

In this procedure, only the two mirror angles in the x and y directions (which
in the full model fit are set to zero) are fit, in order to obtain the best
match (least squares solution) between the positions measured on the detector
and those predicted by the model. Since the final residuals were still too
large, and a clear structure was being detected, we also fit the geometrical
parameters of the MSA (i.e. the position and rotation of each quadrant) since
they could have moved during launch. After computing the grating wheel sensor
calibration for the mirror (see Section 4 and [5]), the imaging model was
complete.

###  3.4 The full spectrograph model fit

The first fit, that also contains the largest number of parameters fit at
once, is performed on all the data (MOS, FS) except the dispersers G140H,
G235H, and PRISM because of their rather uneven distribution of reference
points on the detector. For the remaining dispersers, the grating angles
$\theta_{x},\theta_{y}$ and $\theta_{z}$ are fit with a few exceptions listed
below. Furthermore, the MSA geometrical parameters, the FPA geometrical
parameters, as well as the camera (CAM) and collimator (COL) forward
transforms are fit. In total, this amounts to 118 free parameters that were
fit to approximately 27600 reference points. In order to not bias the fit
towards imaging data, only 1500 randomly selected microshutters per quadrant
are used during the fit. For fitting, we use a Trust Region Reflective
algorithm (trf) as provided in the `scipy` routine `least_squares`. As
described in [7], not all parameters of the model are fit freely. There are
some assumptions on symmetry and conventions that are applied and listed
below:

  * •

The GWA MIRROR has all alignment tilt angles at 0, and defines the GWA
reference plane. All other dispersers have alignment tilt angles relative to
this surface.

  * •

The MSA quadrants are rectangular and regular in size, i.e. in an individual
quadrant the shutter pitch is uniform, and the shutter axes are perpendicular.

  * •

The physical gap between NIRSpec’s two Sensor Chip Assemblies (SCAs) is forced
to be centered on the y-axis. SCA 491 has no rotation and is symmetrical to
the x-axis. SCA 492 is free to move and rotate within the first condition that
couples the positions of 491 and 492. This does not restrict the modeling of
the instrument, as the movements can be compensated by the distortion
polynomials of the CAM. It does, however, produce a geometrically simple FPA
description without excessive tilts and offsets.

  * •

The COL, CAM and FORE transforms are assumed to be achromatic (all-reflective
optical parts) with no wavelength dependence of the distortion coefficients.

  * •

The alignment tilt angle in z direction for the grating G395H ($\theta_{z}$)
is fixed to +30 degrees (factory setting).

The last point was an improvement to the process introduced in commissioning
in order to avoid unphysical values of the grating wheel rotation angles
introduced during the fit, which were then compensated by rotations in the COL
and CAM transforms. By fixing the $\theta_{z}$ angle for one of the gratings,
we allow for variations in the tilt angles of the remaining gratings relative
to each other, while keeping them in a realistic range. Otherwise, the fit
tends to converge on nonphysical values, due to the degeneracy with the
rotations in the coordinate transforms.

---
Figure 6: Concept of fitting the spectrograph model that also applied to other
parts of the model fit. Reference points are extracted and compared with the
predicted positions on the detector by the current model. A least square fit
is applied to derive the optimal model parameters.

In a second step, the positions of the fixed slits were optimized
individually, because their initial positions may not be optimal in
combination with the new collimator distortion, which was dominated by the MOS
data in the previous optimization ($\sim 20\times$ more shutter references
than for fixed slits). Therefore, another fitting run was done, only changing
the SLIT positions in the MSA, using the reference points of the fixed slits
only. The third step to complete the forward model fit, was to fit the angles
of the remaining dispersers (G140H, G235H, and PRISM) individually using the
newly derived distortions and slit positions from the previous fit.

After completing the forward fit for the spectrograph model, we have now a
good description of the light passing from the MSA to the detector for each
mode. However, the backwards transform (going from detector to the MSA plane)
cannot be analytically derived from the 5th degree polynomial transform.
Therefore, a numerical approach is used to compute the backwards transforms.
Here, only the collimator and camera coordinate transforms need to be derived,
since all geometrical parameters remain the same in both directions. The fit
does not require any exposure data, it merely uses the forward transforms for
a regular grid of points. The concept is the same for either transform: for
the collimator transform, a regular grid is created in the MSA plane, and the
forward transform of the model is used to translate this grid to the GWA-in
plane. Similarly, the camera transform is derived from a regular grid of
points in the GWA-out plane, and the forward transform of the model is again
used to translate this grid to the FPA plane. In either case, a least square
fit is applied to the equation $X_{out}=AX_{in}$ to obtain the polynomial
coefficients of matrix $A$.

Now that the forward and backward transforms for MOS and FS mode are in hand,
the final step is to fit the positions of the virtual IFU slits on the
detector. This is done by using a REF lamp exposure of the G395H grating (due
to it’s even distribution of the absorption lines on the detector) in
combination with an IFU mirror exposure and fitting the $x_{out},y_{out}$
positions from the IFU-POST paraxial transform for each slice.

In the final verification step, all reference points are re-generated (re-
extracted) using the new model and the residuals (difference between measured
and predicted points on the detector) are computed.

Figure 7 and Table 1 show the results for the spectrograph model fit. All
residuals remain within 0.1 pixel RMS, which should be compared to the maximum
acceptable standard deviation (derived from the NIRSpec calibration error
budget) of 1/10 of a resolution element or 0.2 pixels. The residuals for all
modes meet this requirement with substantial margin (a factor of two). They
are also very similar to the residuals derived from ground campaign data,
which implies that no major components of the NIRSpec optical train have moved
noticeably from their pre-launch positions.111In fact, the residuals for the
prism improved by a factor of two, due to the use of a more accurate
prescription for the index of refraction of $\rm CaF_{2}$ as a function of
wavelength, compared to what was used for pre-launch model fits.

---
Figure 7: Residuals of forward coordinate transforms from MSA to FPA, for all gratings. The vectors indicate amplitude and direction of the difference between measured and model-computed location of the data points. Table 1: Residuals of the optimized model forward projection from MSA to FPA per grating, for MOS and FS mode. Here, $i$ is the coordinate in dispersion direction, and $j$ in spatial direction. Grating | i mean + RMS | j mean + RMS | median absolute
---|---|---|---
G140H | $0.011\pm 0.063$ | $0.000\pm 0.022$ | $0.054\pm 0.041$
G140M | $0.001\pm 0.096$ | $0.003\pm 0.033$ | $0.066\pm 0.077$
G235H | $0.002\pm 0.102$ | $0.011\pm 0.054$ | $0.096\pm 0.066$
G235M | $0.000\pm 0.062$ | $0.003\pm 0.021$ | $0.054\pm 0.036$
G395H | $0.001\pm 0.089$ | $0.003\pm 0.022$ | $0.071\pm 0.057$
G395M | $-0.001\pm 0.072$ | $0.003\pm 0.018$ | $0.061\pm 0.042$
PRISM | $-0.004\pm 0.087$ | $0.000\pm 0.022$ | $0.076\pm 0.048$
MIRROR | $0.001\pm 0.012$ | $0.003\pm 0.015$ | $0.017\pm 0.009$

##  4 THE GRATING WHEEL SENSOR CALIBRATION

A detailed description of the grating wheel sensor calibration is provided in
[5]. Here, we only provide a short summary.

The finite angular positioning repeatability of the grating wheel causes small
but measurable displacements of the light beam in the focal plane, thus ruling
out a static solution to predict the light-path. To address that, the GWA
includes two magneto-resistive position sensors that are read after every
wheel move, in order to measure the precise ‘tip and tilt’ orientation of each
GWA element.

However, the precise relation between the measured sensor voltage and actual
wheel position must be carefully calibrated after every cryo-cycle of NIRSpec.
In practice, this is done by fitting the relationship between the sensor
voltages and the observed angular displacement of the wheel, measured relative
to the selected reference point of the spectrograph instrument model. For the
dispersers, a number of internal lamp exposures with intermediate movements of
the grating wheel are taken. Absorption lines in the spectra, as well as
shutter centroids in an image of the (3x3) checkerboard MSA configuration are
used to measure the absolute positions, and to derive the actual grating and
mirror angles as described in sections 3.2 and 3.4. The calibration relations
between the sensor voltage reading and the measured angular displacement have
been shown to be linear, both for the MIRROR and all dispersers. For every
NIRSpec exposure, they are then applied to complete the geometrical
description of the state of the instrument.

##  5 ASTROMETRIC CALIBRATION

The final step to complete the full NIRSpec instrument model is the
astrometric calibration or FORE optics fit. The FORE transform can be measured
from images of the sky, but it should be kept in mind that the optical path
from the sky to the MSA plane includes the OTE optics (see Fig, 1, and
discussion below). Because the refractive properties of the various filters in
the FWA are different, the transform needs to be fit separately for each
filter. In order to obtain these fits, two imaging mode exposures of the JWST
astrometric reference field in the Large Magellanic Cloud (LMC) through the
ALLOPEN shutter configuration were taken for each filter.

---
Figure 8: Color image of the LMC astrometric field viewed through the open
shutters on the NIRSpec detector.

Figure 8 shows an example exposure of the astrometric field viewed through the
open shutters. It is obviously a very crowded field which makes identification
of individual stars challenging. The problem is made worse by the fact that
the grid of shutter bars and the various failed-closed shutters affect the
shape of the point spread function (PSF) of individual stars. In order to
mitigate these effects, the two exposures per filter were ‘dithered’, i.e.
offset by half the shutter pitch in both x- and y-direction.

We used a python implementation of `DAOFIND` [17] with parameters optimized to
the NIRSpec data, to detect stars and record their positions. A subset of
those stars meet certain isolation and roundness criteria, and are used to
obtain a model PSF. This is done in an iterative algorithm as provided in the
`photutils` python package. An example of a final model PSF is shown in figure
9. Using the PSF model, the centroids of all stars are extracted over the full
field of view, for each filter and for both dither positions.

---
Figure 9: Schematic outline of the astrometric calibration. In short:
positions of stars are measured on the detector and matched with the
astrometric catalogue. The instrument model is used to predict the star
positions on the detector from their sky coordinates in the stellar catalogue.
A least-squares fit of the predictions to the measurements is then applied to
obtain the optimal model parameters.

The fit of the FORE transform for each filter is, in essence, a fit of the
combined (OTE + FORE) transform, but since the OTE transform is fixed, only
the FORE parameters are fit. This was done as follows: first, the paraxial
parameters of the transform (the reference points in the input and output
plane, the magnification factors and the rotation) are set to unity and only
the transforms are fit. The new paraxial parameters are extracted using the
transform itself and its derivatives. The distortions are then fit again while
fixing the new paraxial parameters. In this way, we ensure that only
meaningful paraxial parameters are used, and only the effects of distortion
are captured in the transforms. On average, each filter had about 5000 stars
used for the fit. The JWST Telescope’s team used observations from FGS1 and
FGS2 obtained in parallel mode, to determine the most accurate pointing and
roll angle information for each of the NIRSpec calibration exposures. This was
important, as the uncertainty in pointing and roll would have been absorbed in
our model fit, thus resulting in an incorrect model for any other pointing on
the sky.

Note that we perform the fit of the FORE transforms using coordinates measured
on the detector, even though the output plane of the FORE transform is the
MSA. This requires fixing all the other transforms (OTE, COL and CAM) by using
the newly fit internal model from section 3. We do not use the grating wheel
calibration in this fit, but rather take advantage of the extra internal
exposures that were taken during the astrometric calibration (see section 2.4)
to derive the exact grating wheel angle for the sky exposures. This removes
any uncertainties in the sensor wheel calibration. The backwards fit was
performed in the same method as described for the collimator and camera
transforms in Section 3.

Figure 10 shows the residuals for one filter (F110W). Table 2 shows the
results for all filters. Residuals for all filters are range between 0.1-0.25
pixel RMS. This is slightly larger than what we expected from using
simulations ($<0.1$). As mentioned before, the bars of the shutters and the
crowding in the field make the centroiding process challenging. We therefore
assume that the larger uncertainties mainly originate from the uncertainty in
the centroiding, rather than from the accuracy of the model, and performed
several tests to confirm this, described in the following section.

---
Figure 10: Residuals of the FORE forward coordinate transforms from sky to MSA, for the F110W filter on the detector. The vectors give amplitude and direction of the difference between measured and model-computed location of the data points. Table 2: Residuals on the detectors of the optimized model forward projection for the FORE transform per filter. Here i is for dispersion direction and j for spatial direction. Filter | i mean + RMS | j mean + RMS | median absolute
---|---|---|---
CLEAR | $0.002\pm 0.142$ | $0.000\pm 0.206$ | $0.156\pm 0.084$
F070LP | $0.002\pm 0.145$ | $0.000\pm 0.115$ | $0.163\pm 0.087$
F100LP | $0.003\pm 0.155$ | $0.000\pm 0.119$ | $0.174\pm 0.090$
F110W | $0.002\pm 0.095$ | $0.000\pm 0.072$ | $0.106\pm 0.054$
F140X | $0.002\pm 0.116$ | $0.000\pm 0.086$ | $0.129\pm 0.066$
F170LP | $0.003\pm 0.161$ | $0.000\pm 0.122$ | $0.179\pm 0.095$
F290LP | $0.000\pm 0.236$ | $-0.001\pm 0.160$ | $0.250\pm 0.136$

###  5.1 Tests on centroiding accuracy

In order to test the accuracy of our centroiding algorithm and the smoothness
of the residuals we performed two tests. The first one was to divide the
residuals into different sections on the detector, and to measure their mean
and RMS within each section. This allows us to verify that there are no strong
spatial variations in the residuals, which would hint towards residual
distortions in the model. Figure 11 shows one of those tests: the distribution
appears to be symmetric around zero, smooth over the field of view and without
any spatially organised structure present.

---
Figure 11: Binning the spatial residuals of the F110W filter over the field of
view in order to test for gradients or spatial dependencies. The distributions
of the individual bins is symmetric around zero

The second test made use of the fact that we have two dither positions for
each filter. By comparing the measured shift for a given star with the one
predicted by the model, and analyzing the distribution for all stars, we can
estimate the average spread in the centroiding distribution. Figure 12 shows
the results of this test. It is clear that the spread in positions is of the
order of 0.15 pixel in either direction, which would explain the higher spread
in the residuals compared to the simulations.

---
Figure 12: Test of centroiding accuracy, performed by locating the same stars
in two dithered images. The upper panels show the distribution of shifts as
calculated by the model. The width and shape of the distribution is due to the
distortions in the instrument and the spatial distribution of the four
quadrants. The lower panels show the measured shifts on the detector. It is
clear that the wider shape of those distributions compared to the modelled
ones is caused by the limited centroiding accuracy.

Given the results from these tests, we are confident that the larger residuals
in the FORE model fit are due to the limited accuracy of our centroiding
algorithm, and not due to the performance of the model. In the future, it
might be worth exploring more advanced centroiding algorithms to mitigate this
source of uncertainty.

##  6 SUMMARY/CONCLUSIONS

The NIRSpec instrument model describes the light path through the instrument
from sky to the detector and back. It consists of nearly 1000 free parameters
and is divided into three main parts: the spectrograph/internal model, the
grating wheel sensor calibration, and the astrometric or FORE calibration.

During commissioning campaign between December 25, 2021 and July 15, 2022, we
took various data sets to obtain a final fit of the instrument model, and to
provide accurate wavelength and astrometric calibration of the instrument. The
data contains a large set of internal calibration lamps for each mode and
grating/filter combination, as well as external imaging mode sky observations
of an astrometric reference field.

The residuals for the internal model and the grating wheel sensor calibration
were as expected and similar to the ones obtained during ground campaigns.
They were below the requirements of 1/10 of a resolution element (1/20 of a
pixel) for all modes and gratings. For the astrometric calibration, we
obtained higher residuals than expected, but concluded after performing
multiple tests that they stem from the systematic uncertainty of the
centroiding rather than the quality of the model fit.

External tests on the wavelength calibration and successful target acquisition
using the MSA have shown that the new model derived during commissioning is in
excellent shape and within all requirements.

###  6.1 Maintenance and future work

In a stable orbit and without further vibrations and temperature changes, the
model should remain stable over time. However, this has never been tested and
the grating wheel sensor showed a strong dependence on temperature during
ground campaigns and cool-down phase. Therefore we have planned monitoring
programs in the cycle-1 calibration campaign of JWST. This program contains a
subset of the internal lamp exposures in order to validate the accuracy of the
model. If there is reason to assume a substantial change to the model,
contingency plans need to be explored and the model likely needs to be re-fit.

## References

  * [1] Jakobsen, P., Ferruit, P., Alves de Oliveira, C., et al., “The Near-Infrared Spectrograph (NIRSpec) on the James Webb Space Telescope. I. Overview of the instrument and its capabilities,” A&A 661, A80 (May 2022).
  * [2] Ferruit, P., Jakobsen, P., Giardino, G., et al., “The Near-Infrared Spectrograph (NIRSpec) on the James Webb Space Telescope. II. Multi-object spectroscopy (MOS),” A&A 661, A81 (May 2022).
  * [3] Böker, T., Arribas, S., Lützgendorf, N., et al., “The Near-Infrared Spectrograph (NIRSpec) on the James Webb Space Telescope. III. Integral-field spectroscopy,” A&A 661, A82 (May 2022).
  * [4] Birkmann, S. M., Ferruit, P., Giardino, G., et al., “The Near-Infrared Spectrograph (NIRSpec) on the James Webb Space Telescope. IV. Capabilities and predicted performance for exoplanet characterization,” A&A 661, A83 (May 2022).
  * [5] Alves de Oliveira, C., Lützgendorf, N., Zeidler, P., et al., “In-flight performance and calibration of the Grating Wheel Assembly sensors (NIRSpec/JWST),” 12180-185, International Society for Optics and Photonics, SPIE (2022).
  * [6] Böker, T., Abul-Huda, Y., Altenburg, M., and et al., “In-orbit Commissioning of the Near-Infrared Spectrograph on the James Webb Space Telescope,” 12180-30, International Society for Optics and Photonics, SPIE (2022).
  * [7] Dorner, B., Giardino, G., Ferruit, P., Alves de Oliveira, C., Birkmann, S. M., Böker, T., De Marchi, G., Gnata, X., Köhler, J., Sirianni, M., and Jakobsen, P., “A model-based approach to the spatial and spectral calibration of NIRSpec onboard JWST,” A&A 592, A113 (Aug. 2016).
  * [8] Piqueras, L., Legay, P. J., Legros, E., Ferruit, P., Pecontal, A., Gnata, X., and Mosner, P., “The JWST/NIRSpec instrument performance simulator,” in [Modeling, Systems Engineering, and Project Management for Astronomy III ], Angeli, G. Z. and Cullum, M. J., eds., Society of Photo-Optical Instrumentation Engineers (SPIE) Conference Series 7017, 70170Z (July 2008).
  * [9] Piquéras, L., Legros, E., Pons, A., Legay, P. J., Ferruit, P., Dorner, B., Pécontal, A., Gnata, X., and Mosner, P., “The JWST/NIRSpec instrument performance simulator software,” in [Modeling, Systems Engineering, and Project Management for Astronomy IV ], Angeli, G. Z. and Dierickx, P., eds., Society of Photo-Optical Instrumentation Engineers (SPIE) Conference Series 7738, 773812 (July 2010).
  * [10] Birkmann, S., Giardino, G., Sirianni, M., et al., “The In-Flight Noise Performance of the JWST/NIRSpec Detector System,” 12180-101, International Society for Optics and Photonics, SPIE (2022).
  * [11] Sahlmann, J., “Astrometric Accuracy of the JWST Calibration Field Catalog Examined with the First Gaia Data Release.” JWST STScI Technical Report, JWST-STScI-005492 (Jan. 2017).
  * [12] Anderson, J., Fall, M., and the Astrometry Working Group, “The JWST Calibration Field: Absolute Astrometry and Proper Motions with GAIA and a Second HST Epoch.” JWST STScI Technical Report, JWST-STScI-007716 (Mar. 2021).
  * [13] Bertin, E. and Arnouts, S., “SExtractor: Software for source extraction.,” Astronomy and Astrophysics Supplement 117, 393–404 (June 1996).
  * [14] Alves de Oliveira, C., Birkmann, S. M., Böker, T., Ferruit, P., Giardino, G., Lützgendorf, N., Puga, E., Rawle, T., Sirianni, M., and te Plate, M., “Preparing the NIRSpec/JWST science data calibration: from ground testing to sky,” in [Observatory Operations: Strategies, Processes, and Systems VII ], Society of Photo-Optical Instrumentation Engineers (SPIE) Conference Series 10704, 107040Q (July 2018).
  * [15] Cameron, D. G., Kauppinen, J. K., Moffatt, D. J., and Mantsch, H. H., “Precision in condensed phase vibrational spectroscopy,” Applied Spectroscopy 36(3), 245–250 (1982).
  * [16] Rawle, T., Giardino, G., Bechtold, K., et al., “In-flight performance of the NIRSpec Micro Shutter Array,” 12180-184, International Society for Optics and Photonics, SPIE (2022).
  * [17] Stetson, P. B., “DAOPHOT: A Computer Program for Crowded-Field Stellar Photometry,” Publications of the Astronomical Society of the Pacific 99, 191 (Mar. 1987).