11institutetext:  Research Institute for Mathematical Sciences, Kyoto
University, Kyoto, 606-8502, Japan
11email<EMAIL_ADDRESS>
# The Giry Monad is not Strong for the Canonical Symmetric Monoidal Closed
Structure on $\mathbf{Meas}$

Tetsuya Sato

###### Abstract

We show that the Giry monad is not strong with respect to the canonical
symmetric monoidal closed structure on the category $\mathbf{Meas}$ of all
measurable spaces and measurable functions.

##  1 Introduction

A motivation of this research is to give a denotational semantics of Higher-
order continuous probabilistic programming language. The denotational
semantics of discrete probabilistic programming language is categorified by
using the (sub-)distribution monad on the category $\mathbf{Set}$ of all sets
and functions. The categorified semantics supports the Higher-order functions
since the category $\mathbf{Set}$ is cartesian closed, and the
(sub-)distribution monad is commutative strong with respect to the cartesian
monoidal structure. On the other hand, denotational semantics of continuous
first-order probabilistic programming language is categorified by using the
(sub-probabilistic) _Giry monad_. The Giry monad is a monad on the category
$\mathbf{Meas}$ of measurable spaces and functions, which introduced by Giry
to give a categorical definition of continuous random processes such as
(Labelled) Markov processes in the paper [6]. The Giry monad is commutative
strong with respect to the cartesian monoidal structure of $\mathbf{Meas}$,
and hence it supports first-order semantics for continuous probabilistic
language. However, it does not support Higher-order functions because the
category $\mathbf{Meas}$ is not cartesian closed [2].

To give a categorical semantics of higher-order continuous probabilistic
programming language, we have to find a monoidal closed structure which
supports continuous probabilistic processes/calculations.

In fact, there is a canonical _symmetric monoidal closed structure_ on
$\mathbf{Meas}$ that is defined by the finest $\sigma$-algebra
$\Sigma_{X\otimes Y}$ over product sets $|X|\times|Y|$ that makes all constant
graph functions measurable (Section 2). If the Giry monad was strong with
respect to it then we obtained a categorical semantics of higher-order
continuous probabilistic programming language. However, unfortunately, the
Giry monad _is not strong_ with respect to the canonical symmetric monoidal
closed structure.

In this paper, we prove that Giry monad is not strong with respect to the
canonical symmetric monoidal closed structure as follows: We recall that a
strength of a monad with respect to a symmetric monoidal closed category
corresponds bijectively to a tensorial strength [11]. We show that a tensorial
strength for any monad on $\mathbf{Meas}$ with respect to the canonical
symmetric monoidal closed structure is uniquely determined if exists (Section
3). This implies that there is a unique candidate of the strength of Giry
monad with respect to the canonical symmetric monoidal closed structure. We
give a counterexample that the candidate associates a non-measurable function
to some pair of measurable spaces (Section 4).

###  1.1 Preliminaries

We refer the definitions of monads, monoidal categories, and monoidal functors
from [12], and refer the definition of strong monads on symmetric monoidal
closed categories from [10, 11]. The notion of tensorial strength can be
relaxed to a monad on a symmetric monoidal category. We often call monads
equipped with tensorial strengths strong monads (see [1, Definition 3.2] or
[7, Section 7.1]).

Throughout this paper, we use the category $\mathbf{Meas}$ of all measurable
spaces and measurable functions. The category $\mathbf{Meas}$ is complete and
cocomplete. Hence we enjoy the cartesian monoidal structure
$(\mathbf{Meas},\times,1)$. Moreover, it is a _topological category_ [4, 8].
We emphasise that the category $\mathbf{Meas}$ is _not cartesian closed_
because there is no $\sigma$-algebra over $\mathbf{Meas}([0,1],2)$ satisfying
the axioms of exponential object [2].

We also introduce the following notations on measure theory:

  * •

For each measurable spaces, we denote by $|X|$ and $\Sigma_{X}$ the underlying
set and $\sigma$-algebra of $X$ respectively.

  * •

The indicator function $\chi_{A}\colon X\to\mathbb{R}$ of a subset $A$ of $X$
is defined by $\chi_{A}(x)=1$ ($x\in A$) and $\chi_{A}(x)=0$ ($x\notin A$).
Note that $\chi_{A}$ is measurable if and only if the corresponding subset $A$
is measurable (i.e. $A\in\Sigma_{X}$).

We recall that the Borel $\sigma$-algebra $\mathcal{B}(\mathbb{R})$ over the
real line $\mathbb{R}$ is generated by the family of all half-open intervals
$\Set{\left[\alpha,\beta\right)}{\alpha,\beta\in\mathbb{R}}$. We remark that
each singleton $\\{r\\}$ is a Borel set, because
$\\{r\\}=\bigcap_{n\in\mathbb{N}}\left[r,r+1/(n+1)\right)$, and hence any
countable subset of $\mathbb{R}$ is a Borel set. By the Caratheodory’s
extension theorem, there is a unique measure on $\mathcal{B}(\mathbb{R})$
assigning $m(\left[\alpha,\beta\right))=\beta-\alpha$. We denote it by $m$,
and call it _the Borel measure_ on the real line $\mathbb{R}$. We remark that
$m(\\{r\\})=0$ for any $r\in\mathbb{R}$, and hence $m(A)=0$ for any countable
subset $A\subseteq\mathbb{R}$.

###  1.2 The Giry monad

The Giry monad [6] is a monad on the category $\mathbf{Meas}$ that is
introduced by Giry, which captures continuous/non-discrete probabilistic
computations such as Labelled Markov processes. For example, Markov processes
are arrows in the Kleisli category of Giry monad, and the Chapman-Kolmogorov
equation for Markov processes is characterised as associativity of
multiplications of the Giry monad.

The structure of Giry monad $\mathcal{G}$ is defined as follows:

  * •

For any measurable space $X$, the measurable space $\mathcal{G}X$ is defined
by

    * –

the underlying set $|\mathcal{G}X|$ is _the set of probability measures_ on
$X$.

    * –

the $\sigma$-algebra $\Sigma_{\mathcal{G}X}$ is the _coarsest_ one over
$|\mathcal{G}X|$ that makes the evaluation function
$\mathrm{ev}_{A}\colon\mathcal{G}X\to[0,1]$ defined by $\nu\mapsto\nu(A)$
measurable for any $A\in\Sigma_{X}$, where $\Sigma_{[0,1]}$ is the Borel
$\sigma$-algebra over the unit interval, which is introduced in the same way
as $\mathcal{B}(\mathbb{R})$.

  * •

For each $f\colon X\to Y$ in $\mathbf{Meas}$,
$\mathcal{G}f\colon\mathcal{G}X\to\mathcal{G}Y$ is defined by
$(\mathcal{G}f)(\mu)=\mu({f}^{-1}(-))$.

  * •

The unit $\eta$ is defined by $\eta_{X}(x)=\delta_{x}$, where $\delta_{x}$ is
the _Dirac measure_ centred on $x$.

  * •

The Kleisli lifting of $f\colon X\to\mathcal{G}Y$ is given by
$f^{\sharp}(\mu)(A)=\int_{X}f({-})(A)~{}d\mu$ ($\mu\in\mathcal{G}X$).

We also consider the subprobabilistic variant $\mathcal{G}_{\mathrm{sub}}$ of
the Giry monad; the underlying set $|\mathcal{G}_{\mathrm{sub}}X|$ is the set
of _subprobability_ measures on $X$.

Both the Giry monad $\mathcal{G}$ and its subprobabilistic variant
$\mathcal{G}_{\mathrm{sub}}$ is strong and commutative with respect to the
cartesian monoidal structure on $\mathbf{Meas}$ in the sense of [1]. The
tensorial strength
$\mathrm{st}^{\mathcal{G}{\times}}_{-,=}\colon({-})\times\mathcal{G}({=})\Rightarrow\mathcal{G}({-}\times{=})$
is given by the product measure
$\mathrm{st}_{X,Y}(x,\nu)=\delta_{x}\times\nu$. The commutativity is shown
from the Fubini theorem, and the double strength
$\mathrm{dst}^{\mathcal{G}{\times}}_{-,=}\colon\mathcal{G}({-})\times\mathcal{G}({=})\Rightarrow\mathcal{G}({-}\times{=})$
is given by $\mathrm{dst}_{X,Y}(\nu_{1},\nu_{2})=\nu_{1}\times\nu_{2}$.

##  2 The Canonical Symmetric Monoidal Closed Structure on $\mathbf{Meas}$

The category $\mathbf{Meas}$ is not cartesian closed, but there is the
following canonical symmetric monoidal _closed_ structure on $\mathbf{Meas}$
(see also [5, 13]). We first consider the following two families of constant
graph functions:

  * •

$\Gamma_{x}\colon|Y|\to|X|\times|Y|$ defined by $\Gamma_{x}(y)=(x,y)$ for any
$y\in|Y|$ ($x\in|X|$).

  * •

$\Gamma_{y}\colon|X|\to|X|\times|Y|$ defined by $\Gamma_{y}(x)=(x,y)$ for any
$x\in|X|$ ($y\in|Y|$).

Next, we introduce the following symmetric monoidal closed structure on
$\mathbf{Meas}$:

  * •

The monoidal product functor $\otimes$ is defined by $X\otimes
Y=(|X|\times|Y|,\Sigma_{X\otimes Y})$ where the $\sigma$-algebra
$\Sigma_{X\otimes Y}$ is the finest $\sigma$-algebra $\Sigma$ such that

    * –

$\Gamma_{x}$ is a measurable mapping $Y\to(|X|\times|Y|,\Sigma)$ for any $x\in
X$, and

    * –

$\Gamma_{y}$ is a measurable mapping $X\to(|X|\times|Y|,\Sigma)$ for any $y\in
Y$,

  * •

The internal Hom functor $\multimap$ is defined by $(X\multimap
Y)=(\mathbf{Meas}(X,Y),\Sigma_{X\multimap Y})$ where the $\sigma$-algebra
$\Sigma_{X\multimap Y}$ is the coarsest one generated by

$\left\langle\left\langle{x,U}\right\rangle\right\rangle=\Set{f\in\mathbf{Meas}(X,Y)}{f(x)\in
U}\quad(x\in|X|,U\in\Sigma_{Y}).$

We remark that the forgetful functor $|-|\colon\mathbf{Meas}\to\mathbf{Set}$
forms a strict symmetric monoidal functor from $(\mathbf{Meas},\otimes,1)$ to
$(\mathbf{Set},\times,1)$.

###### Lemma 1

The currying operation forms a natural isomorphism $\mathbf{Meas}(X\otimes
Y,Z)\simeq\mathbf{Meas}(X,Y\multimap Z)$ for all measurable spaces $X,Y,Z$.

###### Proof

Let $f$ be an arbitrary function of type $|X|\times|Y|\to|Z|$. The curried
function $\left\lceil{f}\right\rceil$ is then a function of type
$|X|\to\mathbf{Set}(|Y|,|Z|)$. The currying operator
$\left\lceil{-}\right\rceil$ is obviously natural and isomorphic as a
transformation on just functions. Hence, it suffices to show that the original
$f$ is measurable if and only if the curried $\left\lceil{f}\right\rceil$
returns measurable functions, and is measurable itself.

