text:
Mathieu Chêne
email: mathieu.chene1@junia.com

Benoit Larras

Antoine Frappé

Andreas Kaiser

An aggregator-less distributed smart sensor network with selective data exchange

Keywords: Wireless Sensor Networks, Distributed Intelligence, Smart Sensors, On-edge Computing

Sensor Networks (SN) could be defined as networks of autonomous devices that can sense and/or act on physical or environmental conditions cooperatively. In sensor networks, data is typically sensed and sent to an aggregator that will process it with local AI or send it to a cloud with larger AI. This centralized architecture has drawbacks such as the aggregator having to receive and process a potentially huge amount of data, which results in power consumption that can be significant. In addition, the transmission of all the sensor data results in extra consumption of energy due to communication. To reduce the impact of this last point, on-edge computing allows data to be preprocessed at the sensor level. It is often used in the architecture of distributed sensor networks in which each node receives data from other nodes in the network and processes it with its local data. In this work, a distributed sensor network model aims to solve this problem while reducing the impact of data transmission on energy consumption. The proposed model is able to reduce the number of transmitted bits per node by 90% in a nodeto-node directed communication scenario. It is also capable of working with different AI paradigms depending on the required balance between energy consumption, application configurability, and accuracy. Finally, this model is capable of converging even in a network without complete interconnections between nodes.

I. INTRODUCTION

Sensor Networks (SN) could be defined as networks of autonomous devices that can sense and/or act on physical or environmental conditions cooperatively [START_REF] Kulkarni | Computational Intelligence in Wireless Sensor Networks: A Survey[END_REF]. In most SNs, data measured by the sensor are sent to an aggregator that will preprocess them and send them to the cloud (or the fog) to be processed by a centralized AI. Posture recognition (PR) is an interesting use case for SNs like wireless body area network (WBAN) [START_REF] Movassaghi | Wireless body area networks: A survey[END_REF]. Posture is defined as the manner in which the skeleton and muscles hold the body during different activities [START_REF] Ivanenko | Human postural control[END_REF]. Figure 1 shows different WBAN architectures and their power consumption distribution. However, as shown in [START_REF] Larras | On the Distribution of Clique-Based Neural Networks for Edge AI[END_REF], centralized structures, such as presented in a) in Figure 1, have three main drawbacks:

1) The aggregator has to be able to process a potentially enormous amount of data in real-time. This leads to a trade-off between the energy consumption and the computing capabilities of the system. 2) Transmitting all the sensors' data is another problem that can hurt the battery lifetime of the sensor network nodes. Indeed, the energy consumption overhead due to communication is usually large when sending raw data to the aggregator. 3) Finally, transmitting the sensed data does not guarantee information privacy in case of interception by a malicious individual.

To reduce the impact of the first two drawbacks, "on-edge" computing allows pre-processing of the data at the sensor level with AI and, therefore, reduces the amount of data to broadcast to the aggregator. On-edge computing is often used in distributed models of smart autonomous SNs where the intelligence is split among the sensors of the networks and where no aggregators act as a master device, as presented in b) in Figure 1. However in [START_REF] He | A 28.2 µC Neuromorphic Sensing System Featuring SNNbased Near-sensor Computation and Event-Driven Body-Channel Communication for Insertable Cardiac Monitoring[END_REF], He et al. present a power breakdown of a node and compare centralized and distributed architectures. It shows that even if TX consumption is lower than in the centralized model, the distributed model is not as interesting as the centralized architecture in terms of power consumption due to memory and computation parts.

In [START_REF] Larras | On the Distribution of Clique-Based Neural Networks for Edge AI[END_REF], Larras et al. present a distributed architecture of a Clique-Based Neural Network (CBNN), in which only the index of the activated neuron is transmitted among the nodes. Therefore, the amount of transmitted data reduces to ©IEEE Version submitted for final publication in IEEE ISCAS 2023 log(N Cluster )+log(N N eurons ), with N Cluster and N N eurons , the number of possible global states (clusters) and number of local states (neurons), respectively. However, CBNNs rely on a specific architecture because the cliques need to be a priori defined.

In the case of an aggregator-less distributed SN architecture, this paper proposes to investigate the impact of the reduction of the volume of exchanged data to unique beliefs, which are nodes' local decisions/classifications of the global context. This is illustrated in c) in Figure 1. Section II introduces the proposed model by presenting the structure of a node in the SN and the training and test setups in the context of posture recognition. Then, the performance of this architecture is detailed in Section III-A and compared with the distributed approach in Section III-B. Section III-C shows the impact of limited network connectivity on the performance. Finally, this work is compared with other works in Section III-D and concluded in Section IV.

II. PROPOSED MODEL A. Nodes of the Network

As presented in Figure 2, each node is composed of a sensor and/or an actuator, an AI processing block (classification tree, neural network, ...), and a TX/RX interface used to communicate with neighboring nodes within communication range. As explained in Section I, the model aims at reducing energy consumption at the node level. One of the leads to achieving this would be to avoid transmitting raw data or pre-processed data. The solution explored here is that each node only broadcasts o n , the local classification of the posture. This o n is named belief because, after one iteration of communication within a graph, it can lack information and be wrong at first, but it will get more and more precise as the nodes exchange their beliefs. Another benefit of only transmitting o n as a representation of the global context is that it largely reduces the amount of data to transmit compared with a system that exchanges raw or pre-processed data. Indeed, with this model, k bits are used to exchange 2 k contexts. However, when exchanging only beliefs, the global classification accuracy can be altered. This work studies application scenarios and techniques to show that the possible gain in energy is considerable with a minimal drop in accuracy.

B. Test Setup

To analyze the model of smart sensors presented in Section II-A, tests were performed using the PR dataset presented in [START_REF] Duggal | Dataset for IoT Assisted Human Posture Recognition[END_REF], and available in [7]. It is composed of data from 3 accelerometers and 3 gyroscopes placed by pairs on the chest, the knee, and the back of 2 types of populations: healthy and unhealthy subjects. Data is aggregated via Arduino and processed using classification algorithms to determine the posture: sitting, standing, or sleeping. This dataset, including both types of population, is here referred to as the global dataset. This global dataset is shuffled and separated into two sub-datasets: the global training dataset and the testing dataset. The training dataset is composed of 80% of the global one and the testing one of the remaining 20%.

The network is represented as a directed graph in which edges represent communication from one node to another. As each node of the network embeds its own local AI, it should be trained independently. The script also checks the balance of each output and it duplicates lines if the balance is not respected. Finally, it shuffles the local training dataset. During inference, each node of the network reads the associated quantized input value in the test dataset and performs the inference to obtain o n . Then, it broadcasts this output to its neighbors and receives their beliefs. When the network has converged to one of the possible contexts, the average accuracy over all the nodes in the graph is computed. Then, each node reads the next value in the test dataset, and so on.

III. RESULTS

A. Embedded AI Model

The complete system is modeled using Matlab ® , according to the test setup presented in Section II-B. The initial setup is a full-connectivity SN with 6 nodes. Each node of the SN represents one of the 3 accelerometers or 3 gyroscopes. Even though they are placed by pairs (an accelerometer combined with a gyroscope) in the experiment, the setup here considers a single sensor per node to effectively demonstrate the applicability of the proposed distributed model. Table I compares three different AI paradigms that could be implemented as local intelligence in a node. To determine which paradigm is the more suitable for the proposed model, the considered metrics are the test accuracy averaged over all nodes of the SN, the number of bits transmitted per node when new information is sensed (referred to as stimulus), the number of MAC operations per node and per stimuli (to define the required complexity of the local AI, and thus the associated consumption), and the configurability to address different applications, such as the number of layers, nodes, clusters, etc. The number of bits transmitted per node and per stimulus and the number of MAC operations per node and per stimulus are defined as follows.

