ExoMol line lists -- XLV. Rovibronic molecular line lists of calcium monohydride (CaH) and magnesium monohydride (MgH)

New molecular line lists for calcium monohydride ($^{40}$Ca$^{1}$H) and magnesium monohydride ($^{24}$Mg$^{1}$H) and its minor isotopologues ($^{25}$Mg$^{1}$H and $^{26}$Mg$^{1}$H) are presented. The rotation-vibration-electronic (rovibronic) line lists, named \texttt{XAB}, consider transitions involving the \X, \A, and \BBp\ electronic states in the 0--30\,000~cm$^{-1}$ region (wavelengths $\lambda>0.33$~$\mu$m) and are suitable for temperatures up to 5000 K. A comprehensive analysis of the published spectroscopic literature on CaH and MgH is used to obtain new extensive datasets of accurate rovibronic energy levels with measurement uncertainties and consistent quantum number labelling. These datasets are used to produce new spectroscopic models for CaH and MgH, composed of newly empirically-refined potential energy curves and couplings in/between the different electronic states (e.g.\ spin-orbit, electronic angular momentum, Born-Oppenheimer breakdown, spin-rotation, $\Lambda$-doubling) and previously published \textit{ab initio} transition dipole moment curves. Along with Einstein $A$ coefficients, state lifetimes and Land\'e $g$-factors are provided, the latter being particularly useful as CaH and MgH can be used to probe stellar magnetic fields. Computed energy levels have been replaced with the more accurate empirical values (if available) when post-processing the line lists, thus tailoring the line lists to high resolution applications. The \texttt{XAB} line lists are available from the ExoMol database at http://www.exomol.com and the CDS astronomical database.

Another commonly used CaH rovibronic line list is that of Weck et al. (2003a), which was computed using the ab initio potential energy curves (PECs) and TDMCs of Leininger & Jeung (1995). Transition energies and oscillator strengths are available up to 35 000 cm −1 (wavelengths λ > 0.29 µm) from the X 2 Σ + ground state to the low-lying A 2 Π, B 2 Σ + , C 2 Σ + , D 2 Σ + and E 2 Π electronic states. Although boasting good coverage, the calculated line positions are of limited accuracy given that the PECs were not rigorously refined to experimental data with only minor empirical adjustments to the dissociation energies of the curves. Furthermore, fine structure terms that lead to the splitting of spectral lines such as spin-orbit or spin-rotation coupling were neglected in their theoretical model.
For the main isotopologue of MgH, the 24 MgH line list of GharibNezhad et al. (2013) is one of the most accurate to date and contains around 31 000 rovibronic transitions from the v = 0-11 vibrational levels of the X 2 Σ + electronic state to the v = 0-3 levels of the A 2 Π state and v = 0-9 of the B 2 Σ + state. A complete list of line positions up to J = 50.5 covering transitions between 8900-28 480 cm −1 (wavelengths 1.12 > λ > 0.35 µm) was derived from experimentally determined term values (Shayesteh et al. 2007), while Einstein A coefficients were computed using experimentally determined PECs  and ab initio TDMCs . Further spectroscopic measurements of the less common isotopologues of MgH by Hinkle et al. (2013) have led to improved A-X line lists for 25 MgH and 26 MgH that helped identify new transitions in sunspots and metal-poor dwarf and giant stars. A multi-isotopologue, direct-potential-fit analysis of A-X and B -X emission spectra has also been performed to produce a highly accurate X 2 Σ + ground state PEC  of MgH.
Both the MoLLIST and Yadin et al. (2012) line lists of CaH and MgH have been used in the recent EXOPLINES molecular absorption cross-section database for brown dwarf and giant exoplanet atmospheres (Gharib-Nezhad et al. 2021). Combining different line lists to gain proper wavelength coverage is common practice in the atmospheric modelling of exoplanets. More desirable, however, would be to have a single, comprehensive molecular line list that is accurate and complete over an extended wavelength region. The property of completeness of a line list is particularly important for characterizing exoplanet atmospheres and correctly modelling molecular opacities (Yurchenko et al. 2014). Motivated by recent developments in the methodology of line list construction for the ExoMol database , we thus find it worthwhile to produce new rovibronic line lists for CaH and MgH that extend to visible and near-ultraviolet wavelengths and that have been adapted for the high-resolution spectroscopy of exoplanets (Snellen 2014;Birkby 2018). The adaptation of molecular line lists for high-resolution applications is a major activity for improving the ExoMol database, see Bowesman et al. (2021) for example.
It is worth mentioning that the alkaline-earth monohydrides are promising candidates for laser-cooling (Di Rosa 2004;Gao & Gao 2014;Gao 2020;Jun-Hao et al. 2021) and a detailed knowledge of their rovibronic energy level structure and transition properties, especially concerning the A 2 Π-X 2 Σ + band, could assist this field when designing efficient laser-cooling schemes.