$\displaystyle f\in\mathbf{Meas}(X\otimes Y,Z)$
$\displaystyle\iff\forall{V\in\Sigma_{Z}}.{f}^{-1}(V)\in\Sigma_{X\otimes Y}$
$\displaystyle\iff\forall{V\in\Sigma_{Z}}.\left((\forall{x\in
X}.{\Gamma_{x}}^{-1}({f}^{-1}(V))\in\Sigma_{Y})\wedge(\forall{y\in
Y}.{\Gamma_{y}}^{-1}({f}^{-1}(V))\in\Sigma_{X})\right)$
$\displaystyle\iff\forall{V\in\Sigma_{Z}}.\left((\forall{x\in
X}.{(\left\lceil{f}\right\rceil(x))}^{-1}(V)\in\Sigma_{Y})\wedge(\forall{y\in
Y}.{\left\lceil{f}\right\rceil}^{-1}\left\langle\left\langle{y,V}\right\rangle\right\rangle\in\Sigma_{X})\right)$
$\displaystyle\iff(\forall{x\in
X}.\left\lceil{f}\right\rceil(x)\in\mathbf{Meas}(Y,Z))\wedge(\forall{V\in\Sigma_{Z}}.\forall{y\in
Y}.{\left\lceil{f}\right\rceil}^{-1}\left\langle\left\langle{y,V}\right\rangle\right\rangle\in\Sigma_{X})$
$\displaystyle\iff\left\lceil{f}\right\rceil\in\mathbf{Meas}(X,Y\multimap Z)$

We remark that the uncurried mapping of the identity mapping
$\mathrm{id}_{X\multimap Y}\colon X\multimap Y\to X\multimap Y$ on $X\multimap
Y$ is called the evaluation mapping $\mathrm{ev}_{X,Y}\colon(X\multimap
Y)\otimes X\to Y$.

This construction is similar to the classical symmetric monoidal closed
structure $(\mathbf{Top},\otimes,1)$ on the category $\mathbf{Top}$ of
topological spaces and continuous functions (see [3, Example 6.1.9.g], [14,
Section 3], and [9, Remark 6.4]).

By [9, Proposition 3.1], any symmetric monoidal closed structure on
$\mathbf{Meas}$ is isomorphic to a symmetric monoidal closed structure
$(\mathbin{\dot{\otimes}},1,\mathbin{\dot{\multimap}})$ such that the
forgetful functor $|-|\colon\mathbf{Meas}\to\mathbf{Set}$ is strictly
symmetric monoidal functor from $(\mathbf{Meas},\mathbin{\dot{\otimes}},1)$ to
$(\mathbf{Set},\times,1)$, and each internal Hom $X\mathbin{\dot{\multimap}}Y$
is a measurable space
$(\mathbf{Meas}(X,Y),\Sigma_{X\mathbin{\dot{\multimap}}Y})$ for some
$\sigma$-algebra $\Sigma_{X\mathbin{\dot{\multimap}}Y}$ over
$\mathbf{Meas}(X,Y)$.

Consider an arbitrary symmetric monoidal closed structure
$(\mathbin{\dot{\otimes}},1,\mathbin{\dot{\multimap}})$ on $\mathbf{Meas}$ in
the above “normal form”. Then
$\Gamma_{x}=(\overline{x}\mathbin{\dot{\otimes}}Y)\circ{\lambda_{Y}}^{-1}$ and
$\Gamma_{y}=(X\mathbin{\dot{\otimes}}\overline{y})\circ{\rho_{X}}^{-1}$, where
$\overline{x}\colon 1\to X$ and $\overline{y}\colon 1\to Y$ are the elements
$\ast\mapsto x$ and $\ast\mapsto y$ respectively. Here $\lambda_{X}\colon
I\mathbin{\dot{\otimes}}X\cong X$ and $\rho_{X}\colon
X\mathbin{\dot{\otimes}}I\cong X$ is the left and right unitors in the
symmetric monoidal closed structure
$(\mathbin{\dot{\otimes}},1,\mathbin{\dot{\multimap}})$ respectively.
Therefore, these graph functions $\Gamma_{x}$ and $\Gamma_{y}$ are measurable.
This implies that the identity function on $|X|\times|Y|$ forms a measurable
function $X\otimes Y\to X\mathbin{\dot{\otimes}}Y$ because the
$\sigma$-algebra $\Sigma_{X\mathbin{\dot{\otimes}}Y}$ is coarser than
$\Sigma_{X\otimes Y}$. Also the identity function on $|X|\times|Y|$ forms a
measurable function $X\mathbin{\dot{\otimes}}Y\to X\times Y$ because
$\pi_{1}=\rho_{X}\circ(X\mathbin{\dot{\otimes}}!_{Y})$ and
$\pi_{2}=\lambda_{Y}\circ(!_{X}\mathbin{\dot{\otimes}}Y)$.

##  3 The Uniqueness of Tensorial Strength

We first show the uniqueness of tensorial strength for any monad on
$\mathbf{Meas}$ with respect to the canonical symmetric monoidal closed
structure $(\otimes,1,\multimap)$ on $\mathbf{Meas}$. We slightly relax the
uniqueness of tensorial strength in [1] as below.

Let $\mathbb{C}$ be a category. An object $I$ in $\mathbb{C}$ is called a
_separator_ if for any pair of arrows $f,g\colon X\to Y$ in $\mathbb{C}$, the
equality $f=g$ holds when $f\circ e=g\circ e$ for each $e\colon I\to X$.

######  Lemma 2 ([1, Proposition 3.4], Modified)

Consider a symmetric monoidal category $(\mathbb{C},\otimes,I)$ whose tensor
unit $I$ is a separator of $\mathbb{C}$ such that for any morphism
$\overline{z}\colon I\to X\otimes Y$, there are $\overline{x}\colon I\to X$
and $\overline{y}\colon I\to Y$ satisfying
$\overline{z}=(\overline{x}\otimes\overline{y})\circ{\lambda_{I}}^{-1}$.

If $T$ is a strong monad with respect to $(\mathbb{C},\otimes,I)$ then its
tensorial strength $\mathrm{st}^{T}\colon({-})\otimes T({=})\Rightarrow
T({-}\otimes{=})$ is determined uniquely by

$\mathrm{st}^{T}_{X,Y}\circ(\overline{x}\otimes\overline{\xi})\circ{\lambda_{I}}^{-1}=T((\overline{x}\otimes
Y)\circ{\lambda_{Y}}^{-1})\circ\overline{\xi}$

where $\overline{x}\colon I\to X$ and $\overline{\xi}\colon I\to TY$.

###### Proof

From the naturality of $\mathrm{st}^{T}$ and $\lambda$ and bifunctoriality of
$\otimes$, we obtain,

$\displaystyle\mathrm{st}^{T}_{X,Y}\circ(\overline{x}\otimes\overline{\xi})\circ{\lambda_{I}}^{-1}$
$\displaystyle=\mathrm{st}^{T}_{X,Y}\circ(\overline{x}\otimes
TY)\circ(I\otimes\overline{\xi})\circ{\lambda_{I}}^{-1}$
$\displaystyle=T(\overline{x}\otimes
Y)\circ\mathrm{st}^{T}_{I,Y}\circ{\lambda_{TY}}^{-1}\circ\overline{\xi}\circ\lambda_{I}\circ{\lambda_{I}}^{-1}$
$\displaystyle=T((\overline{x}\otimes
Y)\circ{\lambda_{Y}}^{-1})\circ\overline{\xi}$

for any pair $\overline{x}\colon I\to X$ and $\overline{\xi}\colon I\to TY$.
Since any arrow $\overline{z}\colon I\to X\otimes TY$ is written as
$\overline{z}=(\overline{x}\otimes\overline{\xi})\circ{\lambda_{I}}^{-1}$ for
some $\overline{x}\colon I\to X$ and $\overline{\xi}\colon I\to TY$, the arrow
$\mathrm{st}^{T}_{X,Y}$ is determined uniquely for each $X$ and $Y$.

Any well-pointed cartesian monoidal category $(\mathbb{C},\times,1)$ satisfies
the assumption of this lemma because the terminal object $1$ is a generator
and $\lambda_{X}=\pi_{2}$ and
${\lambda_{X}}^{-1}=\left\langle{!_{X},\mathrm{id}}\right\rangle$.

The symmetric monoidal closed categories $(\mathbf{Meas},\otimes,1,\multimap)$
and $(\mathbf{Top},\otimes,1,\multimap)$ discussed in Section 2 satisfy the
assumption of the lemma because the terminal object $1$ is both tensor unit
and generator, and each element $\overline{z}\colon 1\to X\otimes Y$
($\ast\mapsto(x,y)$) is obviously decomposed into a pair of elements
$\overline{x}\colon 1\to X$ ($\ast\mapsto x$) and $\overline{y}\colon 1\to Y$
($\ast\mapsto y$).

##  4 The Giry Monad is not Strong

We show that the Giry monad $\mathcal{G}$ is not strong with respect to the
canonical symmetric monoidal closed structure $(\otimes,1,\multimap)$ on
$\mathbf{Meas}$. In the following discussion, we consider the Giry monad
$\mathcal{G}$, but we are able to prove that the subprobabilistic variant
$\mathcal{G}_{\mathrm{sub}}$ is not strong in the same way.

###### Theorem 4.1

Giry monad $\mathcal{G}$ is not strong with respect to the canonical symmetric
monoidal closed structure $(\otimes,1,\multimap)$ on $\mathbf{Meas}$.

Assume that the Giry monad $\mathcal{G}$ is strong with respect to the
symmetric monoidal structure $(\mathbf{Meas},\otimes,\multimap,1)$. From [11],
the strength $\mathrm{G}_{X,Y}\colon(X\multimap
Y)\to(\mathcal{G}X\multimap\mathcal{G}Y)$ correspond bijectively to the
tensorial strength $\mathrm{st}^{\mathcal{G}}_{X,Y}\colon
X\otimes\mathcal{G}Y\to\mathcal{G}(X\otimes Y)$. From the construction of
$(\otimes,1,\multimap)$, we obtain
$\mathrm{G}_{X,Y}=\left\lceil{\mathcal{G}(\mathrm{ev}_{X,Y})\circ\mathrm{st}^{\mathcal{G}}_{X\multimap
Y,X}}\right\rceil$. By Lemma 2, the tensorial strength
$\mathrm{st}^{\mathcal{G}}$ of $\mathcal{G}$ is determined uniquely by for any
$x\in X$ and $\mu\in\mathcal{G}Y$,

$\mathrm{st}^{\mathcal{G}}_{X,Y}(x,\mu)=\mathcal{G}({(\overline{x}\otimes
Y)\circ{\lambda_{Y}}^{-1}})\circ\overline{\mu}=\mu({((\overline{x}\otimes
Y)\circ{\lambda_{Y}}^{-1})}^{-1}(-))=\mu({\Gamma_{x}}^{-1}(-)).$

Hence, the following calculation shows that the strength $\mathrm{G}_{X,Y}$ is
uniquely determined by the mapping that takes $f\colon X\to Y$, and returns
$\mathcal{G}f\colon\mathcal{G}X\to\mathcal{G}Y$:

$\mathcal{G}(\mathrm{ev}_{X,Y})\circ\mathrm{st}^{\mathcal{G}}_{X\multimap
Y,X}(f,\mu)=\mu({\mathrm{ev}_{X,Y}\circ\Gamma_{f}}^{-1}(-))=\mu({f}^{-1}(-))=\mathcal{G}(f)(\mu).$