BT S = So n * C (1)
Where BT S is the number of bits transmitted per stimulus, So n is the size of o n in bits, and C is the number of directed communications, from a node to its neighbors, required to converge. Comparisons will be done using directed node-tonode communications.

M AC sti = M AC Inf * I (2)
Where M AC sti is the number of MAC operations per node and stimulus, M AC Inf is the number of MAC operations per inference, and I is the number of inferences needed to converge.

Each model has been designed to reach an accuracy higher than 99.5%. Classification trees offer the best performance regarding the metrics. However, a specific tree is required per node and per localization, which largely impacts the configurability for different scenarios. K-nearest neighbors algorithms are more flexible than classification trees, but they need 146× more M AC sti . The neural network used in this work is a feed-forward network composed of 3 fully-connected layers of dimensions 9 (3 local inputs, 1 reset flag and 5 neighbors' beliefs), 10, and 3, respectively. While offering excellent reconfigurability, it shows similar performance to classification trees in terms of communication overhead. The drawback is the higher complexity highlighted by the number of MAC operations per stimulus. From this comparison, neural networks seem to be the best compromise between performance and flexibility, especially when a node is removed or displaced. In this case, to adapt to the new situation, only the local and neighbors' neural networks need to be retrained and not the complete system. This is particularly beneficial when the number of nodes is extremely large.

B. Comparison with distributed architecture

Figure 3 compares this proposed belief-based distributed architecture with a traditional distributed architecture, in the case of a fully-connected graph. For each model, the data from the sensors is identically normalized on [-1; 1] and quantized into 5 bits. These values are the inputs of neural networks as described in Section III-A. The metrics presented in (1) and ( 2) are used to compare the performance between the two architectures. Thanks to the fact that the nodes only exchange beliefs, the local intelligence block obviously needs to process a reduced amount of data, compared to a system that exchanges raw data. In the case of PR with the dataset presented in [START_REF] Duggal | Dataset for IoT Assisted Human Posture Recognition[END_REF], it leads to a reduction in the number of M AC sti of about 5%, while the amount of BT S drops by a factor of 10 (90%), in the case of a node-to-node communication scenario. Hence, it is shown that if a small variation in accuracy is tolerable, a belief-based distributed model helps to reduce both the computations and communication needs of a single node. It is an excellent lever to reduce the global energy consumption of an autonomous decision-making node, in an aggregator-less distributed SN architecture.

C. Impact of Connectivity

In this section, the robustness of the model is studied. Starting from a fully-connected directed graph with n nodes, a script randomly removes the edges one by one until it reaches a certain percentage of connectivity C, which equals the number of edges in the final graph divided by the number of edges in the fully connected version. However, to consider the final graph valid, a few rules should be respected:

1) The final graph must be unique. Since edges are randomly removed, any final graph that is composed of two distinct graphs should be discarded. 2) Each node should keep its self-connection to be able to understand some recurrent relations if needed. 3) Each node should have at least 1 predecessor and 1 successor (without counting its self-connection) to ensure all information is transmitted. The goal is to avoid working with too specific topologies of networks and evaluate the robustness of the proposed model in a general case.

The impact is evaluated using 4 sets of 6 randomly generated graphs per set. Each series has connectivity C of 40%, 50%, 65%, 75%, 80% and 100% (the reference, shown in red in the figures). Figure 4 presents the evolution of the metrics presented in ( 1) and ( 2) with respect to the connectivity value. As expected, Figure 4a shows that reducing the SN connectivity degrades the test accuracy. A large reduction of accuracy is observed for C lower than 65%. Figure 4b and4c show that as the connectivity decreases, M ACs Sti and that the number of BT S decrease.

Hence, the proposed model is able to converge even when all nodes are not connected to each other. However, there is a trade-off between accuracy and power consumption. This conclusion is only valid for a reduced number of nodes, such as in this posture recognition scenario. This should be explored further in scenarios with a greater number of nodes.

D. Comparison With the State of the Art

Table II compares this model in the case of C100% with other state-of-the-art solutions 1 . The proposed distributed AI model reduces the number of MAC operations per stimulus by up to 70% compared to the centralized network. Thanks to its distributed architecture, this model also has the advantage of being implementable on-chip. It significantly reduces the latency that exists in a centralized model that relies on an aggregator. Finally, in the presented model, the SNs do not need to be fully connected in order to converge to a classification result, unlike the CBNN.

IV. CONCLUSION

In this work, a new distributed intelligence model that aims to reduce the energy consumption of smart sensors in SNs is developed. The belief-based model reduces the amount of data to be transmitted per stimulus by 90% compared to the common model of distributed SNs while providing decent accuracies at the system level. Finally, it is also shown that the proposed architecture is compatible with sensor networks with reduced connectivity.

Fig. 1 :

 1 Fig.1: Centralized, distributed and belief-based (this work) SN architectures and their power consumption breakdown per sensor, inspired from[START_REF] He | A 28.2 µC Neuromorphic Sensing System Featuring SNNbased Near-sensor Computation and Event-Driven Body-Channel Communication for Insertable Cardiac Monitoring[END_REF]

Fig. 2 :

 2 Fig. 2: Model of the node for the Distributed Sensor Network.

Fig. 3 :

 3 Fig. 3: Comparison of performance between Distributed architecture and this work (Matlab).

Fig. 4 :

 4 Fig. 4: Evolution of test accuracy, average M ACs Sti and BT S versus connectivity of the SN. C. Impact of Connectivity

  Thus, local training datasets should be extracted from the global training one. Local dataset extraction is performed on Matlab ® . The process is divided into 4 steps: 1) The possible local outputs for all combinations of the local inputs are retrieved from the global dataset. At the node level, the local inputs are sensed values, while the local outputs are the node beliefs. 2) The neighbors' label combinations associated with the local outputs are identified. For each output found in step 1, the script finds in the global dataset the combination of neighbors' local values that lead to it. If the local inputs are identical and their outputs are different, then the decision is more tricky. If one of the possible outputs is present in the majority of the neighbors' beliefs, then the entry with this output is kept while the others are discarded. Otherwise, the entry to keep is randomly selected among the possibilities. 4) The dataset is verified and cleaned. The script automatically adds a reset signal in the local dataset. It is a binary value associated with each local input, which indicates if the node has sensed a new value. A 0 means that the local input has not changed. If it is 1, the local

Then, it determines the neighbors' beliefs, creates entries for all combinations of neighbors' beliefs and local inputs, and stores this in a cell array. Steps 1 and 2 are repeated for each local input value of a node present in the global dataset.

3) The local dataset is assembled by concatenating all cell arrays of a specific node. Duplicate lines are identified and removed. This is done by comparing the combinations of local inputs and neighbors' beliefs. Different cases exist:

• If the local inputs are different, then each entry is kept. • If The local input are identical and their outputs are identical, then one entry is kept and the other one discarded.

• value has changed, and an entry is then added to the dataset. In this new entry, the neighbors' beliefs are set to a reset state "R" and the output is randomly chosen among the possible label associated with the local input. Random selection is done to avoid output imbalance in the training dataset.

TABLE I :

 I Comparison of AI models

	AI	Classification	K Nearest	Neural
	Paradigm	Tree	Neighbors	Network
	Average test accuracy	99.99%	99.79%	99.75%
	BT S	60.07	60.53	73.36
	M AC sti	149.5	21876.8	396.8
	Configurability
	over	Low	High	High
	application