MARVEL analysis
The MARVEL (Measured Active Rotational-Vibrational Energy Levels) procedure Császár et al. 2007;Furtenbacher & Császár 2012;Tóbiás et al. 2019) has become an indispensable part of the line list construction process. The program MARVEL (available via the online app at http://kkrk.chem.elte.hu/marvelonline; accessed November 2021) takes as input a user-constructed dataset of assigned spectroscopic transitions with measurement uncertainties and converts them into a consistent set of labelled empirical-quality energy levels with the uncertainties propagated from the input transitions to the output energies. The resulting energy levels have two main applications. Firstly, they are used to refine the PECs and state coupling curves of the theoretical spectroscopic model of the molecule in line list calculations. Secondly, when post-processing the computed line list the calculated energy levels can be substituted with the equivalent MARVEL values if available, further improving the accuracy of the predicted line positions.
For CaH, 3663 experimental wavenumbers were taken from Shayesteh et al. (2013), which covered transitions between the v = 0-4 vibrational levels of the X 2 Σ + electronic state to the v = 0-3 levels of the A 2 Π state and v = 0-2 levels of the B 2 Σ + state. The data from Shayesteh et al. (2013) included B-X lines from Berg et al. (1976) and ground state data from Shayesteh et al. (2004b). Transitions involving highly excited vibrational levels of the B 2 Σ + electronic state are available (Watanabe et al. 2016(Watanabe et al. , 2018, however, their inclusion into the input CaH MARVEL dataset led to inconsistencies with the data from Shayesteh et al. (2013), and they were therefore discarded. The input MARVEL dataset was processed using the Cholesky (analytic) approach with a 0.05 cm −1 threshold on the uncertainty of the "very bad" lines, producing 1260 energy levels up to N 55 below 25 323 cm −1 , where N is the rotational angular momentum quantum number. Five quantum numbers were used to uniquely assign the CaH MARVEL energy levels: an electronic state label (X, A, B), N , the vibrational state v, the rotationless parity e/f , and an id number ranging from 1-13 used in Shayesteh et al. (2013) (see the Table S1 description in supplementary material of Shayesteh et al. (2013) for definitions), which is related to v and the quantum labels F1 and F2, which denote spin components J = N + 1/2 and J = N − 1/2, respectively, where J is the total angular momentum quantum number.
MARVEL datasets were produced for the three isotopologues of MgH with the majority of transition data coming from Henderson et al. (2013), a study which performed a multi-isotopologue fit of experimental transition data to determine an accurate X 2 Σ + ground state PEC of MgH. In Henderson et al. (2013), new B -X measurements for 25 MgH and 26 MgH were performed and analysed alongside previous A-X and B -X measurements of 24 MgH (Shayesteh et al. 2007), and a range of X-X ground state data (Shayesteh et al. 2004a;Leopold et al. 1986;Lemoine et al. 1988;Zink et al. 1990;Ziurys et al. 1993;Shayesteh et al. 2007). This served as a valuable source of labelled transition data on all three isotopologues that was already formatted with a consistent set of quantum numbers.
For 24 MgH, we extracted 7453 transitions from Henderson et al. (2013) covering the v = 0-11 (X 2 Σ + ) and v = 0-3 (A 2 Π, B 2 Σ + ) levels up to N 49. In addition, 29 low-J transitions of the A 2 Π(v = 0)-X 2 Σ + (v = 0) band were taken from Zhang & Steimle (2014), along with 101 B -X transitions from  involving the v = 4 (B 2 Σ + ) level up to N 21, and 937 B -X transitions involving the v = 5-9 (B 2 Σ + ) levels up to N 31 from Balfour & Lindgren (1978). The final 24 MgH MARVEL dataset contained 8520 experimental transition wavenumbers resulting in 1856 empirical-quality energy levels up to N 49 below 29 748 cm −1 . Four quantum numbers were used to uniquely identify the energy levels of MgH: an electronic state label (X, A1, A2, B) where A1 and A2 correspond to the 2 Π 1/2 and 2 Π 3/2 components of the A 2 Π state caused by spin-orbit splitting, N , v, and e/f . For 25 MgH ( 26 MgH), 1046 (913) transitions were extracted from Henderson et al. (2013) covering the v = 0-8 (X 2 Σ + ) and v = 0-1 (B 2 Σ + ) levels up to N 36, along with 311 (324) transitions from Hinkle et al. (2013) involving the v = 0, 1 (A 2 Π) levels up to N 35. The MARVEL datasets produced 729 energy levels for each isotopologue. All MARVEL input transitions and output energy files are given as part of the supplementary material. of the analytic representations used for the PECs and different couplings are given in the supplementary material and only a brief summary is provided here. The Duo input files for CaH and MgH, which contains all the parameters and defines the spectroscopic model, are provided in the supplementary material and can be found on the ExoMol website. The Duo online manual (see https://duo.readthedocs.io/en/latest/index.html; accessed November 2021), is another valuable resource for details of the relevant keywords, parameters and methodologies.
The X 2 Σ + ground state of CaH was represented as a Morse/Long-Range (MLR) potential function (Le  with the parameter values from Yadin et al. (2012) used as the starting point in the refinement, while the A 2 Π and B 2 Σ + PECs were represented as Extended Morse-Oscillator (EMO) functions . The (adiabatic) PECs of CaH are illustrated in Fig. 1. Accurately modelling the B 2 Σ + state of CaH is challenging due to an avoided crossing that occurs around the Ca-H bond length value of rCaH = 2.5Å, causing the kink and second well in the curve. To correctly model this behaviour it was necessary to include a "dummy" D 2 Σ + state with an associated D-A spin-orbit and electronic angular momentum coupling and D-B diabatic coupling term. Although the D 2 Σ + of CaH is physical, in this work it should not be considered reliable and no transitions to it were calculated.
Different couplings between the electronic states are usually needed in the spectroscopic model to achieve the highest possible accuracy for computed energy levels. The following were included for CaH: A-A, B-A and D-A spin-orbit coupling, B-A and D-A electronic angular momentum coupling, Born-Oppenheimer breakdown functions and spin-rotational coupling in the X 2 Σ + , A 2 Π and B 2 Σ + states, and Λ-doubling coupling in the A 2 Π state.
For the PECs and most of the couplings, the parameters were determined by directly fitting to the experimental energy levels in a weighted least-squares fitting procedure. Energies with smaller uncertainties were given a higher weighting in the fit while energy levels that had only been involved in one transition (information obtained in the MARVEL procedure), and therefore cannot be classed as reliable, were assigned with lower weights. Fitting of the A-A, B-A spin-orbit and B-A electronic angular momentum coupling curves was slightly different in that these were based on calculated ab initio curves that were subsequently "morphed" (essentially shifted by a constant factor or simple function) to agree with experiment. Ab initio calculations were performed using state-averaged multi-configurational self-consistent field (MCSCF) theory  involving the X 2 Σ + , A 2 Π (both 2 Π 1/2 and 2 Π 3/2 spin components) and B 2 Σ + states in conjunction with the correlation consistent basis sets cc-pCVQZ for Ca (Koput & Peterson 2002) and cc-pVQZ for H (Dunning 1989). The active space included 11 electrons distributed between (5 a1, 2 b1, 2 b2, 0 a2) orbitals in C2v point group symmetry. Calculations were done with the quantum chemistry program MOLPRO2015 (Werner et al. 2012, 2020) on a grid of Ca-H bond length rCaH = 1.6-5.0Å.
All curves were adjusted in the refinement, reproducing 1170 term values up to J = 54.5 with a weighted root mean square (w-rms) error of 0.001 cm −1 and root mean square (rms) error of 0.241 cm −1 . The results of the refinement are illustrated in Fig. 2. The residual errors ∆E(obs − calc) (in cm −1 ) between the empirically-derived MARVEL energy levels and the calculated Duo values from the refined spectroscopic model show the expected behaviour. In each electronic state, the errors are larger for higher vibrational and rotational excitation (corresponding to higher energies). These states are usually not as well characterised in experiment and therefore have lower weights and less importance in the refinement.

Dipole moment curves
For the A-X and B-X bands, we have used the TDMCs of Shayesteh et al. (2017), which were generated at a high-level of ab initio theory (multireference configuration interaction with a quadruple-zeta quality correlation consistent basis set, MRCI/cc-pwCVQZ) on a large grid of Ca-H bond length rCaH = 2.0-14.0 a0. These dipoles have been utilised in recent rovibronic line list calculations (Alavi & Shayesteh 2018). The ground state X 2 Σ + DMC from the previous ExoMol study of Yadin et al. (2012) was also employed. This was computed at a high-level of ab initio theory (coupled cluster with a quintuple-zeta quality correlation consistent basis set, RCCSD(T)/cc-pCV5Z) and guarantees similar intensity predictions to the original ExoMol CaH line list in the microwave and IR.

Duo calculations
Rovibronic line list calculations were carried out with the computer program Duo, which variationally solves the diatomic molecular Schrödinger equation. Duo has been extensively used by the ExoMol project and there is a range of literature available on its methodologies Yurchenko et al. 2016;) and its application to other diatomic molecules (see previous ExoMol line list publications). Here, we only summarise the key calculation parameters.
A grid-based sinc discrete variable representation (DVR) method employing 501 grid points uniformly distributed in the range rCaH = 1.3-6.0Å was utilised to solve the coupled Schrödinger equation. The basis set contained vibrational levels up to vmax = 15, 20, 25 for the X, A, B electronic states, respectively, which ensures converged energies below the dissociation limit of each electronic state. Transitions were computed with a lower state energy threshold of hc · 13 700 cm −1 (h is the Planck constant and c is the speed of light), which roughly corresponds to the dissociation energy (D0) of the X 2 Σ + state where we have calculated the zero-point energy (ZPE) to be 644.6 cm −1 . An upper state energy threshold of hc · 29 900 cm −1 was selected so as to be just below the dissociation asymptote of the A 2 Π and B 2 Σ + states.
A total of 293 151 transitions up to J = 61.5 were computed between 6825 energy levels for the CaH line list. Calculations used atomic mass values 39.962590863000 Da ( 40 Ca) and 1.00782503223 Da ( 1 H).

Potential energy and coupling curves
We have adopted the highly accurate X 2 Σ + ground state MLR potential function of Henderson et al. (2013) and performed a minor empirical refinement of the parameters to obtain better agreement with higher J rotational states. The X 2 Σ + state also required Born-Oppenheimer breakdown and spin-rotational coupling terms to further improve its description. An EMO analytic function was used for the A 2 Π excited state and the parameters were established by empirical refinement. Accurately describing the B 2 Σ + PEC was more challenging due to a shallower minimum that is located at a different equilibrium bond length compared to the X 2 Σ + and A 2 Π states. For this reason, the B 2 Σ + state was modelled using an empirically determined Rydberg-Klein-Rees (RKR) PEC , which was subsequently morphed in the refinement process. The refined PECs of MgH are illustrated in Fig. 3. As a result of the morphing procedure and the fact that the RKR B 2 Σ + PEC is only defined up to an Mg-H bond length value of rMgH ≈ 4.0Å, the B 2 Σ + state PEC exhibits incorrect dissociation behaviour and should actually follow the dissociation limit of the A 2 Π state. However, as this region of the B 2 Σ + PEC lies above 30 000 cm −1 which is the upper state energy threshold of our line list calculations, we can safely ignore this incorrect dissociation behaviour.
The A-X, A-A and B -A spin-orbit and A-X and B -A electronic angular momentum coupling curves were calculated ab initio and then morphed in the refinement. The couplings were computed using MOLPRO2015 (Werner et al. 2012, 2020) on a grid of rMgH = 1.1-5.0Å using state-averaged MCSCF theory over the X 2 Σ + , A 2 Π (both 2 Π 1/2 and 2 Π 3/2 spin components) and B 2 Σ + states in conjunction with the correlation consistent basis sets cc-pCVQZ for Mg (Prascher et al. 2011) and cc-pVQZ for H (Dunning 1989). The active space contained 3 electrons distributed between (5 a1, 2 b1, 2 b2, 0 a2) orbitals in C2v point group symmetry.
For 24 MgH, all curves and couplings were refined to the MARVEL dataset of energy levels. A total of 1827 energy levels     Fig. 4, where we have plotted the residual errors ∆E(obs − calc) (in cm −1 ) between the MARVEL energies and the final Duo calculated values using the refined spectroscopic model. Like CaH, the residual errors get larger with increasing energy in each electronic state, usually as these levels correspond to higher J states that are less well characterised and thus have lower weights and less importance in the refinement. The fitting errors for excited vibrational states tend to be larger than those of lower vibrational states, again for similar reasons.
The spectroscopic models of the isotopologues 25 MgH and 26 MgH were constructed independently as they each possessed their own MARVEL dataset of energy levels. An additional set of empirically-derived term values Hinkle et al. 2013) were used to "plug" gaps in the isotopologue MARVEL datasets. These additional energies were calculated using an effective Hamiltonian model analysing the same transition data used in our MARVEL analysis but as these energy levels were extrapolated and not "observed", they were given lower weights in the refinement process.
Using the 24 MgH spectroscopic model as a starting point for the isotopologues, it was only necessary to adjust coupling terms dependent on the nuclear masses instead of refining all of the PECs and couplings. Only 12 parameters were allowed to vary, namely those associated with the A-X and A-A electronic angular momentum coupling, X-X and A-A Born-Oppenheimer breakdown terms, and X-X spin-rotation coupling. Similar levels of accuracy were obtained for the isotopologue refinements. For 25 MgH, 1073 energy levels up to J = 39.5 were reproduced with a w-rms error of 0.021 cm −1 and rms error of 0.743 cm −1 , while 1083 energy levels up to J = 39.5 were reproduced with a w-rms error of 0.021 cm −1 and rms error of 0.799 cm −1 for 26 MgH.

Dipole moment curves
We have employed the TDMCs of  for the A-X and B -X bands. These were computed using a high-level of ab initio theory (multireference configuration interaction with a quadruple-zeta quality correlation consistent basis set, MRCI/aug-cc-pCVQZ) on a large grid of Mg-H bond length rMgH = 2.2-20.0 a0 and were previously used in 24 MgH line list calculations (GharibNezhad et al. 2013). Similar to the CaH calculations, we have taken the X 2 Σ + ground state DMC from the previous ExoMol study (Yadin et al. 2012) to ensure the same intensity predictions as the original ExoMol MgH line list in the microwave and IR. Similarly, this DMC was computed at a high-level of ab initio theory (coupled cluster with a quintuple-zeta quality correlation consistent basis set, RCCSD(T)/cc-pCV5Z).

Duo calculations
The MgH Duo calculations were performed on a grid of 401 points in the range rMgH = 1.0-5.0Å using a basis set containing vibrational levels up to vmax = 25, 30, 30 for the X, A, B electronic states, respectively. The use of a large basis set provided the best achievable accuracy in the refinement and although this included states above the dissociation limit, these were removed The highest bound vibrational level of the X 2 Σ + ground state in MgH is the v = 11 level (Shayesteh et al. 2007), which lies just below the dissociation asymptote. In Shayesteh et al. (2007), a number of "quasibound" states were observed in their measured MgH spectra at T ≈ 1500 K and were characterised. These quasibound states exist above the zero-point dissociation energy (D0 = 10 365 ± 0.5 cm −1 for 24 MgH (Shayesteh et al. 2007)) but below the centrifugal barrier maximum, and they were present in our MARVEL datasets and utilised in the refinements. Since the highest observed quasibound energy level of the X 2 Σ + state of the 24 MgH MARVEL dataset is at hc · 13 469.7 cm −1 , we have used a lower state energy threshold of hc · 13 500 cm −1 in our line list calculations. However, we have not considered any vibrational levels above v = 11 in the X 2 Σ + state. Transitions were computed with an upper state energy threshold of hc · 30 000 cm −1 .
Overall, 88 575 transitions up to J = 59.5 were computed between 3148 energy levels for the 24 MgH line list, 88 776 transitions up to J = 59.5 between 3156 energy levels for the 25 MgH line list, and 88 891 transitions up to J = 60.5 between 3160 energy levels for the 26 MgH line list.

Line list format
As standard, the CaH and MgH XAB line lists are provided in the ExoMol data format , illustrated in Tables 1 and 2. The .trans file, see Table 1 for an example from the CaH line list (the structure is identical for MgH), contains all the computed transitions with upper and lower state ID labels, Einstein A coefficients (in s −1 ) and transition wavenumbers (in cm −1 ). Table 2 shows an example of the CaH .states file (the structure is identical for the MgH line lists), which contains all the computed rovibronic energy levels (in cm −1 ), each labelled with a unique state ID counting number and quantum number labelling. Since CaH and MgH are known to be suitable molecular probes of stellar magnetic fields (Afram & Berdyugina 2015), we have also computed Landé g-factors which describe the behaviour of molecular states in the presence of a weak magnetic field as given by the Zeeman effect. These can be routinely calculated in Duo (Semenov et al. 2017) and are listed in column 7 of the .states file after the calculated state lifetimes.
Where available, calculated Duo energy levels and their uncertainties have been replaced with the more accurate empiricallyderived MARVEL values and this information is indicated in the .states file through the labels "Ca" for calculated and "Ma" for MARVEL. As is now standard practice for the ExoMol database, we provide estimated uncertainties on all energy levels (hence transition wavenumbers). MARVEL uncertainties are given where appropriate and uncertainties for the calculated energies were estimated using the expression, unc = a + bv + cJ(J + 1), where v corresponds to the vibrational level, J is the total angular momentum quantum number of the state, and the constants a = 0.5, b = 0.5 and c = 0.01. These should be regarded as conservative estimates and in many instances we expect the energy levels to be more accurate than the uncertainties might suggest. However, we prefer a more cautious approach and a way to ensure the user is aware of the difference in reliability between calculated and "MARVELised" lines, particularly in regard to high-resolution applications. For reference, all Duo calculated energies are provided in the final column of the .states file.

Temperature-dependent partition functions
Calculations of the temperature-dependent partition function Q(T ), defined as were performed on a 1 K grid in the 1 -5000 K range for CaH and MgH and its isotopologues (provided as supplementary material). Here, gi = gns(2Ji + 1) is the degeneracy of a state i with energy Ei and rotational quantum number Ji. For the nuclear spin statistical weights we have used values of gns = 2 for 40 CaH, 24 MgH and 26 MgH, and gns = 12 for 25 MgH. Note that we have chosen to go up to 5000 K as B-X lines of CaH have been observed in umbral spectra of sunspots with an average rotational temperature of 4164 ± 164 K (Behere et al. 2020).
In Table 3, computed partition function values at different temperatures are shown for 40 CaH and 24 MgH. For CaH, we have compared against the Q(T ) values from the previous ExoMol study (Yadin et al. 2012), which only considered energy levels in the X 2 Σ + ground state in the summation of Eq.
(2). There is very little difference in values, demonstrating that the inclusion of excited electronic state energy levels has an almost negligible contribution to Q(T ), even at higher temperatures. Our partition function values are actually slightly smaller than Yadin et al. (2012) as we use a lower dissociation asymptote for the X 2 Σ + state PEC and only include vibrational levels up to vmax = 15 (as oppose to vmax = 19). For MgH we have compared against the study of Szidarovszky & Császár (2015), which rigorously treated the contribution from bound, resonance (quasibound) and unbound states in accurate calculations of Q(T ) up to T = 3000 K. Since we have considered a large number of quasibound states in our calculations, we have taken the Q(T ) values that included bound and resonance states from Szidarovszky & Császár (2015). Our computed partition function values are slightly larger at higher temperatures but this difference is relatively small. Interestingly, if only including bound levels of the X 2 Σ + state (below ≈ 10 400 cm −1 ) in the summation of Eq. (2) our computed partition function values are near-identical to the bound state values of Szidarovszky & Császár (2015).

CaH
All spectral simulations were performed with the ExoCross program (Yurchenko et al. 2018). In Fig. 5, an overview of the rovibronic spectrum of CaH is displayed where we have simulated integrated absorption cross-sections at a resolution of 1 cm −1 modelled with a Gaussian line profile with a half width at half maximum (HWHM) of 1 cm −1 . Spectra have been generated at T = 500 K and T = 3000 K to illustrate the spectral flattening that occurs at higher temperatures as weaker features gain more intensity due to the increased population of higher-energy rovibronic states. The strongest band around ≈ 14 450 cm −1 , (largely due to A-X transitions) still dominates at higher temperatures along with the second strongest band around ≈ 15 750 cm −1 (largely due to B-X transitions). The different contributions to the spectrum from X-X, A-X and B-X transitions is illustrated in Fig. 6.
Absolute absorption line intensities have been calculated at T = 500 K and are compared against the rovibronic line list of Alavi & Shayesteh (2018) in Fig. 7. There is very good agreement with the line list of Alavi & Shayesteh (2018) and this is to be expected since we utilise the same ab initio TDMCs and would therefore expect similar line intensities. Interestingly, however, for a relatively weaker band located around 17 000 cm −1 our computed line intensities are much stronger than those of Alavi & Shayesteh (2018), as seen in the last panel of Fig. 7. Given that we use the same transition dipoles, this difference can be attributed to the nuclear wavefunctions used in the calculation of the Einstein A coefficients. Since our spectroscopic model of CaH rigorously treats couplings between electronic states, we expect our intensities to be more reliable as a result of the improved nuclear wavefunctions.

MgH
The temperature-dependence of the 24 MgH spectrum is illustrated in Fig. 8 where we have plotted absorption cross-sections at T = 500 K and T = 3000 K (same resolution and line profile as CaH cross-sections), while the different contributions to the spectrum from X-X, A-X and B -X transitions is shown in Fig. 9. The B -X contribution is completely different in shape compared to the A-X bands, explained by the fact that the minimum of the B 2 Σ + PEC lies at a larger equilibrium bond length compared to the X 2 Σ + and A 2 Π PECs (see Fig. 3). Absolute line intensities of the two strongest bands at T = 500 K are shown in Fig. 10 and compared against the rovibronic line list of GharibNezhad et al. (2013). There is excellent agreement for both line positions and intensities, which again is to be expected since we use the same ab initio transition dipoles and our PECs and couplings were refined to a lot of the experimental transition data used by GharibNezhad et al. (2013) to determine their PECs. Spectra of the isotopologues 25 MgH and 26 MgH are very similar to the main 24 MgH isotopologue so we do not show any plots here. These line lists will be useful, for example, in establishing magnesium isotope ratios in stellar environments (Yong et al. 2003).

CONCLUSION
New line lists for calcium monohydride ( 40 CaH) and magnesium monohydride ( 24 MgH) and its minor isotopologues ( 25 MgH, 26 MgH) have been presented. The line lists cover the 0-30 000 cm −1 region (wavelengths λ > 0.33 µm) and are applicable to temperatures up to 5000 K. Compared to previous CaH and MgH rovibronic line lists, notably the most recent (Alavi & Shayesteh 2018;GharibNezhad et al. 2013), the new ExoMol line lists rigorously treat the effects of coupling in/between electronic states and have improved coverage as they consider energy levels with rovibrational excitation up to the dissoci-  ation limit of each electronic state, importantly in the excited A 2 Π and B/B 2 Σ + states. A large number of quasibound levels in the X 2 Σ + ground state of MgH were also included in our calculations as they influence the spectrum at higher temperatures (Shayesteh et al. 2007). Hence we name these line lists XAB.
At microwave and IR wavelengths the new CaH and MgH line lists are recommended instead of the previous ExoMol 2012 line lists (Yadin et al. 2012). The replacement of calculated energy levels with empirical-quality MARVEL values will vastly improve the accuracy in certain regions making them suitable for high-resolution observations, especially in the IR region as a large number of X 2 Σ + state energy levels were substituted in both molecules. The calculation of Landé g-factors should also be of use to applications involving these molecules in the presence of weak magnetic fields. There have been laboratory Zeeman spectroscopic studies of CaH (Chen et al. 2006) and MgH (Zhang & Steimle 2014) and there is motivation for using these molecules to probe stellar magnetic fields (Afram & Berdyugina 2015), notably using the A-X band.

DATA AVAILABILITY
The Duo model input files plus the MARVEL transitions and energy files are given as supplementary material to this article. The states, transition and partition function files for the XAB line lists can be downloaded from www.exomol.com and the CDS data centre cdsarc.u-strasbg.fr. The open access programs ExoCross and Duo are available from github.com/exomol.

SUPPORTING INFORMATION
Supplementary data are available at MNRAS online. This includes a detailed description of the spectroscopic models of CaH and MgH, input files for the program Duo containing the spectroscopic models of CaH and MgH, and MARVEL transitions and energy files. The following references were cited in the supplementary material: Le Roy & Henderson (2007); Yadin et al.