However, as we show below, the component $\mathrm{G}_{X,Y}$ is not even a
measurable function of type $(X\multimap
Y)\to(\mathcal{G}X\multimap\mathcal{G}Y)$ for some $X$ and $Y$. Hence, the
Giry monad is not strong with respect to the canonical symmetric monoidal
structure.

###  4.1 Non-measurability of $\mathrm{G}_{X,Y}$

We recall that $\Sigma_{\mathcal{G}X\multimap\mathcal{G}Y}$ is generated by
$\left\langle\left\langle{\mu,{\mathrm{ev}_{U}}^{-1}(A)}\right\rangle\right\rangle$
for parameters $\mu\in\mathcal{G}X$, $U\in\Sigma_{Y}$, and
$A\in\Sigma_{[0,1]}$. We thus have,

${\mathrm{G}_{X,Y}}^{-1}\left\langle\left\langle{\mu,{\mathrm{ev}_{U}}^{-1}(A)}\right\rangle\right\rangle=\Set{f\in\mathbf{Meas}(X,Y)}{\mu({f}^{-1}(U))\in
A}.$

Hence, the $\sigma$-algebra
$\Set{{\mathrm{G}_{X,Y}}^{-1}(K)}{K\in\Sigma_{\mathcal{G}X\multimap\mathcal{G}Y}}$
of the inverse images of measurable subsets of
$\mathcal{G}X\multimap\mathcal{G}Y$ along $\mathrm{G}_{X,Y}$ is at least finer
than or equal to $\Sigma_{X\multimap Y}$, because for any $x\in X$ and
$U\in\Sigma Y$, we obtain

$\left\langle\left\langle{x,U}\right\rangle\right\rangle=\Set{f\in\mathbf{Meas}(X,Y)}{x\in{f}^{-1}(U)}={\mathrm{G}_{X,Y}}^{-1}\left\langle\left\langle{\delta_{x},{\mathrm{ev}_{U}}^{-1}(\\{1\\})}\right\rangle\right\rangle.$

####  4.1.1 A $\sigma$-algebra $\Omega_{X,Y}$

Consider measurable spaces $X$ and $Y$ whose underlying sets are infinite. We
define the family $\Omega_{X,Y}$ of all subsets of the form

$\left\langle{h,V}\right\rangle=\Set{f\in\mathbf{Meas}(X,Y)}{\left\langle{f(h(n))}\right\rangle_{n\in\mathbb{N}}\in
V}$

where $h\colon\mathbb{N}\to X$ is an arbitrary injection and
$V\subseteq{|Y|}^{\mathbb{N}}$ is an arbitrary subset.

###### Lemma 3

The collection $\Omega_{X,Y}$ forms a $\sigma$-algebra over
$\mathbf{Meas}(X,Y)$ finer than $\Sigma_{X\multimap Y}$.

###### Proof

We have $\emptyset=\left\langle{h,\emptyset}\right\rangle\in\Omega_{X,Y}$
where $h$ is an arbitrary injection. For any
$\left\langle{h,V}\right\rangle\in\Omega_{X,Y}$, we have
$\mathbf{Meas}(X,Y)\setminus\left\langle{h,V}\right\rangle=\left\langle{h,{|Y|}^{\mathbb{N}}\setminus
V}\right\rangle\in\Omega_{X,Y}$. For any countable family
$\\{\left\langle{h_{m},V_{m}}\right\rangle\\}_{m\in\mathbb{N}}$ with
$\left\langle{h_{m},V_{m}}\right\rangle\in\Omega_{X,Y}$, we obtain
$\bigcup_{m\in\mathbb{N}}\left\langle{h_{m},V_{m}}\right\rangle=\left\langle{h,V}\right\rangle$
in the following steps:

  1. 1.

The image $I=\Set{h_{m}(n)}{m,n\in\mathbb{N}}$ is countably infinite, hence
there is a bijection $k\colon\mathbb{N}\to I$. Now we define
$k_{m}={k}^{-1}\circ h_{m}$ for each $m\in\mathbb{N}$ and $h=\iota\circ k$
where $\iota\colon I\rightharpoonup X$ is the inclusion. Since $(k\circ
k_{m})(n)=h_{m}(n)$ for all $m,n\in\mathbb{N}$, the injection $h$ and the
family $\\{k_{m}\\}_{m\in\mathbb{N}}$ satisfy $h\circ k_{m}=h_{m}$ for each
$m\in\mathbb{N}$.

  2. 2.

We take the projection $\pi_{l}\colon{|Y|}^{\mathbb{N}}\to Y$
($\left\langle{x_{L}}\right\rangle_{L\in\mathbb{N}}\mapsto x_{l}$) for each
$l\in\mathbb{N}$ and the tuple
$\left\langle{\pi_{k_{m}(n)}}\right\rangle_{n\in\mathbb{N}}\colon{|Y|}^{\mathbb{N}}\to{|Y|}^{\mathbb{N}}$
indexed by $\\{k_{m}(n)\\}_{n\in\mathbb{N}}$ for each $m\in\mathbb{N}$. Then
the inverse image
$W_{m}={\left\langle{\pi_{k_{m}(n)}}\right\rangle_{n\in\mathbb{N}}}^{-1}(V_{m})$
satisfies
$\left\langle{h_{m},V_{m}}\right\rangle=\left\langle{h,W_{m}}\right\rangle$
for each $m\in\mathbb{N}$.

  3. 3.

We have
$\bigcup_{m\in\mathbb{N}}\left\langle{h_{m},V_{m}}\right\rangle=\bigcup_{m\in\mathbb{N}}\left\langle{h,W_{m}}\right\rangle=\left\langle{h,\bigcup_{m\in\mathbb{N}}\\!W_{m}}\right\rangle$
(thus $V=\bigcup_{m\in\mathbb{N}}\\!W_{m}$).

Hence, $\Omega_{X,Y}$ is indeed a $\sigma$-algebra over $\mathbf{Meas}(X,Y)$.

For each $x\in X$ and $U\in\Sigma_{Y}$, we have
$\left\langle\left\langle{x,U}\right\rangle\right\rangle=\left\langle{h,{\pi_{0}}^{-1}(U)}\right\rangle$
where $h$ is an arbitrary injection such that $h(0)=x$. From the minimality of
$\Sigma_{X\multimap Y}$, the $\sigma$-algebra $\Omega_{X,Y}$ is finer than
$\Sigma_{X\multimap Y}$.

The inclusion $\Sigma_{X\multimap Y}\subseteq\Omega_{X,Y}$ implies that for
each measurable set $K\in\Sigma_{X\multimap Y}$, the membership $f\in K$ is
determined by checking outputs $f(x_{0}),f(x_{1}),\ldots$ for some _countable
sequence_ $x_{0},x_{1},\ldots$ of inputs.

####  4.1.2 A Counterexample

###### Theorem 4.2

Let $X=Y=(\mathbb{R},\mathcal{B}(\mathbb{R}))$, and let $\mu\in\mathcal{G}X$
be absolutely continuous with respect to the Borel measure $m$ (i.e.
$m(A)=0\implies\mu(A)=0$ for any $A\in\Sigma_{X}$). We then obtain
${\mathrm{G}_{X,Y}}^{-1}\left\langle\left\langle{\mu,{\mathrm{ev}_{\\{0\\}}}^{-1}(\\{1\\})}\right\rangle\right\rangle\notin\Sigma_{X\multimap
Y}$.

###### Proof

We write
$K={\mathrm{G}_{X,Y}}^{-1}\left\langle\left\langle{\mu,{\mathrm{ev}_{\\{0\\}}}^{-1}(\\{1\\})}\right\rangle\right\rangle$.
We assume $K=\left\langle{h,U}\right\rangle\in\Omega_{X,Y}$ holds for some $h$
and $U$. We then have $U\neq\mathbb{R}^{\mathbb{N}},\emptyset$ because $K$ is
neither the whole space $\mathbf{Meas}(X,Y)$ nor the empty function space.
Hence, there is a pair of sequences
$\left\langle{s_{n}}\right\rangle_{n\in\mathbb{N}}\in\mathbb{R}^{\mathbb{N}}$
and
$\left\langle{t_{n}}\right\rangle_{n\in\mathbb{N}}\in\mathbb{R}^{\mathbb{N}}$
such that $\left\langle{s_{n}}\right\rangle_{n\in\mathbb{N}}\in U$ and
$\left\langle{t_{n}}\right\rangle_{n\in\mathbb{N}}\notin U$.

We consider a measurable function $f\in\mathbf{Meas}(X,Y)$. We give the
functions $f_{1}$ and $f_{2}$ by replacing the output of $f$ at each $h(n)$ to
$s_{n}$ and $t_{n}$ ($n\in\mathbb{N}$) respectively, that is,

$f_{1}=f+\sum_{n\in\mathbb{N}}(s_{n}-f(h(n)))\cdot\chi_{\\{h(n)\\}},\qquad
f_{2}=f+\sum_{n\in\mathbb{N}}(t_{n}-f(h(n)))\cdot\chi_{\\{h(n)\\}}.$

Here, $\chi_{\\{h(n)\\}}$ is the indicator function of the closed (hence
Borel) subset $\\{h(n)\\}$, and hence it is measurable for each
$n\in\mathbb{N}$. Since $\mathbf{Meas}(X,Y)$ is the set of Borel measurable
functions on $\mathbb{R}$, and hence it is closed under scalar multiplication
and countable addition, the functions $f_{1}$ and $f_{2}$ are measurable. We
obtain $f_{1}\in K$ and $f_{2}\notin K$ since
$\left\langle{s_{n}}\right\rangle_{n\in\mathbb{N}}\in U$ and
$\left\langle{t_{n}}\right\rangle_{n\in\mathbb{N}}\notin U$. However,
$f_{1}\in K\iff f_{2}\in K$ must hold, because $\mu(\Set{x}{f(x)\neq
f_{1}(x)})=\mu(\Set{x}{f(x)\neq f_{2}(x)})=0$ is obtained from the absolute
continuity of $\mu$ with respect to the Borel measure $m$. This is a
contradiction. Hence, there is no $h$ and $U$ such that
$K=\left\langle{h,U}\right\rangle\in\Omega_{X,Y}$. From the construction of
$\Omega_{X,Y}$, $K\notin\Omega_{X,Y}$. Thus, $K\notin\Sigma_{X\multimap Y}$.

##  5 Concluding Remarks

The proof that the Giry monad is strong with respect to the canonical
symmetric monoidal closed structure $(\otimes,1,\multimap)$ in the preprint
[13] has the following error: The statement of [13, Theorem 3.1] is just the
naturality of
$\mathrm{st}^{\mathcal{G}{\times}}_{X,Y}\circ\mathrm{id_{|X|\times|Y|}}\colon
X\otimes\mathcal{G}Y\to\mathcal{G}(X\times Y)$. Here we remark
$\mathrm{st}^{\mathcal{G}{\times}}_{X,Y}$ is the tensorial strength for
$\mathcal{G}$ with respect to the cartesian product on $\mathbf{Meas}$, and
$\mathrm{id_{|X|\times|Y|}}$ obviously forms a symmetric monoidal natural
transformation $X\otimes Y\to X\times Y$. However, the above statement is
mistaken for the existence of the natural transformation of the type
$X\otimes\mathcal{G}Y\to\mathcal{G}(X\otimes Y)$ in the proof of existence of
the tensorial strength for the Giry monad $\mathcal{G}$ with respect to the
canonical symmetric monoidal closed structure $(\otimes,1,\multimap)$.