TABLE II :

 II Comparison with the state of the art

		[Gupta,	[Larras,
	Reference	GLOBECOM	JETCAS 20]	This Work
		21] [6]	[4]
	SN Architecture	Centralized	Distributed	Fully Distributed
				Fully-
	AI Model	KNN	CBNN	Connected Neural
				Network
	Test Accuracy	100%	99.72%	99.75%
	TX data
	width at the	48 bits	2 bits	2 bits
	node level
	Number of
	M AC sti over the 6	8100	Not Indicated	2380.68
	sensors
	On-chip im-plementation	No	Yes	Compatible

This work was supported in part by the AI Engineering PhD@Lille program and by french ANR : ANR IA/JUNIA/ ISITE

for the works of Gupta et al and Larras et al, the results were extrapolated as if they were used with the present dataset


C Fouqué

P Moutou

A Petit

A Carmona

Kóspál

P Crozet

J Morin

A J Ross

S Bellotti

J F Donati

P Fouqué

C Moutou

P Petit

A Kóspál

A G Adam

D W Tokaryk

Correlations between laboratory line lists for FeH, CrH, and NiH and M-star spectra collected with ESPaDOnS and SPIRou

Keywords: M-type stars, Stars: magnetic field, Molecular data, Radial velocities, cross-correlation analysis

Correlations between laboratory line lists for FeH, CrH, and NiH and M-star spectra collected with ESPaDOnS and SPIRou

Introduction

The extended study of cool stellar objects, and concurrent discoveries of exoplanets, has led to a demand for more reference data of diatomic molecules seen in stellar atmospheres, species that can also be formed in plasma and flame environments in the laboratory. Accurate line lists, that include as many relevant species and transitions as possible, are essential for generating synthetic spectra to improve determinations of stellar properties, such as temperature, Doppler shifts, stellar magnetic fields, and rotation, either from direct comparison or from cross-correlation (CC) calculations. Precise and complete line lists -including molecules -for M dwarfs will be particularly valuable if such data can explain the diverse behaviour of several subsets of spec-Our line lists are available in electronic format only. They can be obtained from the CDS via anonymous ftp to http://cdsarc.cds.unistra.fr/ or via https://cdsarc.cds.unistra.fr/ tral lines, with key applications for velocimetry and magnetometry (e.g. Klein et al. 2021;Bellotti et al. 2022). We consider here some molecular transitions expected to be sensitive to magnetic fields, aiming to identify and characterise those likely to have sharp and deep features that should be well suited for such diagnostics via CC calculations. Our laboratory work on FeH, NiH, and CrH falls in the visible and near-infrared regions; we present comparisons with data from ESPaDOnS (Echelle SpectroPolarimetric Device for the Observation of Stars; Donati 2003), which operates in the optical region 0.37-1.05 µm, its twin instrument Narval [START_REF] Aurière | Magnetism and activity of the sun and stars: an international conference to honor the work of Jean-Louis Leroy[END_REF] at the Pic du Midi, and SPIRou (SpectroPolarimètre InfraRouge; Donati et al. 2020) in the nearinfrared (0.95-2.5 µm). These spectropolarimetric data have already been analysed in the context of stellar magnetism and radial velocity (RV) determinations (Donati et al. 2008;Morin et al. 2008;Morin et al. 2010;Cristofari et al. 2023;Carmona et al. 2023;Bellotti et al. 2023).

A&A proofs: manuscript no. 47498_accepted

Cross-correlation is a powerful tool that has been successfully applied in a variety of scientific fields, from signal processing and wireless communications to quantum physics. In the context of stellar astrophysics, Doppler shifts supply one correlation function linking stellar spectra with laboratory-measured 'masks', consisting of reference collections of atomic or molecular transitions. Information can be extracted at several levels, starting with whether the species is present. Spectral details then lead to estimates of temperature (at thermal equilibrium or otherwise), RV, magnetic field characteristics, surface gravity (through pressure broadening of spectral lines), and relative chemical abundances. Precise RV determinations have been used to detect exoplanets around stars for more than 2 decades, following evidence from Mayor & Queloz (1995) of an extra-solar planet around a Sun-like star. Their CC approach was introduced for cool dwarfs of spectral type FGK that feature mostly atomic lines and a well-defined continuum. Moving towards cooler M dwarfs, atomic transitions become fewer and weaker, and molecular bands emerge. Molecular line lists are notoriously less precise than atomic ones, and purely synthetic masks can be insufficiently accurate to give precise RVs. Different approaches have been proposed to compensate for these issues. Optical developments and new algorithms to describe the instrumental response of the High Accuracy Radial velocity Planet Searcher (HARPS) spectrometer have resulted in precise RVs via 'template matching', effectively averaging many spectra of the object of interest (Anglada-Escudé & Butler 2012). An alternative 'line-byline' approach, employed for example in papers by Dumusque, X. (2018), Lafarga et al. (2020), andArtigau et al. (2022), determines RVs from individual features, then recognises and excludes outliers prior to averaging the outcomes. Molecular templates have also proven helpful in probing exoplanetary atmospheres. Pioneering work by Snellen et al. (2010) extracted evidence for strong winds on exoplanet HD209458b from RV results derived from CC functions with resolved CO lines around 2.3 µm. The review by [START_REF] Birkby | Spectroscopic Direct Detection of Exoplanets[END_REF] illustrates the importance of information from high-resolution (ground-based) instruments for the detection and characterisation of exoplanets and their atmospheres, and highlights the power of the CC approach.

Absorption spectra from cool stellar objects display rovibrational and/or electronic bands of small molecules (mostly diatomic oxides and hydrides, and water) as well as strong atomic features, providing further insight into chemistry and conditions. There is some bias induced by the intrinsic strength of the optical transitions, with the lighter Group II and first-row transition metal diatomics dominating the picture. Their numerous molecular signatures, particularly in the near-infrared (Y, J, H, and K bands) allow the identification of species in photospheres with certainty, thanks to precise molecular line lists, typically with ∆λ/λ ≤ 2 × 10 -7 , widely distributed in rotational quantum numbers. Because many of the species stable above 1000 K are open-shell fragments of chemically stable laboratory precursors, many of them are sensitive to magnetic fields. Magnetic response depends on the changes in quantum numbers (rotation and electronic) associated with a given spectral line, and this results in some transitions being effectively insensitive to the magnetic field whilst others show pronounced Zeeman effects. It is helpful to select the appropriate subset of reference lines to infer the influence of magnetic fields, assuming the relevant Landé factors are known. Attempts to model the Landé factors for transition metal monohydride radicals, either from laboratory work (Harker et al. 2013;Crozet et al. 2014) or from solar and stellar spectra (Afram et al. 2008;Shulyak et al. 2010), show that they are not trivial to predict.

Of course, there are limitations and complications. Contributions from different systems frequently overlap one another: TiO bands (McKemmish et al. 2019) stretch across the visible and near-infrared spectrum, and electronic bands of atmospheric oxygen overlap part of the A-X system of CrH at 764 nm. Whenever possible, it is preferable to work in a spectral range with a single dominant contribution, such as FeH around 1 micron [START_REF] Wende | A58[END_REF]. It is also true that Landé factors have been measured for few of the molecules of interest except at very low temperatures, notably from molecular beam experiments conducted in Steimle's group (Virgo et al. 2005;Chen et al. 2006Chen et al. , 2007;;Harrison et al. 2008;Qin et al. 2012) for TiO, TiH, CrH, and CaH, for example. Work is in progress in Lyon and in Fredericton, at the University of New Brunswick (UNB), to supply this information for selected transition metal hydrides, using highresolution laser spectroscopic techniques.

