  Observations of exoplanet atmospheres in high resolution have the potential
to resolve individual planetary absorption lines, despite the issues associated
with ground-based observations. The removal of contaminating stellar and
telluric absorption features is one of the most sensitive steps required to
reveal the planetary spectrum and, while many different detrending methods
exist, it remains difficult to directly compare the performance and efficacy of
these methods. Additionally, though the standard cross-correlation method
enables robust detection of specific atmospheric species, it only probes for
features that are expected a priori. Here we present a novel methodology using
Gaussian process (GP) regression to directly model the components of
high-resolution spectra, which partially addresses these issues. We use two
archival CRIRES/VLT data sets as test cases, observations of the hot Jupiters
HD 189733 b and 51 Pegasi b, recovering injected signals with average line
contrast ratios of $\sim 4.37 \times 10^{-3}$ and $\sim 1.39 \times 10^{-3}$,
and planet radial velocities $\Delta K_\mathrm{p} =1.45 \pm
1.53\,\mathrm{km\,s^{-1}}$ and $\Delta
K_\mathrm{p}=0.12\pm0.12\,\mathrm{km\,s^{-1}}$ from the injection velocities
respectively. In addition, we demonstrate an application of the GP method to
assess the impact of the detrending process on the planetary spectrum, by
implementing injection-recovery tests. We show that standard detrending methods
used in the literature negatively affect the amplitudes of absorption features
in particular, which has the potential to render retrieval analyses inaccurate.
Finally, we discuss possible limiting factors for the non-detections using this
method, likely to be remedied by higher signal-to-noise data.