If there is a symmetric monoidal closed structure
$(\dot{\otimes},1,\dot{\multimap})$ on $\mathbf{Meas}$ with respect to which
makes the Giry monad strong, then there is a strong symmetric monoidal functor
$U$ from $(\dot{\otimes},1,\dot{\multimap})$ to the canonical symmetric
monoidal closed structure $(\otimes,1,\multimap)$. Moreover, by converting to
the “normal form” discussed in the last two paragraphs of Section 2, the
$\sigma$-algebra $\Sigma_{X\dot{\otimes}Y}$ of the space $X\dot{\otimes}Y$
satisfies $\Sigma_{X\times
Y}\subsetneq\Sigma_{X\dot{\otimes}Y}\subsetneq\Sigma_{X\otimes Y}$. We have
not found yet an intermediate symmetric monoidal closed structure on
$\mathbf{Meas}$ which is intermediate between the cartesian monoidal structure
and the canonical symmetric monoidal closed structure.

## Acknowledgement

The author thanks Shin-ya Katsumata for constructive discussions and
stimulating suggestions and Masahito Hasegawa for advice that contributed to
improving the writing of this paper.

## References

  * [1] Notions of computation and monads.  Information and Computation, 93(1):55 – 92, 1991.
  * [2] Robert J. Aumann.  Borel structures for function spaces.  Illinois J. Math., 5(4):614–630, 12 1961.
  * [3] Francis Borceux.  Handbook of categorical algebra. 2., Categories and structures.  Encyclopedia of mathematics and its applications. Cambridge University Press, Cambridge, New York, 1994.  Information sur la publication www.cambridge.org/9780521441797.
  * [4] G.C.L. Brummer.  Topological categories.  Topology and its Applications, 18(1):27 – 41, 1984.
  * [5] Jared Culbertson, Kirk Sturtz, and Mark E. Oxley.  Representations of probablistic situations.  In Signal Processing, Sensor Fusion, and Target Recognition XXI. SPIE-Intl Soc Optical Eng, may 2012.
  * [6] Michèle Giry.  A categorical approach to probability theory.  In B. Banaschewski, editor, Categorical Aspects of Topology and Analysis, volume 915 of Lecture Notes in Mathematics, pages 68–85. Springer Berlin Heidelberg, 1982.
  * [7] Jean Goubault-Larrecq, Slawomir Lasota, and David Nowak.  Logical Relations for Monadic Types, pages 553–568.  Springer Berlin Heidelberg, Berlin, Heidelberg, 2002.
  * [8] Horst Herrlich.  Topological functors.  General Topology and its Applications, 4(2):125 – 142, 1974.
  * [9] G.M. Kelly and F. Rossi.  Topological categories with many symmetric monoidal closed structures.  Bulletin of the Australian Mathematical Society, 31(1):41–59, 1985\.
  * [10] Anders Kock.  Monads on symmetric monoidal closed categories.  Archiv der Mathematik, 21(1):1–10, 1970.
  * [11] Anders Kock.  Strong functors and monoidal monads.  Archiv der Mathematik, 23(1):113–120, 1972.
  * [12] Saunders Mac Lane.  Categories for the Working Mathematician (Graduate Texts in Mathematics).  Springer, second edition, sep 1998.
  * [13] Kirk Sturtz.  Bayesian Inference using the Symmetric Monoidal Closed Category Structure.  ArXiv e-prints, January 2016.
  * [14] Manfred Bernd Wischnewsky.  Aspects of categorical algebra in initialstructure categories.  Cahiers de Topologie et Geometrie Differentielle Categoriques, 15(4):419–444, 1974.


11institutetext: Anton Pannekoek Institute for Astronomy, University of
Amsterdam, Science Park 904, 1098 XH Amsterdam, The Netherlands
22institutetext: Atmospheric, Ocean, and Planetary Physics, Clarendon
Laboratory, Department of Physics, University of Oxford, Oxford, OX1 3PU, UK
33institutetext: JHU Applied Physics Laboratory, 11100 Johns Hopkins Rd,
Laurel, MD 20723, USA

# A new approach to spectroscopic phase curves

The emission spectrum of WASP-12b observed in quadrature with HST/WFC3

J. Arcangeli A new approach to spectroscopic phase curvesA new approach to
spectroscopic phase curves J.-M. Désert A new approach to spectroscopic phase
curvesA new approach to spectroscopic phase curves V. Parmentier A new
approach to spectroscopic phase curvesA new approach to spectroscopic phase
curves S.-M. Tsai A new approach to spectroscopic phase curvesA new approach
to spectroscopic phase curves K. B. Stevenson A new approach to spectroscopic
phase curvesA new approach to spectroscopic phase curves

(Month Year)

We analyse emission spectra of WASP-12b from a partial phase curve observed
over three epochs with the Hubble Space Telescope, covering eclipse,
quadrature, and transit, respectively. As the 1.1-day period phase curve was
only partially covered over three epochs, traditional methods to extract the
planet flux and instrument systematic errors cannot recover the thermal
emission away from the secondary eclipse. To analyse this partial phase curve,
we introduce a new method, which corrects for the wavelength-independent
component of the systematic errors. Our new method removes the achromatic
instrument and stellar variability, and uses the measured stellar spectrum in
eclipse to then retrieve a relative planetary spectrum in wavelength at each
phase. We are able to extract the emission spectrum of an exoplanet at
quadrature outside of a phase curve for the first time; we recover the
quadrature spectrum of WASP-12b up to an additive constant. The dayside
emission spectrum is extracted in a similar manner, and in both cases we are
able to estimate the brightness temperature, albeit at a greatly reduced
precision, because our method removes the absolute level of the spectra, and
therefore relies on fitting the slope of the emission spectrum instead of its
amplitude. We estimate the brightness temperature from the dayside
(Tday=3186$\pm$677 K) and from the quadrature spectrum (Tquad=2124$\pm$417 K)
and combine them to constrain the energy budget of the planet. We compare our
extracted relative spectra to global circulation models of this planet, which
are generally found to be a good match. However, we do see tentative evidence
of a steeper spectral slope in the measured dayside spectrum compared to our
models. We find that we cannot match this increased slope by increasing
optical opacities in our models. We also find that this spectral slope is
unlikely to be explained by a non-equilibrium water abundance, as water
advected from the nightside is quickly dissociated on the dayside.

We present our technique for analysing partial or full phase curves from
HST/WFC3 using common mode methods. Importantly, and unlike previous phase
curve analyses, this technique does not assume a functional form for the
planet’s emission with phase and does not require a full-orbit phase curve.
The success of this technique relies upon stable pointing of the telescope
between visits, with less than 0.1 pixels drift for example. This technique
becomes powerful in the study of new regimes in exoplanetary systems such as
for longer period planets, and is ideally suited for future observations with
JWST and ARIEL.

##  1 Introduction

Measuring the thermal emission of planets provides key insights into the
nature of their atmospheres, from their temperature structures to their
compositions. The daysides of close-in transiting planets are the perfect
examples of this because of the large signals emitted from their hot daysides
and because an eclipse establishes a baseline from which the emission of the
planet can be measured (Charbonneau et al., 2005; Deming et al., 2006). The
natural extensions to dayside emission measurements are phase curves, where
again the in-eclipse flux acts as a baseline from which thermal emission can
be measured throughout the whole orbit of the planet, thus probing the
longitudinal temperature structure and chemistry (Knutson et al., 2007;
Borucki et al., 2009; Snellen et al., 2009). The Hubble Space Telescope Wide
Field Camera 3 (HST/WFC3) has allowed the expansion from photometric phase
curves to spectroscopic phase curves in order to measure the phase-resolved
spectra of hot planets on short periods (Stevenson et al., 2014c; Kreidberg et
al., 2018; Arcangeli et al., 2019).

Phase-curve observations are time consuming because they rely on continuous
monitoring of the reflected or emitted light from an exoplanet during a full
orbit around its host star. Due to their expensive nature and some technical
limitations, phase curves have been limited to planets on short ($\sim$1 day)
periods. In principle, measurements of exoplanet spectra at various
longitudinal phases without obtaining a complete phase curve, so-called
partial phase curves, are interesting for many scientific purposes. For
example, partial phase curves are a unique opportunity to study the
circulation on longer period planets, or can simply be used to reduce the time
required to observe planets on short periods. However, using current
techniques at low spectral resolution, reflected or emitted light can only be
measured when a baseline eclipse is present in each visit. Specifically,
measurements away from the dayside, such as at quadrature, or of the nightside
are inaccessible outside of full phase curves. Therefore, a new approach to
removal of systematic errors is required to observe partial phase curves and
longer period planets in the future.

A common problem to phase curve observations is that instrument systematic
errors can operate on the same timescale as the full orbit of a close in
planet, typically one to two days in period (Stevenson et al., 2014c). For
HST, while short-term systematic errors are accurately fitted by charge trap
models (Zhou et al., 2017), the long-term systematic errors are thought to
originate from changes in the thermal properties and optical path of the
telescope, and are not well predicted. Furthermore, different models of the
long-term systematic errors and thermal emission can lead to differences in
the inferred atmospheric properties (Kreidberg et al., 2018; Arcangeli et al.,
2019). Traditionally, these systematic corrections are handled using
continuous monitoring of the planet as it orbits its parent star from eclipse
to eclipse. This is done assuming the planet is tidally locked and that we
therefore return to the same hemisphere of the planet when observing
consecutive eclipses. Recent work has highlighted methods for dealing with
these systematic errors, such as observing multiple phase curves over
different epochs to help characterise them (Stevenson et al., 2014c; Kreidberg
et al., 2018) or extending the phase curve to re-establish a baseline eclipse
(Arcangeli et al., 2019). However, both these approaches require additional
observing time, and limit the targets for which this technique can be applied
to those with very short orbital periods.

Here, we present a new approach to phase-curve extraction that relies on
common-mode methods and allows us to extract the emission from WASP-12b at
different phases, including quadrature. Our new method removes the achromatic
instrument and stellar variability, and uses the measured stellar spectrum in
eclipse to then retrieve a relative planetary spectrum in wavelength at each
phase. We apply our new method to the perfect test case for these issues: the
partial phase curve of WASP-12b observed with HST/WFC3 at three different
epochs over five days in 2011. Of these data, the dayside emission spectrum
and the transmission spectrum have been published (Swain et al., 2013), but
the emission at quadrature remains inaccessible to current methods.

Interestingly, WASP-12b is a member of an emerging class of exoplanets
referred to as the ultra-hot Jupiters (UHJs), which are distinguished by their
extremely hot dayside temperatures resulting in dissociation- and ionisation-
dominated chemistry (Bell et al., 2017; Arcangeli et al., 2018; Kitzmann et
al., 2018; Kreidberg et al., 2018; Mansfield et al., 2018; Parmentier et al.,
2018; Mikal-Evans et al., 2019; Baxter et al., 2020). This makes the emission
at different planetary phases extremely valuable, as it can be used to
constrain the climate and atmospheric dynamics of the planet, and to probe the
chemistry of the planet beyond the muted features in the dayside spectrum.

We outline the data and our method in Section 2 and explore the accuracy of
the technique. Our results for WASP-12b are described in Section 3, along with
a comparison to 3D forward models. We discuss the implications of our results
and possible future applications in Section 4, and conclude in Section 5.

##  2 Data and Methods