We collated metal monohydride (MH) transition wavenumbers from our own laboratory work and from literature sources to target reasonably narrow spectral windows across the nearinfrared and visible regions. We then used them to identify MH transitions in some M-star spectra recorded at telescopes at Pic du Midi (Bernard Lyot Telescope) and on Maunakea (Canada-France-Hawaii Telescope), and to extract RVs via CC calculations. The values from the molecular data are found to match values derived from atomic masks, even though it is sometimes difficult to recognise spectral features at a glance. The bandheads of the A 6 Σ + -X 6 Σ + system of CrH and F 4 ∆ -X 4 ∆ system of FeH emerge clearly in the stellar spectra we have selected, but NiH contributions do not. They are spread across the visible region and overlap with strong contributions from TiO. Even though individual lines cannot be identified, we find that NiH is present in some sources. It seems to be a genuine result because a 'deuterium test', following Pavlenko et al. 2008 and performing the same calculation using a mask constructed for NiD (not expected to be present), gives a negative outcome. CH, SiH, and NH radicals are already included in the widely used Vienna Atomic Line Database (VALD) (Ryabchikova et al. 2015), but only one metal hydride, MgH, is found there1 . We make a case for adding a few more. Sources such as MoLList (Bernath 2020) and ExoMol (Tennyson et al. 2020) offer more extensive, high-temperature line lists for FeH and CrH, but not all entries match experimental precision. This contribution is intended as a supplement and not a replacement, since the focus of our work is on defining selective diagnostic transitions.

In the following, we give a description of the CC approach used here, to be applied with narrow-band spectral masks, and then discuss some optical transitions suitable as molecular templates in the investigation of spectra from some M-dwarf stars, recorded on the ESPaDOnS, Narval, and SPIRou spectropolarimeters. We use CC to show that these systems retrieve RVs with degraded signal-to-noise ratios (S/Ns) for magnetically active objects. We use CrH to illustrate that the density of the spectrum in the presence of a magnetic field is such that very few sharp, deep features remain in the mask. The RV determined in this way is closer to reference data, but the statistical uncertainty remains large.

Cross-correlation functions

The CC method described by Tonry & Davis (1979) and by [START_REF] Queloz | New Developments in Array Technology and Applications[END_REF] seeks the optimum match between a stellar spectrum and a reference mask, when the mask is Doppler-shifted by small steps of RV. We took sampling steps of 0.5 km s -1 in our calculations. The correlation curve should ideally be a flat baseline with a single sharp peak. The mask can be either a simulated model-star stick-spectrum or a fully calibrated line list obtained in the laboratory.

Two strategies emerged for the intensity of the reference mask: the elements of the stick spectrum can either be weighted, assuming relative intensities are known, or given a uniform influence (binary mask). Pepe et al. (2002) showed that significant improvement in the S/N of the correlation curve can be achieved with proper weighting, but intensity data are not always available. We investigated the performance of weighted and binary masks on a subset of data for FeH where lines were well resolved, and found very little difference in the S/N, or the RV result. A more sophisticated approach would incorporate weighting according to the S/N of the stellar spectrum. We have not done this, as our tests are performed over small spectral regions, but this strategy would have to be implemented were CC functions to be calculated over a very wide domain, with different line parameters and S/Ns.

If the correlation calculation gives a successful outcome, the peak is fitted to a Gaussian function, yielding a RV in the heliocentric rest frame (assuming the barycentric correction has already been applied to the telescope input data). A S/N can be obtained by taking the amplitude of the correlation curve lying outside the correlation peak as noise. We developed procedures to do this in Igor pro software (Wavemetrics Inc).

Telescope spectropolarimetric data and laboratory line lists

3.1. Stellar spectra from ESPaDOnS, Narval, and SPIRou

Because of our interest in the Zeeman effect in MH molecular radicals, we selected data for some M-type dwarfs that span a wide range of magnetic activity, including several stars that are known to host very strong magnetic fields as test cases. Spectra recorded on ESPaDOnS and its twin instrument Narval came from the PolarBase (Petit et al. 2014) data archive of stellar spectropolarimetric observations. Spectra from SPIRou were measured as part of the SPIRou Legacy Survey2 described by Donati et al. (2020), and processed as part of the followup SPICE programme3 . SPIRou wavelength-calibrated telluriccorrected spectra and polarimetry data products were obtained using the APERO pipeline (Cook et al. 2022)

Laboratory line lists

FeH data in the visible. Most of the high-resolution spectroscopy of FeH in the visible region was performed by the J.M. Brown group in Oxford in the 1990s, reacting Fe(CO) 5 with atomic hydrogen (Fletcher et al. 1990;Carter et al. 1993;Goodridge et al. 1997;Wilson & Brown 2001a,b). Several electronic transitions are known, as illustrated in Fig. 1, originating from the electronic ground state, and from low-lying sextet states. Strong transitions were observed from the lowest (metastable) sextet state, a 6 ∆, which was populated under their laboratory conditions. ∆Ω =-1 and 0 transitions in the e 6 Πa 6 ∆ system around 535 -540 nm (Goodridge et al. 1997;Wilson et al. 2001;Wilson & Brown 2001a), ∆Ω = 0 and +1 transitions in the g 6 Φ -a 6 ∆ system near 493 nm (Carter & Brown 1994) have been reported in the literature. We took information on the origin (0-0) bands of both systems to create masks for CC calculations. The e 6 Π -A 4 Π transition at 510 nm indicated with dash-dot line in Fig. 1 is formally spin-forbidden and weak. It has not been included in the compilation for CC, but will provide a route to experimental determination of Landé factors for the low-lying A 4 Π state in future work.

FeH data in the near-infrared. Two quartet systems are well-known contributors to spectra of cool stellar objects and sunspots. The F 4 ∆ -X 4 ∆ 'Wing-Ford' band near 0.99 µm studied in detail for example by [START_REF] Wende | A58[END_REF] ) and E 4 Π -X 4 ∆ bands around 1.35 µm are much better placed for the optics of the SPIRou instrument. We took line lists from the Kitt Peak National Solar Observatory (NSO) database (Balfour et al. 2004;Hargreaves et al. 2010) to apply the CC method to the spectra of some M stars recorded by SPIRou.

CrH data. The origin (0-0) band of the A 6 Σ + -X 6 Σ + system of chromium monohydride near 862 nm is a marker proposed by Kirkpatrick et al. (1999) and by Burrows et al. (2002) for L-type brown dwarfs. Slightly weaker, the (1-0) band near 764 nm is conveniently placed for laboratory studies, but it overlaps with the atmospheric A-band of O 2 , and is therefore less useful for astrophysical purposes. The A-X (0-1) CrH band at 996.9 nm Kuzmychov & Berdyugina (2013) noted that CrH could provide a very sensitive diagnostic for magnetic field, with the degeneracy of rotational levels splitting very quickly in the presence of very modest magnetic fields. The Zeeman/Paschen-Back effect in the electronic ground state has been studied and modelled in the laboratory (Corkery et al. 1991;Lipus et al. 1991), but the excited states are much more challenging, with very strong perturbations making the spectra very irregular even in zero-field conditions, as noted by several authors, notably [START_REF] Ram | [END_REF], Bauschlicher et al. (2001), and Chowdhury et al. (2006).

