of $\approx-4.5\pm 1.0$ km$\cdot$s-1. Similarly, the H2O $\log_{10}$(VMR)
abundance is retrieved to be $\approx-2.5\pm 0.5$, close to what we retrieve,
or $\approx-5.0\pm 0.5$, depending on the study. Another similar discrepancy
can be found with CH4, although this molecule has overall been less studied
than H2O. In all cases, the cause for these discrepancies has, to our
knowledge, yet to be identified. For the molecular abundances, these
discrepancies might be explained by overfitting retrievals, the use of a
biased retrieval framework, or to the data reduction method used. In all
cases, we suggest that including the complex 3-D-induced line shapes into
models, or a more formal-based approach for the choice the log-likelihood
equation and preparing pipelines used, could help solving this issue. In
addition, we highlight the correlation between the mid-transit time and the
rest velocity, and argue in favour of also retrieving the former – even if it
is well-known – in order to ensure more accurate estimations of
$V_{\mathrm{rest}}$.

In this work we focused on the presentation of our retrieval framework and its
comparison with a CCF analysis. The model we chose for the analysis of these
HD 189733 b transit spectra is a relatively simple one, but we consider it is
enough to demonstrate the capabilities of our framework. Using more complex
models taking into account terminator asymmetry and the evolution of the
transmission lines shape with time for a more accurate analysis of transit
spectra are obvious next steps. This added complexity might actually be
necessary to accurately retrieve atmospheric properties in high-resolution
data where species’ lines are abundant and overlapping. Indeed, while HD
189733 b is a well-studied object, it seems that there are important
discrepancies between different works regarding most notably the observed
blueshift of the planet spectral absorption as well as the H2O abundance.
These two parameters are crucial in our understanding of hot jupiters
atmospheric dynamics and formation process. Finding the origin of these
discrepancies and reconciling these results will be important for obtaining a
more accurate view of this planet.