###  2.1 HST data

Our data set is the partial phase curve of WASP-12b from April 2012 (Program
12230, PI M.R. Swain, Swain et al. 2013). These data consist of three visits:
five orbits taken around transit, five orbits taken around secondary eclipse,
and two orbits taken in quadrature (between transit and secondary eclipse).
The raw data are shown in Figure 1 and described in Table 1. Together these
visits constitute coverage of just over half of the phase curve of WASP-12b,
with each visit taken within the same five-day period. The transmission
spectrum and eclipse were published in Swain et al. (2013), Mandell et al.
(2013), and Stevenson et al. (2014a, b) while the visit taken in quadrature is
unpublished. All visits were taken in staring mode with the same instrument
setup, including a fixed orientation of the telescope.

Start time | Observation | Planet phase
---|---|---
2011-04-11 07:15 | Quadrature | 0.18 to 0.27
2011-04-12 00:48 | Transit | -0.15 to 0.12
2011-04-15 19:50 | Eclipse | 0.32 to 0.60
Table 1: Table of observed visits and corresponding planet phases.

###  2.2 Method

We use a two-step correction to extract the planet signal. First we use a
common-mode correction to remove instrument systematic errors, and second we
compare the extracted spectra at each orbit to the stellar spectrum measured
in eclipse in order to measure the planet spectra. For the first step, we
divide each spectroscopic light curve by the white-light curve (integrated
over the full wavelength range), removing any common-mode systematic errors.
In the second step, we divide the spectra of each orbit by a reference
spectrum of the star, taken during secondary eclipse and processed in the same
way. This produces a relative spectrum of the planet at each phase up to an
additive constant. We refer to these spectra as relative spectra, referring to
the fact that they are relative in wavelength, as their absolute flux levels
are removed by the common-mode correction. Spectra are not extracted for the
first orbit of each visit, as they are seen to exhibit stronger systematic
errors than subsequent orbits.

Below we illustrate the applied method. The raw data $L_{\lambda,t}$ and
$w_{t}$, the spectroscopic light curves and white light curve respectively,
can be expressed by the formulae below.

$\displaystyle
L_{\lambda,t}=S_{\lambda,t}*[F^{star}_{\lambda,t}+F^{planet}_{\lambda,t}]$
$\displaystyle w_{t}=s_{t}*[f^{star}_{t}+f^{planet}_{t}].$ (1)

Here, $S_{\lambda,t}$ and $s_{t}$ are the unknown systematic effects, and
$F_{\lambda,t}$ and $f_{t}$ are the spectra and white-light flux output,
respectively, of either the star or the planet. We assume that the star
remains constant in time over the visit, with the exception of the in-transit
data which we exclude, that is, $f^{star}_{t}=f^{star}$ and
$F^{star}_{\lambda,t}=F^{star}_{\lambda}$.

One can therefore use the white-light curve to divide out the unknown time-
dependent systematic component. We now assume that
$S_{\lambda,t}=s_{t}*c_{\lambda}$, where $c_{\lambda}$ is a normalisation
constant for each wavelength bin, which means that we assume that the
systematic errors in the white-light curve are representative of each
wavelength bin, often referred to as a common mode. We separately test the
validity of this assumption in Section 2.5. Dividing Equations 1 becomes:

$\displaystyle
L^{\prime}_{\lambda,t}=L_{\lambda,t}/w_{t}=c_{\lambda}*[F^{s}_{\lambda}+F^{p}_{\lambda,t}]/[f^{s}+f^{p}_{t}],$
(2)

where $L^{\prime}_{\lambda,t}$ are now the common-mode corrected light curves.
Evaluating Equation 2 at $t=t_{eclipse}$ gives:

$\displaystyle
L^{\prime}_{\lambda,t=t_{ecl}}=c_{\lambda}*F^{s}_{\lambda}/f^{s},$ (3)

where $F^{s}_{\lambda}$ is the stellar spectrum, and $f^{s}$ is the white-
light flux in eclipse.

Therefore, using the in-eclipse data we can measure the spectrum of the star
multiplied by the remaining wavelength-dependent systematic errors. This then
allows us to finally obtain the emission spectrum of the planet, which is
achieved by dividing the spectra from the corrected light curve
($L^{\prime}_{\lambda,t}$) at each time by the in-eclipse stellar spectrum:

$\displaystyle L^{\prime}_{\lambda,t}/L^{\prime}_{\lambda,ecl}$
$\displaystyle=[F^{s}_{\lambda}+F^{p}_{\lambda,t}]/F^{s}_{\lambda}*f^{s}/[f^{s}+f^{p}_{t}]$
$\displaystyle=[1+F^{p}_{\lambda,t}/F^{s}_{\lambda}]*[1+f^{p}_{t}/f^{s}]^{-1}$
$\displaystyle=1-f^{p}_{t}/f^{s}+F^{p}_{\lambda,t}/F^{s}_{\lambda}+\mathcal{O}((F^{p}/F^{s})^{2})$
$\displaystyle\sim q(t)+F^{p}_{\lambda,t}/F^{s}_{\lambda.}$ (4)

The parameter $q(t)=1-f^{p}_{t}/f^{s}$ is some time-dependent residual
(independent of wavelength) that remains after dividing out the wavelength-
dependent component of the systematic errors, and can be removed by re-
normalising the extracted spectra at each orbit. This last step of ignoring
higher order terms only holds for systems where the variability of the star is
sufficiently small, which we discuss in Section 2.7.

Figure 1: Top: Raw phase curve plotted in time. Bottom: Raw phase curve phase
folded to the period of the planet. The orbits used in the analysis are marked
by a red line.

###  2.3 Comparison to classical eclipse spectroscopy

When applied to the secondary eclipse data of WASP-12b, our method is
substantially different from the classical method, which is that used in
Stevenson et al. (2014a). As we do not fit for the depth of the eclipse, but
rather use the out-of-eclipse data to measure the spectrum of the planet, our
method is more akin to current spectroscopic phase curve extractions
(Stevenson et al., 2017; Kreidberg et al., 2018; Arcangeli et al., 2019).
There are still key differences between our approach and a typical phase-curve
extraction, as we do not assume a functional form for the planet’s emission
with phase, or for the systematic errors; nor do we recover the absolute
spectrum of the planet at each phase, only the relative spectrum in
wavelength. This approach is chosen so as to extract the spectra at each phase
in the same manner, from the dayside spectrum to the nightside and quadrature
spectra, as in this case neither a classical eclipse depth measurement nor a
phase-curve fit can be applied to the whole data set because the observations
are spread over five days. Therefore, this approach should be considered as a
complement to the existing extraction of the dayside emission and transmission
spectra.

Our approach has consequences for how we compare to circulation models (such
as those present in Section 3.2). A typical dayside eclipse-depth measurement
is normally compared to the magnitude of the phase curve at phase 0.5, as the
eclipse depth is an average of the planet’s emission across the dayside. In
our approach, we extract the relative emission spectra before and after
eclipse, and therefore compare to the circulation models at phases immediately
before and after eclipse. This technique is then also applicable to every
other phase of the planet’s emission, with the exception of the in-transit
data, as each phase can be directly compared to the same phase in the models.

###  2.4 Pointing offsets

Figure 2: Offset of spectrum position in the dispersion direction relative to
average over all exposures as described in Section 2.4. The x-axis shows the
time in days, with line breaks between different visits.

Coloured lines indicate the offset for each exposure with 1$\sigma$
uncertainties. Black crosses are the average offset for each orbit, with the
horizontal dashed line set to the quadrature orbit offset for visual
reference.

Shifts of the spectra in wavelength can dominate the systematic errors of
light curves observed with HST/WFC3 (Wakeford et al., 2016; Tsiaras et al.,
2016; Tsiaras & Ozden, 2019). In addition, our technique relies on the stellar
spectrum remaining constant between visits, which requires that the position
of the spectrum on the detector also remains constant, or can be accurately
reconstructed from a shifted spectrum. The IR WFC3 pixel flat-field is
uncertain at the 1% level, before considering any correlation between the
flat-fielding of nearby pixels, and the spectrum observed is under-sampled
even before binning by 6 pixels per bin as we do in our analysis (see Deming
et al. 2013). Therefore, measuring and interpolating any shifted spectra back
to a reference position on the detector is increasingly difficult for larger
positional shifts. Typically, a drift of ¡15 mas (0.11 pixels) in the
x-position is optimal for exoplanet studies using the spatial scanning mode
(Stevenson, & Fowler, 2019).

We first assess the possible effect of shifts on our spectra by measuring the
position of the dispersed spectrum on the detector for each exposure. We take
the flat-field-corrected raw images and perform a column-sum to produce a raw
spectrum for each exposure. We then produce a reference spectrum from the
average of all the raw spectra, and cross-correlate between this and each of
the raw-exposure spectra to measure their positional shifts on the detector.
The measured offsets are shown in Figure 2 in pixels along the x-axis.

For the transit visit, we find that there is a significant offset in
x-position relative to the other visits, that is, of greater than 0.1 pixels.
If uncorrected, this offset produces a slope in the extracted spectra which we
estimate to be on the order of 0.1% (1000 ppm), which is due to the
combination of the under-sampling of the spectrum and flat-field uncertainties
(discussed further below). In principle, the transit spectra could be
interpolated back to remove this slope; however, in practice the accuracy of
this interpolation is limited, leading to an additional uncertainty on the
transit spectrum. We re-interpolate the spectra obtained during the transit
visit to the reference in-eclipse exposure, and plot the results in Figure 3.
Here we see that the emission spectrum close to transit is dominated by large
variations between bins above the expected noise level, and is not usable.

Figure 3: Top: Common-mode corrected exoplanet spectra with propagated
1-$\sigma$ error bars as described in Section 2.2. The transit spectrum
extraction in blue is referred to as the nominal extraction. Bottom: Same
spectra, except for the nominal transit spectrum which has been re-
interpolated by the measured positional shift (computed in Section 2.4). The
systematic spectral slope is largely removed but residual noise is still
clearly present in the spectrum in the form of variation between spectral bins
with amplitude larger than the expected errors or planet signal.

We can first estimate the effect of flat-field errors on our spectra by using
the nominal flat-field uncertainty of 0.2% per pixel (Bushouse, 2008). This
corresponds to an uncertainty of 200 ppm on the pixel flux for a shift of 0.1
pixels.

To illustrate the effect of under-sampling on our extracted spectra, we test
its effect on a model stellar spectrum of WASP-12b. The model spectrum is
taken from the Kurucz atlas of stellar models, using nominal parameters for
the star WASP-12A (Kurucz, 1993). We produce stellar spectra at the resolution
of the data for a range of shifts in spectral pixels using the pysynphot
package (STScI Development Team, 2013). We then re-interpolate each shifted
spectrum to a reference unshifted spectrum, take the ratio between the
interpolated spectrum and the reference, and then compute the amplitude of the
remaining residuals. This amplitude, shown in Figure 4, can be seen as the
additional noise introduced by under-sampling of a shifted spectrum. Figure 4
includes the residual noise level of the eclipse spectrum (158 ppm), shown as
a line in red. Here we can see that under-sampling errors dominate the
spectral noise above shifts of 0.03 pixels.

Figure 4: Simulated residuals as caused by spectral under-sampling (green
curve). The computation is made by a convolution of a stellar spectrum at the
resolution of the data, which is subsequently interpolated for each positional
shift. The dashed red line is the noise level of the extracted eclipse
spectrum. This simulation does not include the propagation of flat-field
uncertainties, which will act to further increase the residual noise.