The best available CrH atlas, from Burrows et al. ( 2002) combines constants derived from unperturbed transitions with ab initio results (including transition dipole moments) and covers the electronic spectrum of CrH from 0.67 to 1.0 µm. This atlas is part of the Bernath (2020) MoLLIST database. It has been adopted on the ExoMol website developed by Tennyson et al. (2020), and can be used to generate a synthetic spectrum at any desired temperature or resolution. This work nevertheless fails to reproduce the true positions of many spectral features, with 'observed' minus 'atlas' wavenumbers sometimes in excess of 1 cm -1 ; this was reported as a handicap for applications in stellar spectroscopy by Pavlenko (2005) and Reiners et al. (2007). Focusing on the 0-0 band-head regions, the Lyon group re-recorded laser excitation spectra of CrH produced in a discharge source in order to fine-tune the reference line list. An 'effective parameter' fit with the PGOPHER program from Western (2017) can reproduce our transitions with rotational quantum number N ≤ 15 with an rms deviation < 0.025 cm -1 , assuming an in-teraction between a single vibrational level of a4 Σ + state and v=0 of A 6 Σ + . Figure 2 illustrates the situation, with the upper traces corresponding to the PGOPHER and Atlas models, and the lower trace a small part (11598-11612 cm -1 ) of a laboratory laser-excitation spectrum at Doppler resolution. We also recorded the R-head of the (0-0) band of the A-X system of CrH when forming the molecule between permanent magnets, and established that PGOPHER reproduces the observed Paschen-Back splittings properly for fields up to 0.5 tesla. A PGOPHER data file is available in electronic format from the CDS, as supplementary material. Although a few inaccurate transition wavenumbers will not prevent CrH from being recognised in a spectrum, they will be critical for magnetic field diagnostics near the band origin, where the lowest rotational lines produce the best-resolved magnetic components, and the most distinctive patterns in Stokes-V signals.

NiH data. The low-lying coupled states of NiH have been studied by Fourier-transform resolved laser-induced fluorescence, with a view to understanding the rovibronic structure of this relatively simple system (just three electronic states are close in energy, each with a single unpaired electron (Gray et al. 1991;Abbasi et al. 2018;Havalyova et al. 2021). The transitions measured during this project now form a stand-alone low-temperature line list, and we used this for the CC calculations here. The original dataset from Vallon et al. (2009) has since been extended further to the blue (Ross et al. 2012;Harker et al. 2013); the corresponding data for 58 NiH are available on the ExoMol database 4 . Ross et al. (2012) and Harker et al. (2013) also recorded and analysed Zeeman patterns for many but not all of these transitions.

Results and discussion

FeH sextet line lists (visible)

The results of three CC calculations for FeH are shown in Fig. 3. The uppermost trace shows the CC function using the g 6 Φ -a 6 ∆ mask alone (117 reference lines in range 20058-20459 cm -1 , or 488.65-498.41 nm), and the lowest one uses 116 ∆Ω = ∆Λ lines in range 18621-18952 cm -1 (527.50-536.88 nm) in the e 6 Πa 6 ∆ system. The RVs determined from Gaussian profile fits to the e -a and g -a correlation peaks differ by 75 m/s. The central trace shows the sharper and cleaner result obtained when combining these two. The g-a and e-a line lists give consistent RV determinations for GJ 1002, (RV=-40.01± 0.03 km s -1 ), in good agreement with the literature value indicated in Table 1. Combining the two masks results in a S/N improvement of the order of √ 2 in the central trace of Fig. 3, as expected from approximately doubling the number of lines in the mask. We retained the combined (g-a plus e-a) mask, and applied it next to spectra from increasingly magnetically active stars. The results are shown in Fig. 4, with CC functions for four of the stars listed in Table 1. All four show sharp correlation peaks, confirming that these sextet transitions do contribute to the M-star spectra. The S/Ns between 7 and 10 in the correlation peaks suggest that this contribution is significant. The RVs reported in Table 2 are very close to those obtained from the literature, from Lafarga et al. (2020). The 30% increase in full-width at half maximum from lowest to topmost trace in Fig. 4 probably reflects a combination of increasing stellar rotation and magnetic activity. To ensure that these correlation peaks are not chance matches, we ran the same CC calculations with line lists for FeD reported recently by Harvey et al. (2023). As expected, none of the stellar spectra produced a correlation peak with FeD data.

Laboratory results. The question then becomes how to generate reliable effective Landé factors for each of the transitions listed in the g 6 Φ -a 6 ∆ and e 6 Π -a 6 ∆ datasets. Our laboratory work establishes that the electronic states involved do not follow pure Hund's coupling cases (a) or (b) according to the state symmetry, so some work is required to guide models, before the least squares deconvolution calculations habitually employed to determine longitudinal magnetic field from stellar Stokes-V spectra (Donati et al. 1997) can be applied. Models for unperturbed electronic states (Semenov et al. 2016; Western 2017) can give a useful starting point, but need refining. To initiate this study, some laser excitation spectra were recorded (at UNB) in static 3), fwhm = 6.9(4) km s -1 ; GJ 49 RV= -6.4(1), fwhm = 6.7(3) km s -1 ; and GJ 1002 : RV= -40.01(3), fwhm = 5.9(3) km s -1 . The 1σ uncertainty is quoted in parentheses in units of last digit. magnetic fields up to 0.6 tesla. Figure 5(a) illustrates a simple Zeeman pattern, with a splitting of 0.61 cm -1 (=0.17 Å) between the two σ profiles of a P line with unresolved Λ-doubling. The individual M J components are unresolved at Doppler resolution (≈ 0.01Å) with our discharge source. The Zeeman pattern shown in Fig. 5(b) for the Q 2 (3.5) line is more complex, with well-resolved Λ-doubling in zero-field conditions. At 0.56 tesla, the partially resolved M J structure of the Q 2 (3.5) line extends over 0.7 Å. Contributions from the two Λ-components overlap. The e 6 Πa 6 ∆ system clearly has potential for magnetic field diagnostics, and we are pursuing this study in the laboratory. Analysis yields effective Landé factors intermediate between Hund's case (a) and Hund's case (b) limiting values. For P 1 (4.5), g J =1.393 and g J = 1.344 ; for Q 2 (3.5), we find g Je =0.906, g J f =0.887 and g Je, f = 1.312. The statistical uncertainties were 0.001.

FeH quartet line lists (infrared)

The F 4 ∆ -X 4 ∆ system of FeH around 1 µm has been extensively studied, and is well established as a diagnostic for conditions in cool stellar objects [START_REF] Wallace | [END_REF]Dulick & Valenti 2000;Shulyak et al. 2010;Reiners & Basri 2007). We focus here on the E 4 Π -A 4 Π system in the H band, and the E 4 Π -X 4 ∆ system in the J band, as they are ideally suited to detection with SPIRou, and for analysis of stellar spectra. An extensive high-temperature line list for the E 4 Π -A 4 Π system around 1.6 µm and for the E 4 Π -X 4 ∆ near 1.3 µm, (see Fig. 1), was published by Balfour et al. (2004), following their analysis of a thermal emission spectrum of FeH produced in a King furnace (T 2400 deg C), recorded at the NSO at Kitt Peak (NSO archive catalogue 1983/01/19#2). Wallace & Hinkle (2001) searched for these transitions in stellar spectra recorded in the 1990s, but reported 'A cross correlation of E-A line positions from the King furnace spectrum with an archival high-resolution 4 m FTS spectrum of the M2 dwarf GJ 411 shows a clean peak at the stellar velocity even though the S/N ratio is not high enough to allow detection of individual lines'. The situation is much improved now, with the sensitivity and resolution offered by SPIRou. The SPIRou spectrum from GJ 411 shows very clear matches with the NSO spectrum in the E-A region (see Fig. 6), and a very similar plot is obtained for AD Leo (GJ 388). This rehabilitates FeH in the 1.3-1.6 micron region for stellar diagnostics. Souto et al. (2020) also mentioned this, and added a caveat to the effect that the reliability of FeH as a temperature indicator is limited by the present precision of g factors. Figure 7 illustrates the outcome of CC calculations to determine RVs for the stars GJ 411, GJ 388 and GJ 873 from spectra recorded with SPIRou (including barycentric Earth RV corrections) using the E-X and E-A line lists. The threefold difference in the S/N in the correlation functions derived from these two infrared bands partly reflects the transition dipole moments for the two electronic systems: the E-X bands were actually weaker in the NSO spectrum than E-A, despite a higher population density in the electronic ground state. Magnetically inactive GJ 411 gives the sharpest correlation function. For magnetically active GJ 388, the E-A system at 1.6 µm gives RV=12.24(1) km s -1 and the E-X mask 12.22(1) km s -1 with a slightly broader correlation peak. The values are compatible with literature values. Both masks perform less well for GJ 873, although the RV determination of -0.08(1) km s -1 remains compatible with the values of 0.28 ± 0.13 and 0.36 ± 0.13 km s -1 derived in Morin et al. (2008). Degraded performance could equally be the consequence of more than one species contributing to the stellar spectrum. Both the E-X and E-A masks are currently less than optimal because we used a zero-field mask for lack of Landé factors when both GJ 388 and GJ 873 are known to be magnetically active (see Table 1). Approximate Landé factors for the E-A system, estimated from spectropolarimetric studies of sunspots (Asensio Ramos et al. 2004), suggest that neither electronic state follows the limiting Hund's case coupling schemes, but no high-resolution laboratory data measurements are yet available. Our attempts to remedy this were unsuccessful, probably because the chemistry producing FeH from iron pentacarbonyl and hydrogen atoms yields mostly ground state products. In fact, we failed to detect E-A transitions even in zero field conditions in laser excitation, using a low-power diode laser and InGaAs detector. Zeeman studies were therefore out of the question. Future work will probably aim to use pump-dump laser experiments via stronger transitions to obtain this information.

CrH A-X system at 862 nm

CrH has been adopted as a diagnostic tool in the context of L-type brown dwarf stars (Kuzmychov & Berdyugina 2013;Kuzmychov et al. 2017) and even exoplanetary atmospheres [START_REF] Braam | [END_REF]), but less for the atmospheres of M-type stars (Pavlenko (2014)). It would be reasonable to expect CrH signatures to appear alongside, or even overlapping with, FeH features, between 750 nm and 1 µm. We included Paschen-Back effects in CrH to improve spectral masks and then used them with the CC technique to test for the presence of CrH in some red dwarf stars. The calculated mask changes enormously with magnetic field, as illustrated in Fig. 8 where the upper trace shows a simulation with ∆M J = ±1) transitions only, corresponding to ⊥ linear polarisation in the laboratory with respect to magnetic field orientation. We performed CC function calculations, taking masks first from the usual zero-field atlas from Burrows et al. (2002) and then from a series of predictions generated with parameters from our PGOPHER fits, taking the <B> values cited in Table 2. The PGOPHER predictions between 11502 and 11610 cm -1 , or 862 -869 nm, were restricted to upper state levels v=0, N ≤ 15, and calculated for ∆M J = ±1 transitions at chosen magnetic field strength. The outcome is shown in Fig. 9, with the correlation function with the zero-field atlas shown above the result for nonzero <B> in each case. The reference atlas performed very well for GJ 1002, which is known to be a weakly active star with low magnetic flux. The peak at RV -39.71(2) km s -1 matches determinations from atomic data. The zero-field atlas actually gives a flatter baseline and narrower correlation peak than the PGOPHER mask at 0.08 T, from which the RV value is -39.31(2) km s -1 .