This research has made use of the Spanish Virtual Observatory
(http://svo.cab.inta-csic.es) supported by the MINECO/FEDER through grant
AyA2017-84089.7. This research has made use of the NASA Exoplanet Archive,
which is operated by the California Institute of Technology, under contract
with the National Aeronautics and Space Administration under the Exoplanet
Exploration Program. This research has made use of the Exoplanet Follow-up
Observation Program (ExoFOP; DOI: 10.26134/ExoFOP5) website, which is operated
by the California Institute of Technology, under contract with the National
Aeronautics and Space Administration under the Exoplanet Exploration Program.
The authors thank M. Zechmeister and L. Nortmann for their insights on the
CARACAL reduction pipeline and the CARMENES time stamps. D.B. thanks L. Pino
for informing him about the correct term to use for the Hadamard product. D.B.
also thanks C. Bousardo for her additional proofreading of the article. A.S.L.
acknowledges funding from the European Research Council under the European
Union’s Horizon 2020 research and innovation program under grant agreement No
694513 and acknowledges financial support from the Severo Ochoa grant
CEX2021-001131-S funded by MCIN/AEI/ 10.13039/501100011033. P.M. thanks J.
Wardenier for running comparison calculations with gCMCRT to benchmark pRT-
Orange. P.M. also thanks F. Debras for extracting GCM atmospheric structures
from public tables for use in pRT-Orange.

## References

  * Addison et al. (2019) Addison, B., Wright, D. J., Wittenmyer, R. A., et al. 2019, Publications of the Astronomical Society of the Pacific, 131, 115003, doi: 10.1088/1538-3873/ab03aa
  * Alonso-Floriano et al. (2019) Alonso-Floriano, F., Sánchez-López, A., Snellen, I., et al. 2019, Astronomy & Astrophysics, 621, A74
  * Atreya et al. (2020) Atreya, S. K., Hofstadter, M. H., In, J. H., et al. 2020, Space Science Reviews, 216, 1
  * Barber et al. (2014) Barber, R. J., Strange, J. K., Hill, C., et al. 2014, MNRAS, 437, 1828, doi: 10.1093/mnras/stt2011
  * Barstow (2020) Barstow, J. K. 2020, Monthly Notices of the Royal Astronomical Society, 497, 4183
  * Barstow et al. (2016) Barstow, J. K., Aigrain, S., Irwin, P. G., & Sing, D. K. 2016, The Astrophysical Journal, 834, 50
  * Barstow et al. (2014) Barstow, J. K., Aigrain, S., Irwin, P. G. J., et al. 2014, The Astrophysical Journal, 786, 154, doi: 10.1088/0004-637X/786/2/154
  * Baudino et al. (2015) Baudino, J. L., Bézard, B., Boccaletti, A., et al. 2015, A&A, 582, A83, doi: 10.1051/0004-6361/201526332
  * Baudino et al. (2017) Baudino, J. L., Mollière, P., Venot, O., et al. 2017, The Astrophysical Journal, 850, 150, doi: 10.3847/1538-4357/aa95be
  * Bézard et al. (2022) Bézard, B., Charnay, B., & Blain, D. 2022, Nature Astronomy, 6, 537
  * Birkby et al. (2013) Birkby, J., De Kok, R., Brogi, M., et al. 2013, Monthly Notices of the Royal Astronomical Society: Letters, 436, L35
  * Birkby et al. (2017) Birkby, J., de Kok, R., Brogi, M., Schwarz, H., & Snellen, I. 2017, The Astronomical Journal, 153, 138
  * Blain et al. (2021) Blain, D., Charnay, B., & Bézard, B. 2021, A&A, 646, A15, doi: 10.1051/0004-6361/202039072
  * Bonomo et al. (2017) Bonomo, A. S., Desidera, S., Benatti, S., et al. 2017, A&A, 602, A107, doi: 10.1051/0004-6361/201629882
  * Boucher et al. (2021) Boucher, A., Darveau-Bernier, A., Pelletier, S., et al. 2021, The Astronomical Journal, 162, 233, doi: 10.3847/1538-3881/ac1f8e
  * Brogi et al. (2016) Brogi, M., de Kok, R. J., Albrecht, S., et al. 2016, The Astrophysical Journal, 817, 106, doi: 10.3847/0004-637X/817/2/106
  * Brogi et al. (2018) Brogi, M., Giacobbe, P., Guilluy, G., et al. 2018, Astronomy & Astrophysics, 615, A16
  * Brogi et al. (2017) Brogi, M., Line, M., Bean, J., Désert, J.-M., & Schwarz, H. 2017, The Astrophysical Journal Letters, 839, L2, doi: 10.3847/2041-8213/aa6933
  * Brogi & Line (2019) Brogi, M., & Line, M. R. 2019, The Astronomical Journal, 157, 114, doi: 10.3847/1538-3881/aaffd3
  * Brogi et al. (2012) Brogi, M., Snellen, I. A., De Kok, R. J., et al. 2012, Nature, 486, 502
  * Brogi et al. (2023) Brogi, M., Emeka-Okafor, V., Line, M. R., et al. 2023, The Astronomical Journal, 165, 91, doi: 10.3847/1538-3881/acaf5c
  * Buchner et al. (2014) Buchner, J., Georgakakis, A., Nandra, K., et al. 2014, A&A, 564, A125, doi: 10.1051/0004-6361/201322971
  * Caballero et al. (2016) Caballero, J., Guàrdia, J., del Fresno, M. L., et al. 2016, in Observatory operations: strategies, processes, and systems VI, Vol. 9910, International Society for Optics and Photonics, 99100E
  * Cabot et al. (2018) Cabot, S. H. C., Madhusudhan, N., Hawker, G. A., & Gandhi, S. 2018, Monthly Notices of the Royal Astronomical Society, 482, 4422, doi: 10.1093/mnras/sty2994
  * Changeat et al. (2022) Changeat, Q., Edwards, B., Al-Refaie, A. F., et al. 2022, The Astrophysical Journal Supplement Series, 260, 3, doi: 10.3847/1538-4365/ac5cc2
  * Charnay et al. (2018) Charnay, B., Bézard, B., Baudino, J. L., et al. 2018, The Astrophysical Journal, 854, 172, doi: 10.3847/1538-4357/aaac7d
  * Cheverall et al. (2023) Cheverall, C. J., Madhusudhan, N., & Holmberg, M. 2023, Monthly Notices of the Royal Astronomical Society, 522, 661, doi: 10.1093/mnras/stad648
  * Chiavassa & Brogi (2019) Chiavassa, & Brogi. 2019, A&A, 631, A100, doi: 10.1051/0004-6361/201936566
  * Chubb & Min (2022) Chubb, K. L., & Min, M. 2022, A&A, 665, A2, doi: 10.1051/0004-6361/202142800
  * Cont et al. (2022a) Cont, D., Yan, F., Reiners, A., et al. 2022a, arXiv preprint arXiv:2209.10618
  * Cont et al. (2022b) —. 2022b, A&A, 657, L2
  * Csizmadia (2020) Csizmadia, S. 2020, Monthly Notices of the Royal Astronomical Society, 496, 4442, doi: 10.1093/mnras/staa349
  * Damiano et al. (2019) Damiano, M., Micela, G., & Tinetti, G. 2019, The Astrophysical Journal, 878, 153, doi: 10.3847/1538-4357/ab22b2
  * Danielski et al. (2014) Danielski, C., Deroo, P., Waldmann, I., et al. 2014, The Astrophysical Journal, 785, 35
  * Debras et al. (2023) Debras, F., Klein, B., Donati, J.-F., et al. 2023, Monthly Notices of the Royal Astronomical Society, 527, 566, doi: 10.1093/mnras/stad2608
  * Dobbs-Dixon & Agol (2013) Dobbs-Dixon, I., & Agol, E. 2013, Monthly Notices of the Royal Astronomical Society, 435, 3159, doi: 10.1093/mnras/stt1509
  * Drummond et al. (2018) Drummond, B., Mayne, N. J., Manners, J., et al. 2018, ApJ, 869, 28, doi: 10.3847/1538-4357/aaeb28
  * ExoFOP website (2022) ExoFOP website. 2022, ExoFOP website, https://exofop.ipac.caltech.edu/tess/target.php?id=256364928, doi: 10.26134/ExoFOP3
  * Feng et al. (2018) Feng, Y. K., Robinson, T. D., Fortney, J. J., et al. 2018, The Astronomical Journal, 155, 200, doi: 10.3847/1538-3881/aab95c
  * Feroz et al. (2009) Feroz, F., Hobson, M. P., & Bridges, M. 2009, Monthly Notices of the Royal Astronomical Society, 398, 1601, doi: 10.1111/j.1365-2966.2009.14548.x
  * Finnerty et al. (2024) Finnerty, L., Xuan, J. W., Xin, Y., et al. 2024, The Astronomical Journal, 167, 43, doi: 10.3847/1538-3881/ad1180
  * Flowers et al. (2019) Flowers, E., Brogi, M., Rauscher, E., Kempton, E. M.-R., & Chiavassa, A. 2019, The Astronomical Journal, 157, 209, doi: 10.3847/1538-3881/ab164c
  * Gandhi et al. (2019) Gandhi, S., Madhusudhan, N., Hawker, G., & Piette, A. 2019, The Astronomical Journal, 158, 228, doi: 10.3847/1538-3881/ab4efc
  * Gibson et al. (2022) Gibson, N. P., Nugroho, S. K., Lothringer, J., Maguire, C., & Sing, D. K. 2022, Monthly Notices of the Royal Astronomical Society, 512, 4618, doi: 10.1093/mnras/stac091
  * Gibson et al. (2020) Gibson, N. P., Merritt, S., Nugroho, S. K., et al. 2020, Monthly Notices of the Royal Astronomical Society, 493, 2215, doi: 10.1093/mnras/staa228
  * Hargreaves et al. (2020) Hargreaves, R. J., Gordon, I. E., Rey, M., et al. 2020, ApJS, 247, 55, doi: 10.3847/1538-4365/ab7a1a
  * Harris et al. (2006) Harris, G. J., Tennyson, J., Kaminsky, B. M., Pavlenko, Y. V., & Jones, H. R. A. 2006, MNRAS, 367, 400, doi: 10.1111/j.1365-2966.2005.09960.x
  * Hawker et al. (2018) Hawker, G. A., Madhusudhan, N., Cabot, S. H., & Gandhi, S. 2018, The Astrophysical Journal Letters, 863, L11
  * Hoeijmakers et al. (2022) Hoeijmakers, H., Kitzmann, D., Morris, B., et al. 2022, arXiv preprint arXiv:2210.12847
  * Hoeijmakers et al. (2018) Hoeijmakers, H. J., Ehrenreich, D., Heng, K., et al. 2018, Nature, 560, 453
  * Hubble Space Telescope User Documentation (2022) Hubble Space Telescope User Documentation. 2022, WFC3 Instrument Handbook, https://hst-docs.stsci.edu/wfc3ihb/chapter-8-slitless-spectroscopy-with-wfc3/8-1-grism-overview
  * James Webb Space Telescope User Documentation (2022) James Webb Space Telescope User Documentation. 2022, James Webb Space Telescope User Documentation, https://jwst-docs.stsci.edu/
  * Kempton et al. (2018) Kempton, E. M.-R., Bean, J. L., Louie, D. R., et al. 2018, Publications of the Astronomical Society of the Pacific, 130, 114401, doi: 10.1088/1538-3873/aadf6f
  * Kesseli & Snellen (2021) Kesseli, A. Y., & Snellen, I. 2021, The Astrophysical Journal Letters, 908, L17
  * Kesseli et al. (2020) Kesseli, A. Y., Snellen, I., Alonso-Floriano, F., Molliere, P., & Serindag, D. 2020, The Astronomical Journal, 160, 228
  * Kesseli et al. (2022) Kesseli, A. Y., Snellen, I., Casasayas-Barris, N., Mollière, P., & Sánchez-López, A. 2022, The Astronomical Journal, 163, 107
  * Kilpatrick et al. (2020) Kilpatrick, B. M., Kataria, T., Lewis, N. K., et al. 2020, The Astronomical Journal, 159, 51, doi: 10.3847/1538-3881/ab6223
  * Klein et al. (2023) Klein, B., Debras, F., Donati, J.-F., et al. 2023, Monthly Notices of the Royal Astronomical Society, 527, 544, doi: 10.1093/mnras/stad2607
  * Landman et al. (2021) Landman, R., Sánchez-López, A., Mollière, P., et al. 2021, Astronomy & Astrophysics, 656, A119
  * Langeveld et al. (2022) Langeveld, A. B., Madhusudhan, N., & Cabot, S. H. C. 2022, Monthly Notices of the Royal Astronomical Society, 514, 5192, doi: 10.1093/mnras/stac1539
  * Lee et al. (2022) Lee, E. K. H., Wardenier, J. P., Prinoth, B., et al. 2022, ApJ, 929, 180, doi: 10.3847/1538-4357/ac61d6
  * Lee et al. (2012) Lee, J.-M., Fletcher, L. N., & Irwin, P. G. J. 2012, Monthly Notices of the Royal Astronomical Society, 420, 170, doi: 10.1111/j.1365-2966.2011.20013.x
  * Lee et al. (2014) Lee, J.-M., Irwin, P. G. J., Fletcher, L. N., Heng, K., & Barstow, J. K. 2014, The Astrophysical Journal, 789, 14, doi: 10.1088/0004-637X/789/1/14
  * Lin & Gu (2004) Lin, D. N. C., & Gu, P. G. 2004, in Revista Mexicana de Astronomia y Astrofisica Conference Series, Vol. 22, Revista Mexicana de Astronomia y Astrofisica Conference Series, ed. G. Garcia-Segura, G. Tenorio-Tagle, J. Franco, & H. W. Yorke, 95–98
  * Line et al. (2014) Line, M. R., Knutson, H., Wolf, A. S., & Yung, Y. L. 2014, The Astrophysical Journal, 783, 70, doi: 10.1088/0004-637X/783/2/70
  * Lines et al. (2018) Lines, S., Mayne, N. J., Boutle, I. A., et al. 2018, A&A, 615, A97, doi: 10.1051/0004-6361/201732278
  * Louden & Wheatley (2015) Louden, T., & Wheatley, P. J. 2015, The Astrophysical Journal Letters, 814, L24
  * MacDonald et al. (2020) MacDonald, R. J., Goyal, J. M., & Lewis, N. K. 2020, The Astrophysical Journal Letters, 893, L43, doi: 10.3847/2041-8213/ab8238
  * Madhusudhan et al. (2014a) Madhusudhan, N., Amin, M. A., & Kennedy, G. M. 2014a, ApJ, 794, L12, doi: 10.1088/2041-8205/794/1/L12
  * Madhusudhan et al. (2014b) Madhusudhan, N., Crouzet, N., McCullough, P. R., Deming, D., & Hedges, C. 2014b, The Astrophysical Journal Letters, 791, L9, doi: 10.1088/2041-8205/791/1/L9
  * Madhusudhan & Seager (2009) Madhusudhan, N., & Seager, S. 2009, The Astrophysical Journal, 707, 24, doi: 10.1088/0004-637X/707/1/24
  * Mandel & Agol (2002) Mandel, K., & Agol, E. 2002, The Astrophysical Journal, 580, L171, doi: 10.1086/345520
  * McCullough et al. (2014) McCullough, P. R., Crouzet, N., Deming, D., & Madhusudhan, N. 2014, The Astrophysical Journal, 791, 55, doi: 10.1088/0004-637X/791/1/55
  * Merritt et al. (2020) Merritt, S. R., Gibson, N. P., Nugroho, S. K., et al. 2020, Astronomy & Astrophysics, 636, A117
  * Merritt et al. (2021) —. 2021, Monthly Notices of the Royal Astronomical Society, 506, 3853
  * Million (2007) Million, E. 2007, in The Hadamard Product, 1 Introduction and Basic Results.  https://api.semanticscholar.org/CorpusID:3086933
  * Mollière et al. (2019) Mollière, P., Wardenier, J. P., van Boekel, R., et al. 2019, A&A, 627, A67, doi: 10.1051/0004-6361/201935470
  * Mollière et al. (2022) Mollière, P., Molyarova, T., Bitsch, B., et al. 2022, The Astrophysical Journal, 934, 74, doi: 10.3847/1538-4357/ac6a56
  * Mordasini et al. (2016) Mordasini, C., van Boekel, R., Mollière, P., Henning, T., & Benneke, B. 2016, The Astrophysical Journal, 832, 41, doi: 10.3847/0004-637X/832/1/41
  * Nasa Exoplanet Archive (2023) Nasa Exoplanet Archive. 2023, Planetary Systems Table, https://exoplanetarchive.ipac.caltech.edu/cgi-bin/TblView/nph-tblView?app=ExoTbls&config=PS, doi: 10.26133/NEA12
  * Nugroho et al. (2021) Nugroho, S. K., Kawahara, H., Gibson, N. P., et al. 2021, The Astrophysical Journal Letters, 910, L9
  * Oshagh et al. (2020) Oshagh, M., Bauer, F. F., Lafarga, M., et al. 2020, A&A, 643, A64, doi: 10.1051/0004-6361/202039213
  * Paredes et al. (2021) Paredes, L. A., Henry, T. J., Quinn, S. N., et al. 2021, The Astronomical Journal, 162, 176, doi: 10.3847/1538-3881/ac082a
  * Pelletier et al. (2021) Pelletier, S., Benneke, B., Darveau-Bernier, A., et al. 2021, The Astronomical Journal, 162, 73, doi: 10.3847/1538-3881/ac0428
  * Pinhas et al. (2018) Pinhas, A., Madhusudhan, N., Gandhi, S., & MacDonald, R. 2018, Monthly Notices of the Royal Astronomical Society, 482, 1485, doi: 10.1093/mnras/sty2544
  * Pino et al. (2018) Pino, L., Ehrenreich, David, Wyttenbach, Aurélien, et al. 2018, A&A, 612, A53, doi: 10.1051/0004-6361/201731244
  * Pont et al. (2013) Pont, F., Sing, D. K., Gibson, N. P., et al. 2013, Monthly Notices of the Royal Astronomical Society, 432, 2917, doi: 10.1093/mnras/stt651
  * Prinoth et al. (2022) Prinoth, B., Hoeijmakers, H. J., Kitzmann, D., et al. 2022, Nature Astronomy, 6, 449
  * Quirrenbach et al. (2016) Quirrenbach, A., Amado, P., Caballero, J., et al. 2016, in Ground-based and Airborne Instrumentation for Astronomy VI, Vol. 9908, International Society for Optics and Photonics, 990812
  * Quirrenbach et al. (2018) Quirrenbach, A., Amado, P. J., Ribas, I., et al. 2018, in Ground-based and Airborne Instrumentation for Astronomy VII, Vol. 10702, International Society for Optics and Photonics, 107020W
  * Rogers & Seager (2010) Rogers, L. A., & Seager, S. 2010, The Astrophysical Journal, 712, 974, doi: 10.1088/0004-637x/712/2/974
  * Rosenthal et al. (2021) Rosenthal, L. J., Fulton, B. J., Hirsch, L. A., et al. 2021, The Astrophysical Journal Supplement Series, 255, 8, doi: 10.3847/1538-4365/abe23c
  * Rothman et al. (2010) Rothman, L. S., Gordon, I. E., Barber, R. J., et al. 2010, J. Quant. Spec. Radiat. Transf., 111, 2139, doi: 10.1016/j.jqsrt.2010.05.001
  * Rothman et al. (2013) Rothman, L. S., Gordon, I. E., Babikov, Y., et al. 2013, J. Quant. Spec. Radiat. Transf., 130, 4, doi: 10.1016/j.jqsrt.2013.07.002
  * Sánchez-López et al. (2022) Sánchez-López, A., Landman, R., Mollière, P., et al. 2022, Astronomy & Astrophysics, 661, A78
  * Sánchez-López et al. (2019) Sánchez-López, A., Alonso-Floriano, F., López-Puertas, M., et al. 2019, A&A, 630, A53
  * Sánchez-López et al. (2020) Sánchez-López, A., López-Puertas, M., Snellen, I., et al. 2020, Astronomy & Astrophysics, 643, A24
  * Showman et al. (2012) Showman, A. P., Fortney, J. J., Lewis, N. K., & Shabram, M. 2012, The Astrophysical Journal, 762, 24, doi: 10.1088/0004-637X/762/1/24
  * Sing et al. (2016) Sing, D. K., Fortney, J. J., Nikolov, N., et al. 2016, Nature, 529, 59
  * Snellen et al. (2010) Snellen, I. A., De Kok, R. J., De Mooij, E. J., & Albrecht, S. 2010, Nature, 465, 1049
  * Stangret et al. (2020) Stangret, M., Casasayas-Barris, N., Pallé, E., et al. 2020, Astronomy & Astrophysics, 638, A26
  * Stassun et al. (2017) Stassun, K. G., Collins, K. A., & Gaudi, B. S. 2017, The Astronomical Journal, 153, 136, doi: 10.3847/1538-3881/aa5df3
  * Swain et al. (2009) Swain, M. R., Tinetti, G., Vasisht, G., et al. 2009, The Astrophysical Journal, 704, 1616, doi: 10.1088/0004-637X/704/2/1616
  * Tamuz et al. (2005) Tamuz, O., Mazeh, T., & Zucker, S. 2005, Monthly Notices of the Royal Astronomical Society, 356, 1466, doi: 10.1111/j.1365-2966.2004.08585.x
  * Tsiaras et al. (2018) Tsiaras, A., Waldmann, I. P., Zingales, T., et al. 2018, The Astronomical Journal, 155, 156, doi: 10.3847/1538-3881/aaaf75
  * von Zahn et al. (1998) von Zahn, U., Hunten, D. M., & Lehmacher, G. 1998, Journal of Geophysical Research: Planets, 103, 22815, doi: https://doi.org/10.1029/98JE00695
  * Welbanks et al. (2019) Welbanks, L., Madhusudhan, N., Allard, N. F., et al. 2019, The Astrophysical Journal Letters, 887, L20, doi: 10.3847/2041-8213/ab5a89
  * Wetzstein et al. (2012) Wetzstein, G., Lanman, D., Hirsch, M., & Raskar, R. 2012, ACM Trans. Graph. (Proc. SIGGRAPH), 31, 1.  https://web.media.mit.edu/~gordonw/TensorDisplays/
  * Wyttenbach et al. (2015) Wyttenbach, A., Ehrenreich, D., Lovis, C., Udry, S., & Pepe, F. 2015, Astronomy & Astrophysics, 577, A62
  * Yurchenko et al. (2011) Yurchenko, S. N., Barber, R. J., & Tennyson, J. 2011, MNRAS, 413, 1828, doi: 10.1111/j.1365-2966.2011.18261.x
  * Zechmeister et al. (2014) Zechmeister, M., Anglada-Escudé, G., & Reiners, A. 2014, Astronomy & Astrophysics, 561, A59
  * Zechmeister et al. (2018) Zechmeister, M., Reiners, A., Amado, P. J., et al. 2018, A&A, 609, A12, doi: 10.1051/0004-6361/201731483
  * Zhang et al. (2020) Zhang, M., Chachan, Y., Kempton, E. M.-R., Knutson, H. A., & Chang, W. H. 2020, The Astrophysical Journal, 899, 27, doi: 10.3847/1538-4357/aba1e6
  * Öberg et al. (2011) Öberg, K. I., Murray-Clay, R., & Bergin, E. A. 2011, The Astrophysical Journal Letters, 743, L16, doi: 10.1088/2041-8205/743/1/L16

##  Appendix A UTC to TDB timestamps conversion code

We display here the Python code snippet that we used to convert the CARACAL
timestamps from UTC to TDB. The variable times_tdb is the one we used as our
TDB timestamps. This code is also implemented in the petitRADTRANS package.
This was inspired by the SERVAL272727https://github.com/mzechmeister/serval
code (Zechmeister et al., 2018).

⬇

import astropy.units as u

from astropy.coordinates import (EarthLocation,

SkyCoord)

from astropy.time import Time

site_name = "CAHA" # Calar Alto astropy site name

ra = 300.1821223 * u.deg # (degree) for HD 189733

dec = 22.7097759 * u.deg # (degree) for HD 189733

times_utc = ... # placeholder to load MJD_UTC times

observer_location = EarthLocation.of_site(site_name)

target_coordinates = SkyCoord(

ra=ra,

dec=dec

)

times_utc = Time(times_utc, format="jd", scale="utc")

times_tdb = (

times_utc.tdb

+ times_utc.light_travel_time(

target_coordinates,

location=observer_location

)

##  Appendix B SysRem pipeline effect

###  B.1 SysRem preparing pipeline implementation

We have implemented SysRem in our framework for comparison with Polyfit (Sec.
4.1). SysRem (Tamuz et al., 2005) is a preparing pipeline developed to remove
systematics of light curves obtained from photometric observations, but is
also widely used to prepare high resolution data (e.g., Alonso-Floriano et
al., 2019; Pelletier et al., 2021; Gibson et al., 2022). The algorithm
iterates to find the set of vectors ”$a(t)$” and ”$c(\lambda)$”, such that
$a(t)\circ c(\lambda)$ best fit the data. It can be applied repeatedly
(”passes”) to find several ”hidden” linear trends in the data. Our
implementation follows the steps described below:

##### Step 1:

This step is almost identical to step 1 of Polyfit (Sec. 4.1). We obtain the
same ”normalised” spectrum $\mathbf{F}_{\overline{\mathbf{X}}}(t,\lambda)$ and
correct the uncertainties in the same way to obtain
$\mathbf{U}_{\mathbf{N},\overline{\mathbf{X}}}(t,\lambda)$. In addition, we
follow Alonso-Floriano et al. (2019) and mask
$\mathbf{F}_{\overline{\mathbf{X}}}(t,\lambda)$ where its values are below
0.8, corresponding to the core of the strongest telluric lines. We note that
for this ”normalisation” step, various techniques are used in other works,
that involve for example mean division, polynomial fitting, Gaussian
filtering, combined in a variety of ways. The efficiency of these different
techniques to remove $\mathbf{X}$ has to our knowledge never been formally
discussed, but such discussion is beyond the scope of this work.

##### Step 2:

We subtract the average over wavelengths282828This is done using the numpy
1.24.3 function numpy.ma.average with parameters
$a=\mathbf{F}_{\overline{\mathbf{X}}}(t,\lambda)$,
$\mathrm{weights}=\mathbf{1}$, and $\mathrm{axis}=-1$. of
$\mathbf{F}_{\overline{\mathbf{X}}}(t,\lambda)$ following:

$\displaystyle\mathbf{F}_{a}(t,\lambda)$ $\displaystyle=$
$\displaystyle\mathbf{F}_{\overline{\mathbf{X}}}(t,\lambda)-\langle\mathbf{F}_{\overline{\mathbf{X}}}(t,\lambda)\rangle(t).$
(B1)

At this step, $\mathbf{F}_{a}(t,\lambda)$ is on average $\approx 0$. This is
crucial for the core of the SysRem algorithm to work properly. Because we only
subtract a value from the data, this step has no impact on the uncertainties.

##### Step 3:

We apply the SysRem algorithm as described in Tamuz et al. (2005). The
algorithm requires to start with an estimation of either the parameter
”$a(t)$”, which can be seen as similar to the airmass, or the parameter
”$c(\lambda)$”, which can be seen as similar to the extinction coefficients.
However, as long as the algorithm is able to converge, the starting parameters
and their initial values have no importance. We chose to start with
$c(\lambda)=\mathbf{1}$. Following Alonso-Floriano et al. (2019), we run one
SysRem pass with 15 iterations. We obtain an estimation of the systematics
$a(t)\circ c(\lambda)$, that we subtract292929In this setup, we found that
skipping step 2 and dividing the systematics instead of subtracting them, in
order to obtain prepared data akin to Eq. 15, lead to inaccurate retrievals on
simulated data. As a division is not considered to remove the systematics in
Tamuz et al. (2005), we did not investigate this further. to the data to
obtain the prepared spectrum after 1 pass ${}^{(1)}\mathbf{F}_{S}(t,\lambda)$
with:

$\displaystyle{}^{(1)}\mathbf{F}_{S}(t,\lambda)$ $\displaystyle=$
$\displaystyle\mathbf{F}_{a}(t,\lambda)-a(t)\circ c(\lambda),$ (B2)

where the superscript $(1)$ represents the number SysRem passes. This last
step can be repeated any number of time $n$ to remove more linear trends. In
that case, $\mathbf{F}_{a}$ in the above equation is replaced by
${}^{(n-1)}\mathbf{F}_{S}$, that is, the spectrum obtained from the previous
pass. Because we again only subtract a value from the data, this step has no
impact on the uncertainties. Note that because of the subtractions used, this
preparing pipeline cannot be represented with Eq. 15, and has no preparing
matrix as we defined it. We will use the notation $P_{S}$ to represent all of
the SysRem pipeline steps, with
$P_{S}(\mathbf{F})={}^{(n)}\mathbf{F}_{S}(t,\lambda)$. Note that as with
$P_{\mathbf{R}}$, the result of $P_{S}$ will change depending on the input.
The effect of the SysRem preparing pipeline is displayed in Fig. 20.

Figure 20:  Illustration of the effect of our implementation of the SysRem
preparing pipeline on the order 46 of the studied data, for a selection of
number of passes. The left column represents prepared data, the right column
prepared models. Row 1 to 5: prepared noiseless simulated data and model with
respectively, 1, 2, 3, 5 and 10 SysRem passes. The simulated data used are the
same as in step 9 of Fig. 4. Sixth row: same as first row but with added
noise. The lines are no longer visible to the naked eye. Bottom row: prepared
CARMENES data. The white vertical stripes are masked telluric lines.

###  B.2 ”Noiseless BPM”

As previously stated, and as it can be seen in Eq. B2, SysRem does not follow
Eq. 15, so the BPM that we derived cannot be calculated for this preparing
pipeline. A workaround to this issue is to remove the noise from Eq. 29, so
that $\mathbf{R}_{\mathbf{F}}$ disappears from the equation, and a value for
SysRem can be obtained. Note that this is not a strictly correct way to
evaluate the BPM: the impact of the noise is not measured, and we stress that
the equation has been established assuming the pipeline respects Eq. 15. Doing
so and adding $\mathbf{1}$ to the results of our SysRem implementation, we
obtain a ”noiseless BPM” of $5\times 10^{-10}$ for ”Polyfit”, while we find
$9\times 10^{-6}$ and $2\times 10^{-9}$ for SysRem with respectively 1 and 15
passes. We are giving these ”noiseless BPM” values as indications, but their
meaningfulness is questionable.

###  B.3 Retrieval results with SysRem

Figure 21:  Posterior probability distributions for a selection of SysRem
setups. The dashed vertical lines represents the 0.16, 0.50 and 0.84 quantiles
(i.e. median and 1-$\sigma$ error bar) of the distributions obtained. Below
each panel is indicated the median and the 1-$\sigma$ error bar of the
retrieved parameters using the setup. The units are the same as in Fig. 12.

When using SysRem, we use the exact same setup as for Polyfit, only replacing
$P_{\mathbf{R}}$ with $P_{S}$ and $\mathbf{U}_{\mathbf{R}}$ with
$\mathbf{U}_{\mathbf{N},\overline{\mathbf{X}}}$ in Eq. 30. The setups are
denoted ”S-xx-y”, where ”xx” corresponds to the same setup as in Table 5, and
”y” corresponds to the number of SysRem passes used. For example, S-01-1 has
the same retrieved parameters and priors than P-01, and 1 SysRem pass was
applied.

In Fig. 21, we show the posteriors of a selection of SysRem retrievals. With 1
SysRem pass, the results obtained with SysRem are quite different than those
obtained with Polyfit. Most notably, for the S-01-1 and S-18-1 setups, the H2O
MMR is 2 orders of magnitude lower compared with the latter and compatible at
$\approx 2\sigma$. The mid transit time posterior is also clearly truncated,
and the constraints obtained are much softer. With 2 SysRem passes, we obtain
essentially flat posteriors. We also observe flat posteriors with 3, 5 and 10
passes (not shown here). This behaviour might seems surprising as it is common
in other works to use more than one SysRem pass (e.g. Alonso-Floriano et al.,
2019, used 10 SysRem passes). However, in our framework we apply the preparing
pipeline on both the data and the models, which is not necessarily what is
done in other works. In Fig. 20, it can be seen that the models and the
noiseless simulated data are not deformed in a similar way, which might lead
to the biased results we observe with our framework. In addition, it seems
that the simulated noiseless data is quickly removed by SysRem, and that the
planet’s atmospheric lines in the simulated noiseless data are well preserved
with at most 2 passes (although we did not quantify this). This ”line-
preserving” number of passes may depend on the spectral window, the kinematic
properties of the observed target, and of the instrument used. This behaviour
may also be different in a noisy case.

This highlights that not all preparing pipelines are suitable with all
frameworks. We stress that the results presented in this appendix are only
valid with our framework, and that in other published work using PCA-based
methods, the forward model is prepared for retrieval in a different manner.
The apparently successful use of SysRem and related PCA-based approaches in
previous retrieval studies (e.g. Pelletier et al., 2021; Gibson et al., 2022)
suggests that formally justified frameworks using SysRem-like preparing
pipelines may exist, but investigating them is beyond the scope of this work.

##  Appendix C Retrieval with all orders

We display the result of a retrieval with all orders in Fig. 22. The values
retrieved with the Polyfit setup are consistent with those retrieved with the
same setup but with our order selection.

Figure 22: Posterior probability distributions for a Polyfit setup, with all
orders, using 100 live points. Blue: results using the Polyfit preparing
pipeline. The dashed vertical blue lines represents the 0.16, 0.50 and 0.84
quantiles (i.e. median and 1-$\sigma$ error bar) of the distributions obtained
with Polyfit. On top of each column is indicated the median and the 1-$\sigma$
error bar of the retrieved parameters using Polyfit. The contours in the 2D
histograms corresponds to the 1, 2 and 3-$\sigma$ contours.

##  Appendix D Risking biased results: automatic order selection algorithms

Figure 23:  Posterior probability distributions for several order selections
and the exposures corresponding to $T_{\mathrm{transit}}$. Each row represent
a series of posteriors obtained with a different order selection. TTR-06:
order selection used in body of the article, for comparison. A: order
selection obtained when running our algorithm nominally. B: order selection
obtained when running our algorithm, starting with orders that places the co-
added CCF maximum at $K_{p}$ and $V_{\mathrm{rest}}$ far from the expected
ones. The dashed vertical blue lines represents the 0.16, 0.50 and 0.84
quantiles (i.e. median and 1-$\sigma$ error bar) of the distributions
obtained. Below each panel is indicated the median and the 1-$\sigma$ error
bar of the retrieved parameters using the setup.

The results presented in this appendix are derived from models following Sec.
3.1, except that step 6 is not performed. The time array used here are also in
BJD${}_{\textrm{UTC}}$ instead of the BJD${}_{\textrm{TDB}}$ used in the body
of the article. As stated in the conclusion of this appendix, we recommend
against using the technique described below, and discarded it ourselves.
Nevertheless, we chose to report the following results as they show that using
a similar technique can dangerously bias the data analysis.

The order selection algorithm follows the steps below:

##### Step 1:

based on the Exo-REM model generated in Sec. 3.3 and using the fact that most
of the transmission signal comes from a pressure of $\approx 10^{4}$ Pa, we
fix the absorbers MMR at the values listed in Table 3. We don’t include any
cloud nor haze effect: indeed, we don’t expect the MnS cloud to have a
significant contribution to the spectrum. We use the parameters listed in Sec.
1, the CARACAL uncertainties ($\mathbf{U}_{\mathbf{N}}$), and the 19 exposures
centered around $T_{0}$.

##### Step 2:

we cross-correlate this model with the prepared data using the setup described
in Sec. 4.2. No co-addition of CCF is performed yet. We choose a limited set
of orders, that we estimate are the least impacted by telluric lines and
instrumental effects, have strong H2O absorption or minor contributions from
other species, and cover most of the CARMENES wavelength range. For these
data, we started with orders 3, 7, 9, 13, 25, 28, 29, 46, 54.

##### Step 3:

we calculate the co-added CCF of the selected orders data, and compute the
corresponding S/N as described in Sec. 4.2. In addition, we determine:

  * •

the S/N at the co-added CCF maximum,

  * •

the number of elements of our co-added CCF matrix that is greater or equal to
0.68 times the function maximum (we will call this quantity $\mathcal{A}$),

  * •

the position of this maximum in the $K_{p}$–$V_{\mathrm{rest}}$ space.

##### Step 4:

we add one of the remaining orders to the set of included orders, and perform
step 3 with this new set. We then test for the following:

  * •

the S/N at the co-added CCF maximum calculated with the new set is higher than
the one calculated with the previous set,

  * •

the new $\mathcal{A}$ is lower than the previous one,

  * •

the position of the new co-added CCF maximum is between 145 and 160
km$\cdot$s-1 along the $K_{p}$ axis,

  * •

the position of the new co-added CCF maximum is between -10 and 10
km$\cdot$s-1 along the $V_{\mathrm{rest}}$ axis.

The order is kept within the set if all these conditions are met. Otherwise,
the order is removed from the set. This step is repeated with the new set,
until each remaining order has been tested.

##### Step 5:

this step is similar to step 4, but instead we remove a order from the set of
orders obtained at the end of step 4. The same tests are performed. The order
is removed from the set if all of the conditions are met. Otherwise, the order
is kept within the set. This step is repeated until each order in the set has
been tested.

We repeat the whole procedure, starting with the obtained order selection from
the last iteration, until the set does not change. At the end, we obtain the
following stable order selection: 1, 3, 7, 8, 9, 14, 25, 28, 29, 30, 46, 54.
We will call this set our ”cleaned-up” order selection.

The procedure assumes that:

  * •

The model used for the cross-correlation is a good representation of the data.

  * •

There is enough planet signal to prevent a false-positive CCF peak.

  * •

The planet signal was emitted within the procedure $K_{p}$ and
$V_{\mathrm{rest}}$ test ranges and does not vary strongly from order to
order.

  * •

An order containing valuable information will necessarily increase the S/N of
the CCF maximum, and narrow the CCF peak in $K_{p}$–$V_{\mathrm{rest}}$ space.
This narrowing can be estimated with $\mathcal{A}$.

  * •

An order not containing valuable information will necessarily decrease the S/N
of the CCF maximum or expand the CCF peak in $K_{p}$–$V_{\mathrm{rest}}$
space.

If some of these assumptions are not true, there is a risk to reject orders
containing valuable information, and a risk to select worthless orders biasing
our results toward our favoured atmospheric model. This risk has already been
noted by e.g. Boucher et al. (2021) and Cheverall et al. (2023).

We used the orders selected by this procedure for several retrievals. We show
a result example in Fig. 23. When using the orders selection mentioned above,
we obtain the posteriors in row ”A”. When instead we start with orders 11, 18,
19, 25, 26, 32, 33, 34 and remove the constraints on the co-added CCF maximum
location in $K_{p}$–$V_{\mathrm{rest}}$ space, we obtain the following order
selection: 1, 9, 10, 11, 13, 18, 19, 24, 26, 27, 29, 31, 32, 33, 34. In the
latter case, the co-added CCF maximum is located at unrealistic values:
$K_{p}=-142$ km$\cdot$s-1 and $V_{\mathrm{rest}}=133$ km$\cdot$s-1. We also
adapted our $K_{p}$ and $V_{\mathrm{rest}}$ priors to respectively
$\mathcal{U}(-192,-122)$ km$\cdot$s-1 and $\mathcal{U}(100,160)$ km$\cdot$s-1.
This gives the posteriors in row ”B”. Despite the difference in $K_{p}$ and
$V_{\mathrm{rest}}$ values, the retrieved temperature and H2O MMR are similar
in rows ”A” and ”B”, and close to the values of the model used to calculate
the CCF (Sec. 1, Table 3). This most probably indicates that the algorithm is
biased towards the model used to calculate the CCF. The bias may propagate
into the retrieval, despite retrievals being much more flexible than a CCF
analysis. Due to the strong risk of bias, we estimate that it is ill-advised
to use this algorithm.

##  Appendix E Retrieval on noisy simulated data

We can evaluate the performance of our framework against noisy simulated data
(see Sec. 4.7.2) using the Polyfit pipeline. The result is shown in Fig. 24.
With Polyfit, we obtained a best fit $\chi^{2}_{\nu}=0.999$ (not corrected by
$k_{\sigma}$). Note that this is true only for this specific noise realisation
and no general conclusion can be driven from this result, in contrast with our
noiseless simulated retrievals results (Sec. 4.7.2).

Figure 24: Posterior probability distributions of our noisy simulations. The
noise matrix generation is detailed in Sec. 3.2, the seed used was $12345$.
Blue: pRT 1-D simulation using Polyfit. The solid red lines corresponds to the
model input values for the 1-D model. The dashed vertical blue lines
represents the 0.16, 0.50 and 0.84 quantiles (i.e. median and 1-$\sigma$ error
bar) of the distributions for the 1-D simulation. On top of each column is
indicated the median and the 1-$\sigma$ error bar of the retrieved parameters
for the 1-D simulation. The contours in the 2D histograms corresponds to the
1, 2 and 3-$\sigma$ contours.

##  Appendix F Retrieval on noiseless simulated data with fewer free
parameters

In Sec. 4.7.2, we attribute the slight bias of the H2O abundance retrieved
from our noiseless simulation mainly to the retrieval of other parameters.
This can be verified by retrieving the H2O abundance on the same simulated
data, but retrieving with parameters that cannot compete to reproduce the H2O
lines. We display the result of such retrieval in Fig. 25. The peak of the H2O
abundance posterior is arguably on the true value. The temperature posterior
peaks at temperatures slightly lower than the truth but well within the error
bar. This is again caused by our pipeline’s imperfections.

Figure 25: Posterior probability distributions for of our noiseless
simulation, with few retrieved parameters. The solid red lines corresponds to
the model input values for the 1-D model. The dashed vertical lines represents
the 0.16, 0.50 and 0.84 quantiles (i.e. median and 1-$\sigma$ error bar) of
the distributions obtained. Below each panel is indicated the median and the
1-$\sigma$ error bar of the retrieved parameters using the setup, as well as
the true value between parenthesis. The units are the same as in Fig. 12

##  Appendix G Marginalising over the uncertainties

Figure 26:  Posterior probability distributions for a selection of Polyfit
setups. The dashed vertical lines represents the 0.16, 0.50 and 0.84 quantiles
(i.e. median and 1-$\sigma$ error bar) of the distributions obtained. Below
each panel is indicated the median and the 1-$\sigma$ error bar of the
retrieved parameters using the setup. The units are the same as in Fig. 12.

Our framework is also able to retrieve an uncertainty scaling parameter
($\beta$) or to use the uncertainty ”nulling” procedure described in Brogi &
Line (2019) and Gibson et al. (2020). As in Gibson et al. (2020), the
uncertainties are scaled in the likelihood function following:

$\displaystyle\ln(\mathcal{L})$ $\displaystyle=$
$\displaystyle-\frac{1}{2}\sum\left(\frac{P_{\mathbf{R}}(\mathbf{F})-P_{\mathbf{R}}(\mathbf{M}_{\theta})}{\beta\mathbf{U}_{\mathbf{R}}}\right)^{2},$
(G1)

with the scalar $\beta$ being retrieved. For the ”nulling” procedure, we
followed Gibson et al. (2020), giving the following log-likelihood function:

$\displaystyle\ln(\mathcal{L})$ $\displaystyle=$
$\displaystyle-\frac{N}{2}\log\left(\frac{1}{N}\sum\left(\frac{P_{\mathbf{R}}(\mathbf{F})-P_{\mathbf{R}}(\mathbf{M}_{\theta})}{\mathbf{U}_{\mathbf{R}}}\right)^{2}\right),$
(G2)

where $N$ is the number of non-masked data points. For the reason exposed in
Sec. 4.3.2, we did not used this feature to obtain our fiducial results.

Nevertheless, we did run retrievals with these features enabled, that we label
P-19 (which is similar to P-14, but with $\beta$ as an additional retrieved
parameter) and P-29 (which is similar to P-14, but using the nulling
procedure). For $\beta$, we used a uniform prior $\mathcal{U}(0.5,100)$. We
display the results in Fig. 26. In both cases, the results are almost
identical with P-14, only with slightly tighter posteriors. The scaling
parameter $\beta$ corresponds well to $1/k_{\sigma}$. For the P-19 setup,
since we essentially ”force” $\chi^{2}_{\nu}=1$, we unsurprisingly obtain a
larger log-evidence than with the other setups, with
$\log(\mathcal{Z})=-807\,500$. With P-29, the log-likelihood equation is
changed and we obtain this time a positive log-evidence, with
$\log(\mathcal{Z})=307\,300$.