We also measure the positional shift of the spectrum on the detector between
the quadrature orbit and the in-eclipse orbit to be negligible at a precision
of 0.0011 pixels, as seen in Figure 2. This translates to an uncertainty of 11
ppm per pixel from the flat-field correction, which is well within the errors
on the quadrature spectrum. We can therefore conclude that the systematic
errors induced by positional-drift should be negligible for the quadrature
spectrum.

###  2.5 Residual noise

We estimate the quality of our systematic correction by comparing the in-
eclipse orbit corrected for systematic error to a flat line at each
wavelength. By measuring the scatter of the corrected in-eclipse orbits
compared to our expectation from photon noise, we can place an upper limit on
the residuals caused by any wavelength-dependent components of the systematic
errors over a short baseline.

We measure the scatter between the exposures at each wavelength for an
increasing number of wavelength bins, shown in Figure 5. For each wavelength
bin, we divide by a reference white-light curve from the sum of the other
wavelength bins and examine the residuals. We then measure the scatter of the
residuals at each wavelength, and report the average scatter for each
wavelength bin size. We find that the average scatter reaches close to photon
noise precision, around 20% above photon noise, for 15 or more wavelength bins
during the eclipse. We choose to bin by 6 pixels, corresponding to 18 total
wavelength bins over the full spectrum, to maximise the signal-to-noise ratio
(S/N) of our final spectra, while maintaining a precision of better than 20%
above photon noise.

Figure 5: Measured scatter of the residuals of the light curve taken from the
in-eclipse orbit and normalised by the white-light curve for various sizes of
wavelength bin (decreasing number of wavelength bins towards the right). The
scatter represents the average rms of the residuals from the light curve
across the wavelength bins for each choice of binning. The left y-axis shows
the residual rms, plotted as the thick red lines, while the right y-axis shows
the scatter as a percentage of the photon noise limit, plotted as the thin
purple lines. Dotted lines show the expected photon noise limit in each case.

###  2.6 Dilution correction

The WASP-12 system has been found to include a faint companion binary system
(WASP-12BC) to the main star (WASP-12A, Bergfors et al. 2011, 2013; Crossfield
et al. 2012). We correct our extracted planet spectra for the dilution by the
companion stars following the methods outlined in Stevenson et al. (2014a, b).
This correction is made by measuring the ratio of the stellar spectra which in
turn is done by simulating a range of models, accounting for their offset in
position on the WFC3 detector. We then divide their contribution from each of
our spectra, which can be found in Table 4 and is roughly equivalent to a
slope of about 100ppm across the whole wavelength range.

###  2.7 Stellar variability

We asses the impact of any variability in the spectra of either WASP-12A or
its companion stars WASP-12BC on our final planet spectra. We use an
extraction window that contains the flux from WASP-12BC and WASP-12A, as the
spectra bleed into each other on the detector (see Figure 6); this is why the
variability of the companions needs to be considered. While any photometric
variability in the stars is removed by the common mode correction, changes to
the stellar spectra are not and could be left as residuals in our final planet
spectra.

We estimate the variability of the WASP-12 system over the course of our
observations by comparing the second orbit of each visit. In Figure 7, we plot
the second orbit of each visit minus the average of the second orbits across
all visits. This subtraction removes the orbit-ramp that is constant between
orbits. The spread between the visits at this stage is approximately 0.13%
(top panel of Figure 7); however, a large fraction of this variability is
expected to be due to the changing emission of the planet itself. We remove
the predicted contribution from the thermal emission of WASP-12b, with the
resulting stellar contribution shown in Figure 7, based on our nominal
circulation model presented in Section 3.2. The remaining spread between
visits is 0.08%, which is close to the photon noise limit, with the remaining
variation consisting of a combination of changes in systematic errors and
stellar variability between visits. AS the planet model is uncertain, we adopt
a conservative upper limit of 0.1% on the variability of the WASP-12 stars
within our observing window.

We estimate the impact that 0.1% variability in the brightness of the WASP-12
system would have on our planet spectra. Assuming starspot temperatures of
300K cooler than the stellar surface of WASP-12A (Kreidberg et al., 2015), a
0.1% change in brightness could be achieved by a 0.6% change in spot covering
fraction between visits. This would result in a change to the slope of the
spectrum of the system of 50-100 ppm. Equivalently, a 1% change in the
brightness of the companions WASP-12BC would result in a 0.1% change in the
brightness of the system, leading to a similar slope in the extracted spectra
of 50-100 ppm between visits. An additional slope of this magnitude or lower
would be well within the uncertainties on the estimated blackbody
temperatures, within 150-200 K, and would not change the results of this work.

Figure 6: Cutout 2D image of a single representative exposure. The bright
spectrum in the centre is that of WASP-12A, and directly superimposed is the
combined spectrum of WASP-12BC, seen as the faint trace above the main trace.
Below these two are spectra of faint background stars. The locations where the
non-dispersed direct images would fall are marked as crosses, red for WASP-12A
and yellow for WASP-12BC. Figure 7: Brightness of exposures taken during the
second orbit of each visit, coloured by the corresponding visit and measured
relative to an average across all three visits, discussed further in Section
2.7. Green points are from the transit visit, orange from the quadrature
visit, and blue from the eclipse visit. The exposures are plotted in hours
from the beginning of the orbit. Top: Exposures from the second orbits as a
percentage change from the average second orbit across all visits. Bottom:
Same exposures with the predicted planetary contribution removed.

##  3 Results

Figure 8: Extracted emission spectra from quadrature and eclipse for WASP-12b,
normalised to the first spectral bin.

###  3.1 Extracted emission spectra

We apply our new method of extracting the longitudinally resolved spectra from
spectroscopic phase curves to the partial phase curve of WASP-12b. We extract
the dayside spectrum before and after eclipse, as well as, for the first time,
the quadrature spectrum of the planet (see Figure 8 and Table 3). We find that
the emission spectra from the dayside before and after eclipse are consistent,
and therefore we combine them into one spectrum that we refer to as the
eclipse or dayside spectrum, although we note this spectrum is not derived
using classical eclipse spectroscopy. We first fit the spectra with black-body
curves to estimate their corresponding temperatures from their spectral
slopes, including an additive constant as a free parameter in each fit to
account for the unknown absolute level of the spectra. We scale the
uncertainty on the final blackbody temperatures by the square root of the chi-
squared value to account for the quality of the fits. The best-fit dayside
black body is at 3186$\pm$677 K at a reduced $\chi^{2}_{r}$ of 2.73, and the
best-fit quadrature black-body is cooler at 2124$\pm$417 K with a
$\chi^{2}_{r}$ of 1.77. Our extracted spectra show a decrease in slope between
eclipse and quadrature, equivalent to a decrease in brightness temperature of
1062$\pm$795 K, which tentatively suggests weak redistribution.

###  3.2 Comparison to models

We compare our data to global circulation models (GCMs) of the atmosphere of
WASP-12b. The atmospheric circulation and thermal structure were simulated
using SPARC/MITgcm (Showman et al., 2009); further details on the models can
be seen in Parmentier et al. (2018). We produced two self-consistent forward
models, one at a solar composition and one with enhanced optical opacities (by
a factor of two). The enhanced optical opacity model was chosen to explore the
effect of larger temperature inversions at low pressures. We also post-process
our solar composition model with different opacities and physics removed in
order to test the effects of H-, dissociation, and molecular opacities on our
model spectra.

As our measured spectra are only known relative to a spectral bin, we choose
to normalise the spectra from both the data and models by subtracting the
average level, shown in Figure 9. We find that there is relative agreement
between the observed quadrature spectrum and each of the models, while the
observed eclipse spectrum appears slightly steeper than the models. We discuss
the possible source of this difference in Section 4.1. However, it should be
noted that the circulation models provide an adequate match to our
observations in both cases, given that the GCMs themselves are not fitted to
the data. For instance, these circulation models do not explore a large enough
range of parameters to reach a ‘fit quality’ comparable to a best-fit model
that would be generated from a retrieval framework.

Figure 9: Comparison of extracted exoplanet spectra to GCM results. All
measured spectra and models are normalised by the average of the spectrum
across the bandpass in order to allow a comparison to our relative spectra.
Top: Data for the eclipse (in green) as well as the dayside spectrum extracted
by Stevenson et al. (2014, in dashed black). Bottom: Extracted quadrature
spectrum (in orange). For both panels the models are shown for solar
composition (red), no-dissociation (blue), no H- (purple), no molecular
opacity (grey), and factor-two higher optical opacity (pink).

###  3.3 Comparison to dayside emission studies

We can also compare our extracted dayside emission spectrum to previously
published work using the same data (Swain et al., 2013; Stevenson et al.,
2014b). The three dayside emission spectra are shown in Figure 10. We can see
that in general there is a good agreement between the spectra, with slight
differences due to the choice of binning. This is notable because our approach
is very different from that of these two latter studies. In classical
secondary eclipse studies, such as those of Swain et al. (2013), Stevenson et
al. (2014b), the dayside emission is measured from the difference between the
out-of-eclipse orbits and the in-eclipse orbits. This is therefore an estimate
of the emission from the full dayside at planetary phase 0.5. Our method
instead measures the emission spectrum of the planet at phases $\sim$0.46 and
0.58 relative to a spectral bin. We find these spectra to be consistent,
likely because they are dominated by the same hotspot, and therefore combine
them into a single relative emission spectrum for the dayside.

The error bars on our fitted temperatures appear significantly larger than the
uncertainties on the brightness temperatures previously extracted for
WASP-12b, which were previously sufficiently small to be dominated by the
uncertainty on the stellar temperature. The additional uncertainty present in
our extracted temperatures originates from our method, which fits a black-body
temperature to a relative spectrum and must therefore fit for an additional
parameter which is the absolute offset of the black body.

We also show the absolute spectra extracted by Stevenson et al. (2014b)
compared to our circulation models also measured in absolute (Figure 11). Here
we can see that none of the models are able to match both the slope and the
absolute brightness of the spectrum.

Figure 10: Comparison of our dayside emission spectrum to previous those of
previous studies, all extracted from the same data with different pipelines
and techniques (see Section 2.2; Stevenson et al. 2014b; Swain et al. 2013).
Our extracted relative spectrum has been offset to match the absolute level of
Stevenson et al. (2014b). All of the works are in agreement, with additional
slight differences arising because of the choice of binning.  Figure 11:
Emission spectrum of WASP-12b as measured by HST/WFC3 (absolute measurement)
compared to global circulation models and black-body emission curves. The
Solar (red) and 2x Optical Opacity (pink) models are self-consistent forward
models. The remaining models include post-processing changes to the solar
model. No dissociation (blue) has no dissociation of molecules, No H- (purple)
has no H- opacities, No molecules (grey) has no molecular opacities and
therefore mimics an H- continuum spectrum.

##  4 Discussion

###  4.1 Emission spectra of WASP-12b compared to circulation models

We compare our data to a range of circulation models. Broadly, our data
accurately match the model prediction of decreasing temperature from eclipse
to quadrature due to the minimal day–night redistribution of flux. Our
extracted quadrature spectrum provides a constraint on the temperature through
the measured black-body temperature of 2124$\pm$417 K, but is not precise
enough to distinguish between our generated models.