The correlation functions taken from field-free masks are particularly unconvincing for GJ 873, T = 3341 K, <B> = 0.453 tesla, and GJ 412B, T = 3000 K, <B> = 0.73 tesla although the telescope spectra are of comparable quality. The baselines of the correlation functions calculated for the reported <B> values (red lines) are somewhat smoother in Fig. 9. However, it is also clear that the sharpness of the correlation function decreases with magnetic field strength. Several factors contribute. One is that the spectrum becomes quasi-continuous under the combined effect of Zeeman/Paschen-Back splittings. A second is that large 'v sini' contributions from (rapid) stellar rotation broaden individual line profiles, and a third is that an average field strength in the direction of observation is assumed, ignoring any stellar magnetic field complexity. This will also blur the spectrum.

Having found that the CC functions with CrH data yielded plausible RV values, though performing less well for the stars with low RVs, we tried to use a similar approach to see if we could also determine average magnetic field strengths from CC peaks, using the S/N in the correlation peak as criterion for optimisation. We took GJ 412B as a test case. Masks were calculated for <B> = 0 to 0.8 tesla, in steps of 0.1 T. The S/N Fig. 9. CCs (normalised to unity) between spectra of increasingly magnetically active stars and CrH masks. A zero-field mask was used to compute the results shown in black. The strongly magnetically active stars give less noisy correlation plots when the Paschen-Back effect is included (shown in red). The correlation peak positions are sensitive to <B>. This is clearest for GJ 412B.

was highest (7) for the mask calculated at 0.6 T, giving a RV of 69.12(1) km s -1 . At 0.7 T, the RV determined from the CC function was 69.78(2) km s -1 . This implies that the A-X system of CrH is not necessarily the best diagnostic for magnetic field because of the density of lines, unless reliable RV information is available from other observations. Given a strong constraint on RV, the CC functions allow us to retrieve average magnetic field strengths to ± 0.1 T for GJ 412B and GJ 873 spectra. Laboratory work on CrH is still in progress, and we will discuss the use of CrH for M-dwarf magnetometry in a subsequent paper.

Figure 10 compares the spectra from ESPaDOnS close to the origin band of the A-X system of CrH with simulations from PGOPHER. The simulations took convolutions of line lists with profiles taking into account stellar rotation, limbdarkening, micro-and macro-turbulence, instrumental resolution and Doppler widths. The stellar parameters come from the literature (see Table 2). CrH features are not difficult to recognise in this R-head region for the cooler stars in our selection. There are some matches for the warmest star in our selection, GJ 49 with T = 3805 K. Even though the visual match for GJ 388 is less convincing, the corresponding correlation function in Fig. 9 suggests CrH is present. FeH persists at higher temperatures: the FeH Wing-Ford bands near 1 µm are more prominent in these spectra.

NiH: Visible systems

Some 50 years ago, a few features in sunspot spectra were attributed to NiH (Lambert & Mallia 1971;Wöhl 1971), but this has remained controversial. As far as we know, there have been no reports of NiH signatures in the optical spectrum of M-type stars. Figure 11 shows that features from several electronic systems of NiH cover the optical spectrum, without forming dis- tinctive band-heads seen for CrH and FeH. There is no obvious region where NiH features are likely to dominate a stellar spectrum. However, working with this mask taken directly from dispersed fluorescence spectra recorded in Lyon (Vallon et al. 2009;Ross et al. 2012;Harker et al. 2013), we now have some evidence from CC peaks displayed in Fig. 12 that NiH does contribute to the Stokes-I spectra of M stars. Only three of the M- type stars in our selection gave correlation peaks with the full NiH mask cited in Sect. 3.2 (2167 lines), which covers a spectral window 9970-19000 cm -1 (570-740 nm), and assumes that all three lowest-lying electronic states are thermally populated in the stellar source. Fuxrther tests showed there was no need to include the full laboratory spectrum in CC calculations. Only transitions between 13000 and 17500 cm -1 originating from the v=0 and 1 levels of the electronic ground state X 1 2 ∆ 5/2 , and from v=0 of X 2 2 ∆ 3/2 , actually contributed to the correlation peak. The optimised line selection is included in supplementary data files. Figure 12 shows the resulting CC curves using the reduced reference mask. Neither GJ 388 (illustrated in Fig. 12) nor GJ 49, the warmest stars considered here, showed any evidence of correlation with the NiH line list, but this (modest) increase in temperature does not explain our observation. Gaussian fits to the CC functions of Fig. 12 gave RVs very close to the values given in the literature (see Table 2). Testing with a mask of NiD lines gave no correlation at all, also suggesting that the small correlation peaks are not due to chance coincidences in line positions. We conclude that NiH is present in these mid Mdwarf atmospheres, although we cannot say which of the electronic bands make significant contributions. It is unsatisfactory in that we cannot identify individual lines of NiH, but these (often widely spaced) features overlap with more closely spaced lines in strong bands of TiO across the visible and near-infrared spectrum, and make only minor contributions to overall opacity.

The overview of RV determinations presented in Table 2 shows that RVs are for the most part determined to within 0.5 km s -1 of the reference values taken from Lafarga's compilation. The 1 σ statistical uncertainties quoted in units-of-last-digit, obtained by fitting the clean part of the correlation peak (away from baseline noise) to a Gaussian function, may be deceptively small. It is not unusual for absolute RV values to be sensitive to choice of mask and method. Carmona et al. (2023) discuss this in detail for AD Leo, deriving RV = 12.695(5) km s -1 with SPIRou

Conclusion

We investigated a small selection of early-to-mid M-type main sequence stars of known small-scale fields, <B>, up to 0.7 tesla, working with spectra recorded with the ESPaDOnS and SPIRou instruments at the Canada France Hawaii Telescope and Narval at the Bernard Lyot Telescope. We used existing optical and near-infrared laboratory data for three molecular species, FeH, CrH, and NiH, adding new laboratory measurements for CrH to establish reference line lists. These lists (available for download from the CDS) were then used to compute CC functions for our target stars in order to: confirm or refute the detectability of these transition metal MHs in the high-resolution spectra of cool dwarf stars; and assess their potential for precise velocimetry and magnetometry. The line lists are intended to be used either as a binary mask or with intensity patterns predicted from Boltzmann populations and theoretical transition strengths, as implemented by Burrows et al. (2002). They should be a useful supplement to established atomic reference lines, particularly when band structures are at least partly resolved, because they have the advantages of rarely being saturated and having less extensive spectral wings.

We illustrate the dramatic change in the absorption spectrum expected to occur when the magnetic response of CrH in its 6 Σ + states is taken into account, working with an effective Hamiltonian model to reproduce field-free spin-rotation splittings in the excited state, for low rotational levels. Even with this restricted database, we show that RVs and even magnetic field strengths can be predicted from molecular data alone. Optimising the wavelength range to be included in correlation calculations reduces computation time and limits the influence of chance coincidences with other species present. Above 869.4 nm, the CrH A-X 0-0 band overlaps with the 1-0 band of the F-X system of FeH, so it may be appropriate to truncate the CrH mask to focus on diagnostics from chromium hydride alone. In doing this, we find evidence for CrH in two of the warmer M stars in our selection, GJ 388 (AD Leo) and GJ 49. This was unexpected since, according to Allard et al. (2013), CrH is expected to appear clearly only in cooler atmospheres, when metal monoxides have condensed and contribute less to the gas phase spectrum. Our work shows that the 860 nm band of CrH, already identified as a valuable tool for L-type brown dwarf magnetometry (Kuzmychov et al. (2017)), can also potentially help characterise the magnetic fields of mid-to-late M-dwarf stars. Stokes-V measurements are likely to be particularly important in this context because of the spectral density arising from spin-rotation couplings in this optical system. Our simulations suggest that <B> values of the order of 0.08 T could be determined readily from high-resolution Stokes-V spectra, where Stokes-I features would remain unresolved and difficult to analyse from line profiles.

Our study, using CC techniques in conjunction with wellchosen electronic bands, has focused on showing that transition metal hydrides can be detected in a small selection of cool stars. Therefore, adding these new transitions to existing masks should help improve statistics for detection, perhaps even in exoplanets! The possible signatures of CrH in a hot Jupiter, WASP-31b, reported by [START_REF] Braam | [END_REF] were confirmed this year by Flagg et al. (2023) and provide a huge incentive to pursue laboratory investigations.

Acknowledgements

This work was supported by the French Programme National de Physique Stellaire of CNRS/INSU, (project LABSPIR / AO INSU AA 2022). We also acknowledge funding from NSERC Canada, and we thank the SPIRou Legacy Survey consortium for sharing data from the SPIRou instrument. JFD and AK acknowledge funding from the European Research Council (ERC) under the H2020 research & innovation programme via grant agreements #740651 NewWorlds (JFD ), and # 716155 SACCRED (AK). SB, PF, AC, JF-D,JM, acknowledge funding from the French ANR under contract number ANR18CE31-0019 (SPlaSH), and from the Investissements d'Avenir pro-

Fig. 1 .

 1 Fig.1. Some quartet and sextet electronic states of FeH, followingWilson & Brown (2001a). Arrows denote observations as excitation or fluorescence. Solid lines show the energy of the lowest spin-orbit component for observed electronic levels. Faint, broken lines indicate calculated (but currently unreported) levels fromLanghoff & Bauschlicher (1990).

Fig. 2 .

 2 Fig. 2. R-head region of the 0-0 band of 52 CrH A-X, at arbitrary scale. Shown in red is our fit, N' < 15. In blue is the calculated absorption cross-sections from the ExoMol software (Tennyson et al. 2020) based on the data from Burrows et al. (2002); the full intensity scale for the strongest line shown is 8 × 10 -15 cm 2 /molecule. A laboratory spectrum is shown in black. Dashed green lines indicate significant improvements in our model.

Fig. 3 .

 3 Fig. 3. CC functions between the Stokes-I spectrum of the weakly magnetic star GJ 1002 and (g-a), (e-a), and (g-a + e-a) masks. The curves are shifted vertically for convenience. The S/Ns on correlation peaks are 7.8 from (g-a), 7.5 from (e-a), and 10.6 from the combined mask.

Fig. 4 .

 4 Fig. 4. CC curves (normalised to unity) for Stokes-I spectra of the four sample M stars using the combined (g-a plus e-a) mask, with 213 lines. Fits to Gaussian profiles gave: GJ 412 B : RV= 69.1(2), fwhm = 8.8(4) km s -1 ; GJ 406 : RV= 19.45(3), fwhm = 6.9(4) km s -1 ; GJ 49 RV= -6.4(1), fwhm = 6.7(3) km s -1 ; and GJ 1002 : RV= -40.01(3), fwhm = 5.9(3) km s -1 . The 1σ uncertainty is quoted in parentheses in units of last digit.

Fig. 5 .

 5 Fig. 5. Zeeman patterns in the e-a system of FeH, showing (a) the P 1 (4.5) line (λ vac =533.76 nm) at zero field and at 0.53 T, with unresolved ∆M J = +1 and -1 components equidistant from the zero-field line centre, and (b) the Q 2 (3.5) line (λ vac =532.54 nm), recorded at 0.56 T, with better-resolved structure. Note the extended wavenumber scale. Simulations (calc) use effective g J Landé factors optimised from the experimental profiles.

Fig. 6 .

 6 Fig. 6. Spectrum of GJ 411 recorded on SPIRou (corrected for RV) with reference spectra of OH (Hitran database; Gordon et al. 2022) and FeH E-A bands in blue taken from the NSO spectrum. OH features dominate, but many matches with FeH are obvious. The I/I c scale refers to GJ 411, corrected for baseline continuum. The scales for FeH and OH are arbitrary.