Our relative dayside spectrum has the slope of a black-body spectrum at
3186$\pm$677K, in agreement with the absolute emission spectrum obtained by
Stevenson et al. (2014b). The comparison of both extractions of the dayside
spectrum to our nominal circulation model reveals a steeper spectrum than the
models (Figure 10, 11). This slope seen in the data may be indicative of
additional physics present in the climate of the planet that are not accounted
for in our models, such as non-equilibrium chemistry. We briefly explore two
possible physical effects that could be responsible for this increased slope,
an increased temperature and non-equilibrium water abundances.

One explanation for the steeper slope seen in the dayside spectrum could be a
genuinely hotter dayside temperature caused for instance by a steeper
temperature and/or pressure profile than predicted by our models. Each of our
models exhibits a temperature inversion due to a combination of optical
absorbers and reduced cooling by thermal dissociation (Lothringer et al.,
2018; Parmentier et al., 2018) although a large temperature inversion on
WASP-12b has not been detected (Kreidberg et al., 2015). Therefore, a steeper
temperature–pressure profile could originate from an increase in optical
opacity at low pressures, either due to a metallicity enhancement or non-
equilibrium abundances. We produced an additional circulation model with
enhanced optical opacities (by a factor of two), mimicking an enhancement of
metal compounds in the upper atmosphere (e.g. TiO), and forcing the
temperature–pressure profile to be more strongly inverted. However, we see
that the increased temperature at low pressures causes a net loss in flux from
the emission spectrum at wavelengths redder than 1.4$\mu$m (see the pink curve
in Figure 11). This is due to the increased dissociation of water at higher
temperatures. This dissociation causes the observed water emission to be
observed from deeper layers below the inversion where the atmosphere is
cooler. It is therefore unlikely that an increase in the local temperature
could cause the observed increased steepness of the emission spectrum, as the
chemical response by dissociation to that increased temperature acts to reduce
the slope of the spectrum.

Another explanation could be non-equilibrium processes. Our models compute the
dissociation fraction of water assuming equilibrium chemistry. However, the
transport of cool gas from the nightside of the planet to the hot dayside
could increase the contribution of water to our spectra if the dissociation of
water is slower than its advection. Vertical transport of water from the
deeper atmosphere is unlikely to play a dominant role, as the vertical winds
are much weaker than the horizontal winds, and the temperature of the dayside
is too hot for quenching to occur below $\sim$1 mbar (Oreshenko et al., 2017).
We estimate timescales for the thermal dissociation of water (as photo-
dissociation is not expected at 0.1 bar levels) using the methods of Tsai et
al. (2018). To first order, the dissociation and recombination timescales are
equal, because they are evaluated at equilibrium. We find that the rate-
limiting reaction for water dissociation in this case is the thermal
dissociation of H2 to produce H atoms. This reaction produces H atoms, which
allows water to dissociate through the very fast reaction of H + H2O -¿ OH +
H2. The timescale for the thermal dissociation of hydrogen is therefore the
same as the timescale for the dissociation of water at these temperatures.

We compare our estimated dissociation timescale to the advective timescale in
our models. In this context the advective timescale is the ratio of the
planet’s radius to the magnitude of the UV components of the wind speed, as
the vertical wind speeds are small. Figure 12 shows contours of the logarithm
of the ratio between the advective (wind) timescale and our calculated
hydrogen dissociation timescales, plotted here over the background temperature
map at three different pressures. In this figure, it can be seen that the
dayside advective timescale is always more than 100 times longer than the
dissociation timescale, and typically between $10^{3}$ and $10^{6}$ times
slower. Regions of the map with timescale ratios close to zero or negative can
only be seen in the cooler regions of the atmosphere where dissociation will
not take place. Therefore, any parcel of dissociated gas that could be carried
to these regions to remain out of equilibrium would cross many contours,
resulting in all of the dissociated gas recombining. We therefore conclude
that water and H2 likely reach their equilibrium dissociation fractions in the
atmospheres of UHJs despite the winds of a few km/s. Globally, the dayside
advective timescale is much longer than typical thermal dissociation
timescales, suggesting that the dayside is in equilibrium with respect to
other thermally dissociated molecules; however, this remains to be calculated
for each species.

Figure 12: Brightness temperature maps in 2D as produced by our GCM using
solar abundances at five different pressures. Contours show the ratio of the
simulated advective timescale over the predicted dissociation timescale for
H2, on a decimal log scale.

###  4.2 Comparison to Spitzer phase curves of WASP-12b

Previous studies of the phase curve of WASP-12b revealed a complicated system,
as data show that the planet deviates from simple model predictions. Results
from Spitzer photometry show a sinusoidal phase curve typical of an UHJ in the
first bandpass around 3.6$\mu$m with a hot dayside and cool nightside, but two
additional peaks at quadrature in the second bandpass at 4.5$\mu$m were found
(Cowan et al., 2012; Bell et al., 2019). We compare the brightness
temperatures of the planet’s emission in Spitzer to our measured black-body
temperatures derived from WFC3 data. We use the fit results from Bell et al.
(2019) to determine the equivalent brightness at each HST orbit from both
Spitzer bandpasses and convert this to a brightness temperature for the planet
(Table 2). This allows a quantitative comparison of our work with previous
studies. Differences between the results are expected because of the changes
in opacities between the HST wavelength range and those measured by Spitzer,
which lead to different pressure levels and species probed by the
observations. We present this comparison below.

The phase curves from Spitzer at 3.6 and 4.5 $\mu$m have been interpreted as
evidence of gas stripped from the planet, which emits in the infrared and is
responsible for the double peaked feature in the 4.5$\mu$m phase curve (Cowan
et al., 2012; Bell et al., 2019). This gas would need to be either
sufficiently cool or CO rich for it to be visible in the 4.5$\mu$m phase curve
but not at 3.6$\mu$m. Therefore, the natural prediction is that the double-
peaked nature of the 4.5$\mu$m phase curve should not be seen in the HST/G141
bandpass, as at these wavelengths CO is not a dominant opacity, and any gas
sufficiently cool to not be seen at 3.6 $\mu$m should also not affect the
spectrum around 1.4 $\mu$m. Our results are consistent with this hypothesis,
as we measure a significant decrease in temperature going from the dayside to
quadrature, in contrast to the double-peaked behaviour at 4.5$\mu$m.

While theoretically there is a CO band at 1.6$\mu$m, it is about 1000 times
weaker than that at 4.5$\mu$m, resulting in a deviation of only a few ppm in
the phase curve when extrapolating the Spitzer 4.5$\mu$m result. We are
therefore not able to determine whether there is any additional CO emission
from our spectra.

The 3.6$\mu$m phase curve exhibits different behaviour from that of the
4.5$\mu$m phase curve. At 3.6$\mu$m, the planet’s emission is dominated by
water, similar to the predictions for the HST WFC3/G141 bandpass. We therefore
expect the behaviour and amplitude of the phase curve at 3.6$\mu$m to be
similar to phase curves taken with HST WFC3/G141. The 3.6$\mu$m phase offset
measured in Spitzer is seen to vary, but our HST results are more consistent
with the observations from 2013 where only a small offset was seen. However,
the planetary phases at which we measure temperatures in this work do not
cover enough of the phase curve to measure a hot-spot offset, but remain
consistent with a small westward offset, if any at all.

Instrument |  | Dayside Tp |  | Quadrature Tp | Observation
---|---|---|---|---|---
| before | mean | after | K | Year
HST G141 | 3108$\pm$520 | 3186$\pm$677 | 3270$\pm$557 | 2124$\pm$417 | 2011
(this work) |  |  |  |  |
Spitzer Ch1 | 2720$\pm$49 | 2522$\pm$44 | 2319$\pm$74 | 2340$\pm$75 | 2010
(3.6$\mu$m) | 2400$\pm$70 | 2576$\pm$43 | 2746$\pm$51 | 2032$\pm$87 | 2013
Spitzer Ch2 | 2759$\pm$59 | 2721$\pm$49 | 2684$\pm$80 | 2904$\pm$84 | 2010
(4.5$\mu$m) | 2689$\pm$71 | 2612$\pm$47 | 2534$\pm$62 | 3024$\pm$91 | 2013
Table 2: Measured black-body temperatures from HST compared to brightness
temperatures in Spitzer, binned to the same phases, derived from Bell et al.
(2019). Our method uses the slope of the emission spectrum to estimate the
brightness temperature rather than the absolute emission, and does not
marginalise over a given model, and therefore the uncertainities on the final
temperatures are considerably larger.

###  4.3 Pointing stability between visits

We further explore whether the pointing drift between visits can be explained
and how this could be mitigated in future observations.

Our measured pointing offsets (shown in Figure 2) are within the nominal
expectation for the target acquisition precision and fine guidance sensor
(FGS) operation of the HST. The target acquisition was performed under the
default mode for each visit, with a re-acquisition occurring after each earth
occultation. This has an expected jitter of $\sim$7mas ( 0.05 pix) as well as
a $\sim$50mas drift over 12h or more (approximately 0.5 pixels) which is
attributed to changes in the thermal properties of the FGS (from HST Primer
for Cycle 28).

Hence, the measured drift within each orbit, as well as the offset between the
first visit (quadrature) and the second visit (transit), are within the limits
of nominal HST performance. Notably, the third visit (eclipse) is almost
perfectly aligned in position with the first visit (quadrature). We first
verified with STScI that no additional manoeuvres were performed and that FGS
acquisition was executed as normal. We also found that the reference star
HD258439, which was observed with two orbits at the end of each visit,
exhibited the same movement on the detector as WASP-12 between visits,
demonstrating that the FGS acquisition was not at fault. We therefore conclude
that some change in the instrument, such as in the optical path through the
location of the detector in the focal plane, occurred during the second visit
alone and is responsible for the observed shift of the spectrum. We confirmed
with STScI that such behaviour is within the expected performance of the
telescope. This also implies that the very close alignment between the first
and third visits was better than the nominal pointing precision of HST simply
by chance.

The likelihood that visits observed within a short time-span are well aligned
on the detector is not clear from our observations. However, it may be
possible in the future to ensure that the position of the spectrum on the
detector is well aligned with a previous visit, for example through routines
such as a ”real time interaction” target acquisition, which are not
recommended due to the additional requirements on scheduling and man hours
(HST Primer for Cycle 28, 2020).

###  4.4 Partial phase curves in the future with HST, JWST, and other
spectroscopic space facilities

Full phase curves remain the best choice of method for obtaining
longitudinally resolved absolute emission spectra of exoplanets in particular
phase curves (i.e. those anchored by an eclipse at the start and end of the
visit in order to allow for evaluation of any residual systematic errors or
drift). Currently, HST can only produce full phase curves for planets with
periods of $\sim$1 day, and JWST is only capable of this for planets with
periods of less than 2 days, and so an alternative is needed, particularly for
longer-period planets. Partial phase curves are a cheap alternative that may
allow for some of the same science to be accomplished, in particular when
looking for changes in spectral features with longitude.

Archival data of transits and eclipses will only be accessible with this
technique should the chance alignment of the dispersed spectra on the detector
be better than 0.1 pixels, assuming the visits were already taken with
identical observing modes. Performance may be different for spatially scanned
data, as there can be additional drift of the telescope within an exposure
depending on the adopted scan rate of the telescope. The typical performance
of the spatial scanning mode has been shown to result in drifts below
$\sim$15mas ($\sim$0.11 pixels) for 77% of data taken in this mode (Stevenson,
& Fowler, 2019). Further study would be needed to verify that performance at
this level, or with a lower pointing precision, would be sufficient to analyse
spatially scanned data with this technique. However, it is likely that at
least 10% of observations will not have a sufficient pointing stability for
our method, as these observations are deemed to have failed, with a pointing
drift of ¿1 pixel (Stevenson, & Fowler, 2019).