Fig. 7 .

 7 Fig. 7. CC curves for the Stokes-I spectrum of stars GJ 411, GJ 388, and GJ 873 with line positions and intensities extracted from the NSO spectrum of FeH (Kitt Peak archive). 2094 lines are listed in the E-X system 6320-7400 cm -1 (1.35-1.58 µm), and 1613 in the E-A system 5200-6322 cm -1 (1.58-1.92µm). Laboratory data were weighted by relative intensities in both calculations.

Fig. 8 .

 8 Fig. 8. Calculated R lines near the CrH A-X (0-0) band origin. The black line is at zero field. The red line is a simulation at 0.7 tesla, (∆M J = ±1) transitions only, with the vertical scale multiplied by 5.

  Fig. 10. Comparison between models of part of the A-X (0,0) band of CrH 865.56 -862.57 nm, with spectra (in colour) from the Narval (GJ 49 and GJ 388) and ESPaDOnS (GJ 1002, GJ 406, and GJ 412B) instruments. Blue curves are for stars whose temperatures are > 3000 K. The upper scale indicates λ vac in nm.

Fig. 11 .

 11 Fig. 11. Laboratory fluorescence spectrum of NiH recorded at 0.7 T. The upper graphs show three individual lines in 4.5 cm -1 windows to illustrate the difference in Zeeman response at a given rotational quantum number in three electronic systems. Note that the Zeeman patterns differ even for the two Λ-doublet components of the P(5.5) line, in the top-left plot.

Fig. 12 .

 12 Fig. 12. CC functions (normalised to unity) for Stokes-I spectra of four sample M stars using the mask from the zero-field NiH laboratory work of Vallon et al. (2009) and Havalyova et al. (2021). The S/N is poor, but the RVs of the strongest peaks match values derived from atomic data. NiH is not detected in GJ 388, one of the warmest stars in our sample.

Table 1 .

 1 installed at the SPIRou Data Centre hosted at the Laboratoire d'Astrophysique de Marseille. The spectrum for GJ 873 (EV Lac) is a template constructed by averaging 706 spectra recorded between 24 May 2018 and 13 March 2022, with a S/N > 72. The template for GJ 388 (AD Leo) averaged 348 spectra recorded between 24 May 2018 and 3 November 2020, with S/N > 86. The template for GJ 411 averaged 947 spectra taken between 26 April 2018 and 12 May 2023. Table 1 lists some reference average magnetic field strengths, <B>, established from Zeeman-broadening and intensification analysis (Shulyak et al. 2017; Cristofari et al. 2023), of (mostly) Ti i, Fe i, and FeH signatures. Identification of the cool stars chosen for this study, their average magnetic field, <B>, and their RVs with respect to the heliocentric rest frame. Uncertainties are indicated in parentheses, in units of last digit. <B> values are taken from publications by Reiners et al. (2022) a , Kochukhov (2021) b , Shulyak et al. (2017) c , and from Cristofari et al. (2023) d . RV values come from supplementary data associated with work by Lafarga et al. (2020).

	Star	Instrument	<B>	RV
			Tesla	km s -1
	GJ 411	SPIRou	<0.02 a	-85.02 (2)
	GJ 1002	ESPaDOnS 0.08 b	-40.12(2)
	GJ 49	Narval	0.08((2) c	-6.30 (2)
	GJ 406 (CN Leo)	ESPaDOnS 0.345(20) d +19.28 (2)
	GJ 388 (AD Leo)	SPIRou	0.303(6) d	+12.29 (2)
	GJ 873 (EV Lac)	SPIRou	0.453(7) d	+0.35 (3)
	GJ 412B (WX UMa) ESPaDOnS 0.73(3) c	+69.16(2)

Table 2 .

 2 RVs determined from molecular data, and the parameters (taken from references quoted in Table1) used for spectral simulations. Magnetic field effects were included for CrH simulations only. Data sources: a Lafarga et al. (2020), b Cristofari et al. (2022); Cristofari et al. (2023), c Morin et al. (2010), d Fouqué, P. et al. (2023), e Donati et al. (2008), f Kochukhov (2021), g Reiners et al. (2022) TableB1. Observation des PHénomènes des Intérieurs stellaires et des Exoplanètes); in both instances, dozens of measurements taken over many months were averaged. Both values are considered reliable despite disagreement within their quoted uncertainties, because the critical quantity is the relative precision of measurement. Regular or random fluctuations in RV can be detected and interpreted with respect to a mean value, and it is the variations around the mean that are important for planet detection.

	RV (km s -1 ) from	GJ 411	GJ 1002	GJ 49	GJ 406	GJ 388	GJ 873	GJ 412B
		Lalande 21185			CN Leo	AD Leo	EV Lac	WX UMa
	CrH A-X (0.86 µm)		-39.31(2)	-4.96(1)	+19.25(1) +12.58(1) +1.18(1) +70.81(2)
	FeH E-A (1.6 µm)	-84.89(1)				+12.24(1)	-0.08(1)
	FeH E-X (1.3 µm)	-84.92(2)				+12.22(1)	-0.08(3)
	FeH (vis)		-40.01(3)	-6.4(1)	+19.45(3)			+ 69.1(2)
	NiH (vis)		-39.7(1)	(no CCF)	+19.8(1)	(no CCF)		+70.0(1)
	Reference RV (km s ) a	-85.02(2)	-40.12(2)	-6.30(2)	+19.28(2) +12.29(2) +0.35(3) +69.16(2)
	Parameters for simulations
	T (K)	3601(51) a	2980(33) b	3805	2899(31) b 3467(31) b 3341(31) b	3000
	v sin i (km s -1 )	1.5 [<2] a	<0.1 b,d	1 e	2(1) b	3(1) b	3(1)) b	5 c
	Limb Darkening	0.3	0.5	0.5	0.5	0.3	0.3	0.5
	Micro-turbulence ξ (km s -1 )	0.85	0.85	0.85	0.85	0.85		0.85
	Macro-turbulence ζ (km s -1 )	1.35	1.35	1.35	1.35	2.3	2.3	1.35
	Instrument resolving power	70000	65000	65000	65000	70000	70000	65000
	<B> (tesla)	<0.02 g	0.08 f	0.08(2) f	0.345(20) b 0.303(6) b	0.453(7) b	0.73(3) f
	data and an infrared mask, and RV = 12.50(2) km s -1 when pro-
	cessing optical domain data with SOPHIE (Spectrographe pour
	l'

https://www.astro.uu.se/valdwiki/Molecules

https://SPIRou-legacy.irap.omp.eu

SPICE: SPIRou Legacy Survey -Consolidation and Enhancement, with observation time 2022-2024

https://www.exomol.com Article number, page 4 of 10 P. Crozet et al.: FeH & CrH in spectra from ESPaDOnS and SPIRou

Article number, page 6 of 10 P. Crozet et al.: FeH & CrH in spectra from ESPaDOnS and SPIRou

gramme (ANR-15-IDEX-02) via the 'Origin of Life' project of the Grenoble-Alpes University.

This work is based on observations obtained at the Bernard Lyot (TBL) and Canada France Hawaii (CFHT) telescopes. The TBL is operated by the Institut National des Sciences de l'Univers of the Centre National de la Recherche Scientifique of France (INSU/CNRS). The CFHT is operated by the CNRC (Canada), INSU/CNRS (France) and the University of Hawaii. The authors wish to recognise and acknowledge the very significant cultural role and reverence that the summit of Maunakea has always had within the indigenous Hawaiian community. We are most fortunate to have the opportunity to conduct observations from this mountain. This work also benefited from the SIMBAD CDS database at URL http://simbad.u-strasbg. fr/simbad, the NASA ADS system at URL https://ui. adsabs.harvard.edu, the PolarBase database at URL http: //polarbase.irap.omp.eu/, and the ExoMol database at URL https://www.exomol.com.