Both JWST and the ARIEL mission are scheduled to observe phase curves of
exoplanets in the near future. As JWST observations are expected to operate at
an increased pointing precision relative to HST of better than 17mas scatter
per axis (JWST User Documentation), this technique should be applicable to
JWST data. JWST will be in high demand, so full phase curves are only expected
to be taken towards a few key targets. Additionally, these targets will be
limited to short-period planets, as the single visit duration is limited to
48h. Therefore, common mode techniques such as ours will allow for some
climate studies of planets for which full phase curves are not taken (e.g. see
Stevenson 2020 for specific applications to JWST and non-transiting planets).
Although the live performance of the telescope will not be known until data
are analysed, in particular relating to any wavelength-dependent noise
components, common-mode methods such as the technique presented here will be
needed to characterise the performance alongside classical fits to the
systematic errors.

In summary partial phase curves will likely require dedicated observing
programs to succeed, but should be considered for future spectroscopic space-
based facilities, such as JWST and ARIEL. We recommend that special care be
taken when observing targets in eclipse and transit in the future, as
additional science beyond the goals of the program may be possible if their
alignment on the detector is ensured.

##  5 Conclusions

We present the first emission spectrum of an exoplanet measured in quadrature
outside of a phase curve. We measure the brightness as T=2124$\pm$417 K. We
present our new technique for extracting planet spectra at different phases
from spectroscopic phase curves based on common mode methods. We show how this
technique succeeds in extracting spectra of WASP-12b obtained with HST/WFC3
G141 in emission at eclipse and quadrature, but also how it fails at transit
where we find the data are offset in position on the detector.

We obtain relative emission spectra of WASP-12b at eclipse and quadrature, and
find that the planet exhibits a decrease in temperature with longitude
expected for nominal day–night redistribution of 1062$\pm$516 K. This result
is in line with the findings from full-orbit Spitzer phase curves, which
suggest the presence of cool gas in the system that is not visible at shorter
wavelengths (Bell et al., 2019).

We find that our extracted spectrum is steeper than expected from global
circulation models, and while we do not have a clear explanation for this, we
find that this cannot be explained by non-equilibrium water fractions or
increased local temperature. We also calculate from our global circulation
models that the dayside atmospheric pressures probed by our observations
should be in equilibrium with respect to thermal dissociation of water and
hydrogen.

We outline how to achieve success with this data analysis technique in the
future, either through continuous phase curve observations or by careful
monitoring of the PSF of individual visits in a partial phase curve. This will
likely be a useful observing method for JWST and ARIEL, where partial phase
curves have a greater chance of succeeding. Our new technique may also create
an opportunity for further studies on archival data, as well verification of
existing results from full-orbit phase curves.

## Acknowledgements

We would like to thank the STScI helpdesk and in particular Varun Bajaj for
fielding our many questions on the WFC3 performance. We would also like the
thank Dr. Channon Visscher for their insights on dissociation timescales.

J.M.D acknowledges support from the Amsterdam Academic Alliance (AAA) Program,
and the European Research Council (ERC) European Union’s Horizon 2020 research
and innovation programme (grant agreement no. 679633; Exo-Atmos). This work is
part of the research programme VIDI New Frontiers in Exoplanetary Climatology
with project number 614.001.601, which is (partly) financed by the Dutch
Research Council (NWO).

## References

  * Arcangeli et al. (2018) Arcangeli, J., Désert, J.-M., Line, M. R., et al. 2018, ApJ, 855, L30
  * Arcangeli et al. (2019) Arcangeli, J., Désert, J.-M., Parmentier, V., et al. 2019, A&A, 625, A136
  * Baxter et al. (2020) Baxter, C., Désert, J.-M., Parmentier, V., et al. 2020, A&A, 639, A36
  * Bell et al. (2017) Bell, T. J., Nikolov, N., Cowan, N. B., et al. 2017, ApJ, 847, L2
  * Bell et al. (2019) Bell, T. J., Zhang, M., Cubillos, P. E., et al. 2019, MNRAS, 489, 1995
  * Borucki et al. (2009) Borucki, W. J., Koch, D., Jenkins, J., et al. 2009, Science, 325, 709
  * Bergfors et al. (2011) Bergfors, C., Brandner, W., Henning, T., et al. 2011, The Astrophysics of Planetary Systems: Formation, Structure, and Dynamical Evolution, 397
  * Bergfors et al. (2013) Bergfors, C., Brandner, W., Daemgen, S., et al. 2013, MNRAS, 428, 182
  * Bushouse (2008) Bushouse, H. 2008, WFC3 Instrument Science Report 2008-28, 14 pages
  * Charbonneau et al. (2005) Charbonneau, D., Allen, L. E., Megeath, S. T., et al. 2005, ApJ, 626, 523
  * Cowan et al. (2012) Cowan, N. B., Machalek, P., Croll, B., et al. 2012, ApJ, 747, 82
  * Crossfield et al. (2012) Crossfield, I. J. M., Hansen, B. M. S., & Barman, T. 2012, ApJ, 746, 46
  * Deming et al. (2006) Deming, D., Harrington, J., Seager, S., et al. 2006, ApJ, 644, 560
  * Deming et al. (2013) Deming, D., Wilkins, A., McCullough, P., et al. 2013, ApJ, 774, 95
  * Mikal-Evans et al. (2019) Mikal-Evans, T., Sing, D. K., Goyal, J. M., et al. 2019, MNRAS, 488, 2222
  * HST Primer for Cycle 28 (2020) Space Telescope Science Institute 2020, HST Primer for Cycle 28
  * Kitzmann et al. (2018) Kitzmann, D., Heng, K., Rimmer, P. B., et al. 2018, ApJ, 863, 183
  * Knutson et al. (2007) Knutson, H. A., Charbonneau, D., Allen, L. E., et al. 2007, Nature, 447, 183
  * Kreidberg et al. (2015) Kreidberg, L., Line, M. R., Bean, J. L., et al. 2015, ApJ, 814, 66
  * Kreidberg et al. (2018) Kreidberg, L., Line, M. R., Parmentier, V., et al. 2018, arXiv:1805.00029
  * Kurucz (1993) Kurucz, R. L. 1993, VizieR Online Data Catalog, VI/39
  * Lothringer et al. (2018) Lothringer, J. D., Barman, T., & Koskinen, T. 2018, ApJ, 866, 27.
  * Mandell et al. (2013) Mandell, A. M., Haynes, K., Sinukoff, E., et al. 2013, ApJ, 779, 128
  * Mansfield et al. (2018) Mansfield, M., Bean, J. L., Line, M. R., et al. 2018, AJ, 156, 10
  * Oreshenko et al. (2017) Oreshenko, M., Lavie, B., Grimm, S. L., et al. 2017, ApJ, 847, L3
  * Parmentier et al. (2018) Parmentier, V., Line, M. R., Bean, J. L., et al. 2018, A&A, 617, A110
  * STScI Development Team (2013) STScI Development Team 2013, Astrophysics Source Code Library
  * Showman et al. (2009) Showman, A. P., Fortney, J. J., Lian, Y., et al. 2009, ApJ, 699, 564
  * Snellen et al. (2009) Snellen, I. A. G., de Mooij, E. J. W., & Albrecht, S. 2009, Nature, 459, 543
  * Stevenson et al. (2014a) Stevenson, K. B., Bean, J. L., Seifahrt, A., et al. 2014, AJ, 147, 161
  * Stevenson et al. (2014b) Stevenson, K. B., Bean, J. L., Madhusudhan, N., et al. 2014, ApJ, 791, 36
  * Stevenson et al. (2014c) Stevenson, K.b., Désert, J.-M., Line, M. R., et al. 2014, Science, 346, 838
  * Stevenson et al. (2017) Stevenson, K. B., Line, M. R., Bean, J. L., et al. 2017, AJ, 153, 68
  * Stevenson, & Fowler (2019) Stevenson, K. B., & Fowler, J. 2019, Space Telescope WFC Instrument Science Report
  * Stevenson (2020) Stevenson, K. B. & Space Telescopes Advanced Research Group on the Atmospheres of Transiting Exoplanets 2020, ApJ, 898, L35. doi:10.3847/2041-8213/aba68c
  * Swain et al. (2013) Swain, M., Deroo, P., Tinetti, G., et al. 2013, Icarus, 225, 432
  * Tsai et al. (2018) Tsai, S.-M., Kitzmann, D., Lyons, J. R., et al. 2018, ApJ, 862, 31
  * Tsiaras et al. (2016) Tsiaras, A., Waldmann, I. P., Rocchetto, M., et al. 2016, ApJ, 832, 202
  * Tsiaras & Ozden (2019) Tsiaras, A., & Ozden, J. 2019, arXiv e-prints, arXiv:1908.01692
  * Wakeford et al. (2016) Wakeford, H. R., Sing, D. K., Evans, T., et al. 2016, ApJ, 819, 10
  * Zhou et al. (2017) Zhou, Y., Apai, D., Lew, B. W. P., et al. 2017, AJ, 153, 243

## Appendix

Central | Eclipse | (ppm) | Quad | (ppm)
---|---|---|---|---
$\lambda$ | Fp/Fs | Error | Fp/Fs | Error
1.14 | -750 | 159 | -553 | 224
1.16 | -34 | 152 | 38 | 216
1.19 | -602 | 150 | -62 | 212
1.22 | -390 | 148 | 89 | 210
1.25 | -617 | 149 | -506 | 211
1.27 | -590 | 147 | 285 | 208
1.30 | -69 | 147 | 70 | 207
1.33 | -69 | 147 | -577 | 208
1.35 | 14 | 150 | -204 | 213
1.38 | 269 | 152 | 126 | 215
1.41 | 131 | 154 | -2 | 217
1.44 | 287 | 157 | 491 | 222
1.46 | 276 | 161 | -85 | 227
1.49 | 143 | 162 | -14 | 229
1.52 | 891 | 167 | 242 | 235
1.55 | 76 | 171 | -157 | 241
1.57 | 700 | 174 | 543 | 246
1.60 | 332 | 180 | 274 | 255
Table 3: Extracted eclipse and quadrature spectra. Wavelength | Dilution (%) | Error
---|---|---
1.133 | 3.39 | 0.13
1.160 | 4.68 | 0.13
1.187 | 4.81 | 0.13
1.214 | 5.04 | 0.14
1.242 | 5.39 | 0.14
1.269 | 5.71 | 0.15
1.296 | 5.89 | 0.15
1.323 | 5.97 | 0.15
1.350 | 6.14 | 0.17
1.377 | 5.55 | 0.18
1.405 | 5.74 | 0.20
1.432 | 5.39 | 0.21
1.459 | 5.51 | 0.23
1.486 | 5.74 | 0.24
1.513 | 5.70 | 0.23
1.541 | 6.09 | 0.26
1.568 | 6.47 | 0.26
1.595 | 6.77 | 0.28
Table 4: Dilution correction for the contribution of WASP-12BC to the planet
spectra. The dilution here is defined as the flux of the companions relative
to the flux of WASP-12A, shown here as a percentage.