SPInS, a pipeline for massive stellar parameter inference: A public Python tool to age-date, weigh, size up stars, and more

Stellar parameters are required in a variety of contexts, ranging from the characterisation of exoplanets to Galactic archaeology. Among them, the age of stars cannot be directly measured, while the mass and radius can be measured in some particular cases (binary systems, interferometry). Stellar ages, masses, and radii have to be inferred from stellar evolution models by appropriate techniques. We have designed a Python tool named SPInS. It takes a set of photometric, spectroscopic, interferometric, and/or asteroseismic observational constraints and, relying on a stellar model grid, provides the age, mass, and radius of a star, among others, as well as error bars and correlations. We make the tool available to the community via a dedicated website. SPInS uses a Bayesian approach to find the PDF of stellar parameters from a set of classical constraints. At the heart of the code is a MCMC solver coupled with interpolation within a pre-computed stellar model grid. Priors can be considered, such as the IMF or SFR. SPInS can characterise single stars or coeval stars, such as members of binary systems or of stellar clusters. We illustrate the capabilities of SPInS by studying stars that are spread over the Hertzsprung-Russell diagram. We then validate the tool by inferring the ages and masses of stars in several catalogues and by comparing them with literature results. We show that in addition to the age and mass, SPInS can efficiently provide derived quantities, such as the radius, surface gravity, and seismic indices. We demonstrate that SPInS can age-date and characterise coeval stars that share a common age and chemical composition. The SPInS tool will be very helpful in preparing and interpreting the results of large-scale surveys, such as the wealth of data expected or already provided by space missions, such as Gaia, Kepler, TESS, and PLATO.


Introduction
Stellar ages, masses, and radii (hereafter stellar parameters) are indispensable basic inputs in many astrophysical studies, such as the study of the chemo-kinematical structure of the Milky Way (i.e. Galactic archaeology), exoplanetology, and cosmology. Indeed, stellar parameters have long been used to answer questions on how stars populating the different structures, that is the discs, bulge, and halo, in our Galaxy were formed and evolve, and to decipher in-situ formation, migration, and mergers. In this context, stellar parameters are the basis of stellar age-metallicity and age-velocity relations, the stellar initial mass function (IMF), or the stellar formation rate (SFR) [see Haywood (2014) for a review]. Also, the ages of the oldest stars provide a robust lower limit to the age of the Universe. Recently, with the discovery of several thousands of exoplanetary systems, it has become evident that no characterisation of the internal structure and evolutionary stage of planets is possible without a precise determination of the radius, mass, and age of the host stars (see e.g. Rauer et al. 2014).
Today, the availability of observations from large-scale astrometric, photometric, spectroscopic, and interferometric surveys has made the demand for very precise and accurate stel-lar parameters acute. With Gaia (Gaia Collaboration et al. 2018) and large spectroscopic surveys being conducted in parallel (see details and references in Sect. 2 of Miglio et al. 2017), the number of stars with precise astrometry, kinematics, and abundances will increase by more than three orders of magnitude. With high-precision photometry space-borne missions such as CoRoT (Baglin et al. 2006), Kepler (Borucki et al. 2010), K2 (Howell et al. 2014), TESS (Ricker et al. 2015), and in the future PLATO (Rauer et al. 2014), thousands of exoplanets have been and will be discovered. For planetary host stars of F, G, K spectral type on the main sequence or on the red giant branch, it is and will be possible to extract the power spectrum of their solar-like oscillations from the observed light curve, providing asteroseismic constraints to their modelling. Asteroseismology, therefore, will give access to precise and accurate masses, radii, and ages for these stars (see e.g. Silva Aguirre et al. 2015). However, for cold M-type stars, which are optimal candidates for hosting habitable planets, the availability of asteroseismic constraints is less probable. In this context, to fully exploit these rich data harvests and ensure scientific returns, we need modern numerical tools that are able to infer the stellar parameters of very large samples of stars.  Soderblom (2010) reviewed the various methods that can be applied to age-date a star, pointing out that a given method (i) in most cases is only applicable to a limited range of stellar masses or evolutionary stages, (ii) can provide either absolute or relative ages, and (iii) is sometimes only applicable to very small stellar samples. Moreover, the precision and accuracy tightly depend on the age-dating method. Here, we focus on the so-called isochrone placement method (Edvardsson et al. 1993) that has long been used for age-dating and weighing stars in extended regions of the Hertzsprung-Russell (hereafter H-R) diagram. This method only requires having stellar evolutionary models available and is rather straightforward. It can provide ages and masses when other more powerful techniques, such as asteroseismology, are not applicable. It can also serve as a reference when several age-dating methods are applicable. The precision depends on the star's mass and evolutionary state. Basically, the method consists in inferring the age and mass of an observed star with measured effective temperature, absolute magnitude, and metallicity (hereafter classical data) or any proxy for them, by looking for the theoretical stellar model that best fits the observations (e.g. Edvardsson et al. 1993;Ng & Bertelli 1998). The adjustment can be performed in different ways. The simplest way to proceed is to select the appropriate isochrone by a χ 2 -minimisation, that is by searching among the isochrone points which one is closest to the star's location, in the related parameter space (see e.g. Ng & Bertelli 1998). However, the selection of the right isochrone may be difficult in regions of the H-R diagram where they have a complex shape. In such regions, the evolutionary state of the star cannot be determined unambiguously and the star's position can equally be fitted with several isochrone points of different ages, masses, and metal contents. To improve the age-dating procedure, Pont & Eyer (2004) proposed a Bayesian approach that, by adding prior information about the stellar and Galactic properties, allows the procedure to choose the most probable age. The technique has been refined and improved by Jørgensen & Lindegren (2005), da Silva et al. (2006), von Hippel et al. (2006, Takeda et al. (2007), Hernandez & Valls-Gabaud (2008), and Casagrande et al. (2011), for the earlier papers, and reviewed by Valls-Gabaud (2014) and von Hippel et al. (2014). In this context, the work by da Silva et al. (2006) gave birth to the PARAM 1 web interface for the Bayesian estimation of stellar parameters. Then, a few stellar age-dating public codes with different specificities were made public: BASE-9 2 that allows the users to infer the properties of stellar clusters and their members, including white dwarfs (von Hippel et al. 2006), UniDAM 3 that can be used to exploit large stellar surveys (Mints et al. 2019), stardate 4 that considers constraints from gyrochronology (Angus et al. 2019), and MCMCI 5 that is dedicated to the characterisation of exoplanetary systems (Bonfanti & Gillon 2020).
In this work, we present and make public 6 a new tool based on Python and Fortran, named SPInS (standing for Stellar Parameters Inferred Systematically). SPInS is a modified version of the AIMS (Asteroseismic Inference on a Massive Scale) pipeline 7 . The AIMS code has been described and evaluated by Lund & Reese (2018) and Rendle et al. (2019). AIMS is able to perform a full asteroseismic analysis and can estimate stellar parameters from two sets of observations: classical data and detailed asteroseismic constraints (individual oscillation frequencies or a combination thereof). While AIMS is essentially an asteroseismic tool, SPInS is not intended to handle detailed seismic data but rather focuses on classical or mean observed stellar data (these will be explained in the following sections). This greatly simplifies the procedure with a substantial gain in computational time and occupied disc space. In particular, SPInS only uses the standard outputs of stellar evolution models and does not need to be provided with the detailed calculations of the oscillation spectrum of the models.
SPInS was initially created in 2018 to be used in hands-on sessions during the 5 th International Young Astronomer School held in Paris 8 . The goal of SPInS is to estimate stellar ages and masses, as well as other properties and their error bars, in a probabilistic manner. This tool takes in a grid of stellar evolutionary tracks and applies a Monte Carlo Markov Chain (MCMC) approach in combination with a multidimensional interpolation scheme in order to find which stellar model(s) best reproduce(s) the observed luminosity L (or any proxy for it, such as the absolute magnitude in a given band M b, ), effective temperature T eff, (or any colour index), and observed surface metal content [M/H]. The latter can be replaced or complemented by other data derived from observations, such as the surface gravity log g, the mass or radius, or both (for stars in eclipsing, spectroscopic, visual binaries, or with interferometric measurements), or asteroseismic parameters (the frequency at maximum power, the mean large frequency separation inferred from the pressuremode power spectrum, etc.). The advantage of this approach is that it provides a full probability distribution function (hereafter PDF) for any stellar parameter to be inferred, thereby accounting for multiple solutions when present. It also allows the user to incorporate in the calculation various priors (i.e. a priori assumptions), such as the initial mass function (IMF), the stellar formation rate (SFR), or the metallicity distribution function (MDF). SPInS can be used in two operational modes: characterisation of a single star or characterisation of coeval groups, including binaries and stellar clusters. SPInS is mostly written in Python with a modular structure to facilitate contributions from the community. Only a few computationally intensive parts have been written in Fortran in order to speed up calculations.
The paper is organised as follows. In Sect. 2, we explain the Bayesian approach used in SPInS. In Sect. 3, we present some results obtained with SPInS for a set of fictitious stars with particularly noticeable locations in the H-R diagram. In Sect. 4, we compare results obtained by SPInS with those derived by Casagrande et al. (2011). In Sect. 5, we show inferences on properties of stars observed either in interferometry or in asteroseismology. In Sect. 6, we use SPInS to study coeval stars belonging to a binary system and an open cluster. Finally, we draw some conclusions in Sect. 7.

Overview
SPInS uses a Bayesian approach to find the PDF of the stellar parameters from a set of observational constraints. At the heart of the code is a MCMC solver based on the Python EMCEE package (Foreman-Mackey et al. 2013) coupled to interpolation within a pre-computed grid of stellar models. This allows SPInS to produce a sample of interpolated models representative of the underlying posterior probability distribution. We recall that the posterior probability distribution can be obtained from the priors and the likelihood via Bayes' theorem: where O are the observational constraints and θ the model parameters. In other words, this theorem provides a way of calculating the probability distribution for model parameters given a set of observational constraints, as represented by the likelihood function P(O|θ), and priors P(θ). The next two sections will deal with these two terms in more detail.

The priors
The priors represent our a priori knowledge of how the model parameters should behave. For instance, one expects a higher number of low-mass stars than high-mass stars, and this can be expressed as a prior on the mass with a higher probability at low mass values. As described in the following subsections, the priors will apply to the following stellar parameters given that we will be working with BaSTI stellar model grids (Pietrinferni et al. 2004(Pietrinferni et al. , 2006: mass, age, and metallicity. Of course, the choice of model parameters that are included in the priors depends on the parameters that describe the grid being used with SPInS.

Initial mass function
The initial mass function (IMF) was first introduced by Salpeter (1955). It provides a convenient way of parametrising the relative numbers of stars as a function of their mass in a stellar sample (see e.g. the review by Bastian et al. 2010).
The number dN(m) of stars formed in the mass interval [m, m + dm] reads dN(m) = ξ(m)dm where ξ(m) is the IMF. SPInS can handle two forms of the IMF: a one-slope version that reads and a two-slopes version, The one parameter version (Eq. 2) is related to the IMF introduced by Salpeter (1955) with the following parameter, The two-parameters version (Eq. 3) can be used to implement the canonical IMF from Kroupa et al. (2013, section 9.1) which is suitable for stars in the solar neighbourhood. In that case, Any other form of the IMF can easily be added to the SPInS program.

Stellar formation rate
We restrict our working age domain to an upper limit of 13.8 Gyr, that is roughly the age of the Universe, and we used the following uniform truncated stellar formation rate (SFR): This translates into a prior on the age of a star.

Metallicity distribution function
We assume that the metallicity measurements are or will be available for the stars we want to age-date. Therefore, we do not introduce an a priori assumption on what their metallicity should be (see the discussion in Jørgensen & Lindegren 2005). Thus, by default, we adopt a flat prior on the metallicity [M/H] distribution function (MDF). However, any prior on the MDF can be introduced into SPInS. As an example, in Sect. 4, we introduced the prior adopted by Casagrande et al. (2011) and given in their Appendix A to correct for metallicity biases found in the Geneva-Copenhagen Survey.

The likelihood function
The likelihood function is used to introduce observational constraints. Typically, these include constraints on classic observables, such as the luminosity, effective temperature, and metallicity. However, as will be shown in the following, constraints on other observables may be used, such as the absolute magnitude in any photometric band, colour indices, asteroseismic indices, radius, and whatever parameters are available with the grid of models being used with SPInS (as described in Sect. 2.5). These constraints take on the form of probability distributions on the value of the parameter. This leads to the following formulation for the likelihood function: where the P i represent the probability distributions on individual parameters resulting from the observational constraints, and O i the values of those parameters obtained for a given set of model parameters θ. The probability distributions P i are typically normal distributions although other options are available with SPInS.

Variable changes
One of the features of SPInS is to allow variable changes. For instance, one may have observational constraints on √ L rather than L or may have a prior on log 10 M rather than M. SPInS allows such variable changes for a handful of elementary functions. Of course, such changes need to be taken into account in a self-consistent way. In other words, the underlying probability distribution should not be altered. Accordingly, variable changes on observed parameters are treated differently than those on model parameters. To understand this, we recall the relationship between probability functions after a change of variables: We then introduce this relation into Bayes' theorem and assume for simplicity that there is a single observed parameter and a single model parameter. We then assume the prior and likelihood function apply to f (θ) and g(O), respectively, instead of θ and O. This leads to: As can be seen, a change of variables on an observed constraint does not lead to any modification to the way the probability is calculated because the corrective terms cancel out. In contrast, applying a prior to a different variable than the one used in the grid requires multiplying by the term d f (θ) dθ . SPInS accordingly takes this term into account using analytic derivatives of the elementary functions used in the variable change.

Grids of stellar models
SPInS can easily include any set of evolutionary tracks or isochrones available in the literature or calculated by the user. In this work, we used the BaSTI stellar evolutionary tracks available at http://albione.oa-teramo.inaf.it/index.html and described in Pietrinferni et al. (2004Pietrinferni et al. ( , 2006. We chose to use these data rather than more recent ones in order to make comparisons with previous works. In the BaSTI database, many sets of stellar tracks, all in the mass range M ∈ [0.5M , 10M ], are available. These models are well-suited to age-dating stars of different kinds: they cover evolutionary stages running from the zero-age main sequence (we do not use here the additional pre-main sequence grid provided for a narrower range of mass) to advanced stages, including the red-giant and horizontal branches, and a metal abundance range Z ∈ [0.0001, 0.04], where Z is expressed in mass fraction. This interval of Z-values corresponds to number abundances of metals relative to hydrogen [M/H] ∈ [−2.27, +0.40], where [M/H] = log(Z/X) − log(Z/X) and X is the hydrogen mass fraction. The value of (Z/X) depends on the solar mixture under consideration. GN93's solar mixture (Grevesse & Noels 1993) has a value (Z/X) = 0.0245.
On the BaSTI website, the following grids are available: -Canonical grid: it corresponds to standard stellar models that do not include gravitational settling, radiative accelerations, convective overshooting, rotational mixing, but otherwise are based on recent physics, as detailed in Pietrinferni et al. (2004). The models are based on GN93's solar mixture. -Non-canonical grid: the difference with the canonical grid is that models in this grid account for core convective overshooting during the H-burning phase which may have a nonnegligible impact on age. As described in Pietrinferni et al. (2004), in these models, convective mixing is extended over 0.2 pressure scale-heights above the Schwarzschild's core for a stellar mass higher than 1.7 M , no overshooting is considered for a mass lower than 1.1 M , and a linear variation is assumed in-between. For each evolutionary track in the BaSTI database, the variation of the luminosity, effective temperature, absolute M b magnitude, and colour indices are provided as a function of the age and mass of the model star for several photometric systems. We here use the tracks given in the Johnson-Cousins system which provide colours, but other photometric systems are available in the BaSTI database. All these quantities can be used indifferently in SPInS.
In addition, we considered four quantities that can be inferred from BaSTI models straightforwardly: the photospheric radius R calculated from Stefan Boltzmann's law, the surface gravity (or its decimal logarithm log g), and the frequency at maximum amplitude ν max,sc and the mean large frequency separation of pressure modes ∆ν sc expressed in asteroseismic scaling relations. The latter read, and and are explained in Brown et al. (1994); Kjeldsen & Bedding (1995); Belkacem et al. (2011). In Eqs. 10, 11, and 12, G is the gravitational constant, M the mass of the star, T eff, = 5777 K, the subscript 'sc' stands for scaling, and ν max, = 3090 µHz and ∆ν = 135.1 µHz are the solar values in Huber et al. (2011). In the following, ν max,sc and ∆ν sc will be referred to as seismic indices.

Interpolation in the grids
As was the case for the AIMS code, SPInS uses a two-step process for interpolation. This then allows the MCMC algorithm to randomly select any point within the relevant parameter space. The first part of the interpolation concerns interpolation between evolutionary tracks. The second part concerns interpolation along the tracks, that is as a function of age. These are described in the following subsections.

Interpolation between evolutionary tracks
Interpolation between evolutionary tracks amounts to interpolating in the parameter space defined by the grid parameters, excluding age. In this parameter space, each track corresponds to a single point. As a first step, a Delaunay tessellation is carried out for this set of points via the Qhull package 9 (Barber et al. 1996) as implemented in SciPy 10 . As a result, the parameter space is subdivided into a set of simplices (i.e. triangles in two dimensions, tetrahedra in three dimensions, etc.). Then, for any point within the convex hull of the tessellation, SPInS searches for the simplex which contains the point and carries out a linear barycentric interpolation on the simplex. The advantage of such an approach is that the grid of stellar models can be completely unstructured, thus providing SPInS with a greater degree of flexibility. Furthermore, fewer tracks are linearly combined during the interpolation process thus potentially saving computation time compared to multilinear interpolation in Cartesian grids of the same number of dimensions.

Interpolation along evolutionary tracks
The second part of the interpolation focuses on age interpolation along evolutionary tracks. Interpolation along a track is achieved by simple linear interpolation between adjacent points thus leading to piecewise affine functions for the various stellar parameters as a function of age. What is more difficult is combining age interpolation with interpolation between tracks. As opposed to AIMS, SPInS uses two variables for the age: the physical age and a dimensionless age parameter. The purpose of the age parameter is to provide equivalent evolutionary stages on different tracks for the same value of this parameter. This then allows SPInS to combine models at the same evolutionary stage when interpolating between tracks thus improving the accuracy of the interpolation. Nonetheless, from the point of view of the MCMC algorithm, it is the physical age which is relevant, that is to say the MCMC algorithm will sample the physical age (thus bypassing the need for a corrective term as in Eq. 8). This is particularly important when fitting multiple coeval stars, that is with a common physical age. Hence, SPInS is constantly going back and forth between these two age variables. Sampling as a function of physical age while interpolating in terms of the age parameter is not straightforward as illustrated in Fig. 1. In the plot, the interpolated track is halfway between the two original tracks for fixed values of the age parameter (although, SPInS can, of course, also interpolate using other interpolation coefficients). The same is not true for fixed stellar ages: the interpolated track is not halfway between the original tracks for fixed stellar ages, as can be seen for instance with the vertical dashed line at the target age. Hence, one cannot simply find the age parameters on the original tracks for the target stellar age and interpolate between these to obtain the age parameter of the interpolated model. One solution would be to interpolate the entire track and then search for the age parameter directly on it. This is, however, not the most efficient approach computationally as most of the track is not needed and would probably considerably slow down SPInS given that this operation would need to be performed for each set of parameters tested by the MCMC algorithm. The solution implemented in SPInS consists in a dichotomic search as a function of the age parameter combined with a direct resolution once the interval is small enough to only contain a single affine section of the interpolated track. For the sake of efficiency, this part is written in Fortran.

Fitting multiple stars
As explained earlier, SPInS can simultaneously fit multiple coeval stars, such as what is expected in binary systems or stellar clusters. Accordingly, a set of model parameters is obtained for each star, with however, the possibility of imposing common parameters such as age and metal content. Individual likelihood functions are defined for each star, whereas the same set of pri- Fig. 1. Schematic plot illustrating how age interpolation works in SPInS. The two solid lines correspond to two neighbouring stellar evolutionary tracks which are involved in the interpolation. The horizontal hatch marks indicate that the interpolation takes place horizontally (i.e. models with the same age parameter rather than physical age are linearly combined). The dotted line shows the interpolated track. The vertical blue dashed line corresponds to the target age and the yellow dot to the interpolated model. ors is applied to the model parameters for each star. For common parameters, the prior is only applied once, unless the user specifically configures SPInS to apply it to each star (which amounts to raising the prior to the power n stars , where n stars is the number of stars). Hence, the overall posterior probability is obtained as the product of the likelihood functions and priors applied to the parameters of each star apart from those of the common parameters which are only applied once. Finally, for stellar samples sharing the same age, an isochrone file may be produced covering the whole mass interval spanned by the stellar models used by SPInS. Fitting multiple stars is advantageous as it can lead to tighter constraints on common parameters (e.g. Jørgensen & Lindegren 2005).

Typical calculation times
Computation times depend on a number of factors such as the number of stars being fitted, n stars , and the number of dimensions of the grid (excluding age), n dim , as well as on various MCMC parameters such as the number of iterations (both burn-in and production), n iter , the number of walkers, n walk , and the number of temperatures if applying parallel tempering, n temp . Typical computation times for individual stars, (n stars , n dim , n iter , n walk , n temp ) = (1, 2, 400, 250, 10), is of the order of 1 min when using four processes on a Core i7 CPU. When fitting 92 stars simultaneously from the Hyades cluster using age and metallicity as common parameters, (n stars , n dim , n iter , n walk , n temp ) = (92, 2, 600, 250, 10), the computation time was around 1.5 hours. However, convergence is slower in such a situation given the higher number of dimensions from the point of view of the MCMC algorithm. Hence, 20 000 burn-in plus 200 production iterations were needed, thus leading to a computation time of roughly 75 to 150 hours using four processors (although this was carried out on a slightly slower processor).   Table 1. BaSTI stellar evolution tracks, some of which are labelled by their initial mass, are shown as well as isochrones, the ages of which are indicated in the legend starting from the youngest.

Parameter inference for a set of fictitious stars
As a case study, corresponding to the most common demand for age and mass inference on a survey-wide scale, we first focus on determining the properties of a small set of fictitious stars with solar metallicity and spread across the H-R diagram. The stars' properties (luminosity, effective temperature, metallicity, and their error bars) used as inputs to SPInS are listed and explained in Table 1 and its caption. The positions of the stars in the H-R diagram are shown in Fig. 2. We used the solar-scaled non-canonical BaSTI stellar model grid (cf. section 2.5), as well as the IMF from Kroupa et al. (2013) given in Eqs. 3 and 5, a uniform truncated SFR (Eq. 6), and a uniform MDF, as priors. For each star, the inferred age and mass are listed in Table 1. Depending on the position of a star in the H-R diagram, the solution may be subject to an important degeneracy which is revealed in the posterior probability distribution function (see the thorough discussions in, e.g. Jørgensen & Lindegren 2005;Takeda et al. 2007). We show in Fig. 3 several PDFs showing a different typical morphology which we examine below.
-Firstly, low-mass stars on the main sequence (hereafter MS) lie in a region where the isochrones are crowded and thus can be fitted by practically any isochrone. This is the case of star SF1, close to the Sun, whose age is very ill-defined (see the PDF in the left panel of top row in Fig. 3). -Secondly, more massive stars, either on the MS or fully installed on the subgiant branch, have a rather well-defined age and their PDF shows a single peak. This is the case for star SF12 shown in the top row, right panel of Fig. 3, but also for MS stars SF3, SF8, SF11, SF14, SF15, SF17, and subgiants SF5 and SF19. For stars close to the zero-age MS such as star SF2, that is barely evolved stars, the one-peak PDF (not shown) is very asymmetric. It is truncated close to age 'zero' of the evolutionary tracks, meaning that for these stars, tracks including the pre-main sequence phases should be used. Moreover, since the region where star SF2 lies is still crowded with isochrones, its PDF shows a very long tail towards high ages up to about 8 Gyr. -Thirdly, for stars of mass M 1.2M which had a convective core during the MS and are now lying in the so-called hook region, in the vicinity of the end of the MS, several ages are possible. However, these ages are not equally probable because of the different amounts of time spent either before the red point of the evolutionary track (i.e. minimum of T eff on the hook) or in the second contraction phase before the blue point (i.e. maximum of T eff on the hook), or at the very beginning of the subgiant phase. This translates into a PDF generally showing two peaks, as can be seen in the bottom row, left panel of Fig. 3 for star SF7, but the same behaviour is seen for stars SF4, SF9, and SF18. For star SF20, located close to the helium burning region where the star undergoes blue loops, the PDF also shows two peaks, one of them being very discreet. -Fourthly, stars lying close to the red giant branch either show a more or less well-defined peak in their PDF (such as stars SF13 and SF16) or a flattened PDF (such as star SF6 shown in the bottom row, right panel of Fig. 3 and star SF10).
Several indicators of a parameter, for instance the age, can be used. In Fig. 3, we show the median, the mean, and the posterior mode values given by SPInS for stars SF1, SF6, SF7, and SF12. The estimator of the mode is the maximum a posteriori (MAP). However, in the case of star SF7, the age PDF is multimodal, showing two maxima. Figure 3 shows that the mode provided by SPInS is close to the second maximum when, intuitively, one would have taken the mode to be the value at the maximum of the higher peak. It is because the mode, as calculated by SPInS, corresponds to the parameter set yielding the maximum posterior probability given the observations (see Eq. 1) obtained in the grid's parameter space (i.e. in the mass-age-metallicity space for this particular example). In contrast, the histogram showing the age PDF is obtained after an integration (i.e. marginalisation) with respect to mass and metallicity. For star SF7, the secondary peak in the age histogram corresponds to a higher but narrower peak (especially in terms of the variables mass and metallicity) in the original grid parameter space, thus explaining why it is lower after marginalisation. On the other hand, the mass is welldetermined for all stars, with PDFs mostly presenting one or two peaks.

Parameter determination for stars in the Geneva-Copenhagen Survey
In this section, we aim at testing and validating the SPInS tool by characterising the stars of the Geneva-Copenhagen Survey (GCS). The GCS is a compilation of observational and stellar model-inferred properties of stars belonging to the solar neighbourhood. The first version of the GCS was presented and made public by Nordström et al. (2004, hereafter GCS04). It provides a complete, magnitude-limited (V < 8.3), and kinematically unbiased sample of 16 682 nearby F and G dwarf stars. Many data can be found in the catalogue, of which the Hipparcos parallax, metallicity, effective temperature, and Johnson V-magnitude are of interest here. Later on, the data in the catalogue were assessed and refined by Holmberg et al. (2007. Then, Casagrande et al. (2011, hereafter GCS11) improved the accuracy of the effective temperatures on the basis of the infrared flux method, and consequently improved the metallicity scale. They also provided a proxy for the [α/Fe] ratio and reddening E(B-V). Each version of the GCS also provides the age and mass of the stars, and related uncertainties, derived by means of a Bayesian analysis.
In order to compare the results of SPInS with those of Casagrande et al. (2011), we used SPInS to determine the ages and masses of stars in the GCS. We adopted, as far as possible, the assumptions made by these authors, namely: -We used the following observational constraints for each star: logarithm of effective temperature log T eff , absolute Vmagnitude in the Johnson band M V , and metallicity [M/H] (not [Fe/H]). -We took the same source for stellar models, that is the solarscaled canonical BaSTI grid described in Sect. 2.5 taken from their website (Pietrinferni et al. 2004). However, the grid used by Casagrande et al. (2011) was specially prepared and is finer than the one available on the website. Furthermore, in contrast with Casagrande et al., we did not use the isochrones but the evolutionary tracks, which are the direct products of stellar evolution calculations. -As was done in Casagrande et al. (2011), we adopted stellar evolution models calculated for a solar-scaled mixture, but we re-scaled the metallicity to mimic the α-element enrichment. Since Casagrande et al. (2011) do not explicitly give the re-scaling relation they adopted, we adopted the most commonly used relation derived by Salaris et al. (1993) 11 . However, we checked that only minor differences are obtained if the re-scaling of Nordström et al. (2004) 12 , applied in the GCS04, is used instead. -To calculate the absolute magnitudes M V of each star, we used the Johnson V-magnitude provided in the GCS09 and the Hipparcos parallax provided in the GCS11 (i.e. the socalled new Hipparcos reduction from van Leeuwen 2007). We corrected the absolute magnitudes for the effects of extinction following Cardelli et al. (1989) with E(B-V) taken from the GCS11. -We assumed a Gaussian distribution in log T eff , M V , and [M/H]. We, therefore, did not implement in SPInS the particular treatment of the magnitude distribution adopted by Casagrande et al. (2011) to take into account the skewness of the magnitude distribution that appears when the relative parallax error exceeds 10 per cent. Therefore, the present comparisons will not be valid for stars with high parallax errors. -We adopted the same priors on the IMF, SFR, and MDF.
More precisely, we took the IMF from Salpeter (1955) as given by Eqs. 2 and 4, a uniform truncated SFR (Eq. 6), and the prescription of Casagrande et al. (2011) for the particular MDF of the stars in the GCS11 (see their Appendix A).

Ages
We present in Fig. 5 the age residuals between the ages obtained by SPInS (mean ages) and those of the GCS11 (referred to as 'expected' age in their terminology but which also corresponds to the mean value). The ages of 14 757 stars out of 16 682 could be determined. For the remaining stars, either the parallax, effective temperature, or metallicity were unavailable. In Fig. 5 (left panel), we only retained the stars for which the age-dating is considered to be of good quality under the criteria of Casagrande et al. (2011), that is the relative error on age is lower than 25 per cent and the absolute age error is lower than 1 Gyr. This represents a total of 5040 stars. The comparison is very satisfactory since the differences in ages between SPInS and the GCS11 mostly remain lower than 25 per cent. In Fig. 5 (right panel), we considered all stars with a determined age and a parallax error lower than 10 per cent (to minimise the possibility of a skewness in the V-magnitude distribution, see the discussion in Sect. 4 above). Even if the differences between the SPInS and GCS11 11 In Salaris et al. (1993), the solar-scaled Z is re-scaled as Z α according to Z α = Z × (0.  ages are larger in that case, there are only 503 stars out of 10 865 (that is less than 5 per cent) showing an age difference larger than 25 per cent. In Fig. 6, we show the mass residuals between the masses (mean values) derived by SPInS and those in the GCS11 (expected values corresponding to mean ones). As for the ages, the masses of 14 757 out of 16 682 could be determined. In the figure, we only retained stars for which we consider the mass to be of good quality, that is the relative error on mass is lower than 10 per cent. This represents a total of 12 704 stars. The comparison is very satisfactory since the differences in mass between SPInS and GCS11 values mostly remain lower than 10 per cent. The disparity of SPInS and GCS11 results is less important for the masses than for the ages because, for a given set of stellar evolutionary tracks, the mass degeneracy in the Hertzsprung-Russell diagram is less marked than the degeneracy affecting the ages, in particular at the end of the main sequence.

Radii, surface gravities, and mean seismic parameters
In addition to the ages and masses of the stars in the GCS11, SPInS provided several interesting stellar properties related to stellar evolutionary tracks or that can easily be derived from them. In particular, we show in Fig. 7 the Kiel diagram (log T eff − log g), the mass-radius relation, and the asteroseismic diagram (ν max,sc -∆ν sc ) based on seismic indices. The discussion of the results is beyond the scope of this paper, although some wellknown trends can be highlighted, in particular the position of stars as a function of their metallicity in the Kiel diagram resulting from their different internal structures. It is worth pointing out that the combination of such diagrams, involving large stellar samples, can be very valuable when used in studies of Galactic Archaeology (Miglio et al. 2009 thus making SPInS a very interesting tool in this respect.

Stars observed in interferometry
With interferometry, the angular diameters of stars can be measured which in turn gives a direct access to their radii, provided their distance is known. These measurements are therefore independent of stellar models (except for limb-darkening of the stellar disc which has to be corrected for, based on stellar model atmospheres). Ligi et al. (2016) obtained the radii of Article number, page 9 of 16 A&A proofs: manuscript no. article 18 stars (eleven of them being exoplanet hosts) from interferometry, together with their bolometric fluxes from photometry which allowed them to infer the effective temperatures. Starting from these data, metallicities taken in the literature, and model isochrones, they applied a Bayesian method with flat priors to infer the mass and age of each star.
By using Ligi et al.'s radii, effective temperatures, and metallicities as input constraints for SPInS, we inferred the masses and ages of the stars. We used the solar-scaled non-canonical BaSTI grid including convective core overshooting and we assumed flat priors on mass and metallicity, but a uniform truncated prior on age (Eq. 6). In Fig. 8, we compare SPInS masses and ages with the values from Ligi et al. (2016). Overall, the comparison is satisfactory, except for one star, HD 167042. If we exclude this star, the mean mass (respectively age) difference is of 4 (respectively 19) per cent and maximum differences are of 15 (respectively 84) per cent. For HD 167042, shown with pink diamonds in Fig. 8, SPInS's mass is much smaller than the one found by Ligi et al. (2016) while SPInS's age is much larger. Understanding the origin of the difference is beyond the scope of this paper. However, Ligi et al. pointed out that, for this star, their results are not consistent with the models. Moreover, we point out that it may currently be difficult to characterise this K1IV subgiant. Indeed, doubts remain about its effective temperature which is found to be 4547 ± 49 K when combining interferometry and photometry (Ligi et al. 2016) and 4983 ± 10 K when using high resolution spectroscopy (Maldonado & Villaver 2016).
In the future, large samples of stars with angular radii measured by interferometry will be available. In particular, the CHARA/SPICA project 13 , based on the new visible interferometric instrument CHARA/SPICA currently under design (Mourard et al. 2018), aims at constituting a homogeneous catalogue of about a thousand angular diameters of stars spanning the whole H-R diagram, including hosts of exoplanetary systems and stars observable in asteroseismology. SPInS will enable a rapid characterisation of the fundamental parameters of these stars (mass, age), thus opening the way to an in-depth analysis of their internal structure, planet characterisation, etc.

Solar-like oscillators
SPInS has not been designed for the purpose of delivering a precise asteroseismic diagnosis. To perform detailed asteroseismic analysis, one can use, for instance, the public AIMS tool described in Lund & Reese (2018) and Rendle et al. (2019). 13 https://lagrange.oca.eu/fr/spica-project-overview However, when individual frequencies cannot be extracted from the pressure-mode oscillation spectrum, SPInS can give some characteristics of a star provided the seismic indices ν max,obs or ∆ν obs , or both have been estimated from observations. Indeed, SPInS can take ν max,obs and ∆ν obs as input constraints which, through the scaling relations (Eqs. 11 and 12), provides hints on the stellar mass and radius, provided the effective temperature is known. In the following, we study two stellar samples (an artificial and a real one), for which SPInS inferences of mass, radius, and age based on ν max,obs and ∆ν obs can be compared with the results of careful inferences based on individual oscillation frequencies.

Artificial stars: Reese et al. (2016)'s hare and hounds sample
As a first case study, we consider ten artificial stars, built and studied in the hare-and-hounds exercise of Reese et al. (2016). To build each star, a stellar model was calculated for a given mass and age. Then, starting from this model, a hare group simulated observational quantities of an artificial star, that is its oscillation frequencies and classical parameters. Finally, the results were communicated to several hound teams who applied distinct optimisation methods to characterise the stars on the basis of these constraints. We list the properties of the ten stars in Table 2. Their positions in the H-R diagram are shown in Fig. 1 of Reese et al. (2016). We applied SPInS to these stars taking their 'observed' 14 luminosity, effective temperature, metallicity, ν max,obs , and ∆ν obs as input constraints. We used the solar-scaled non-canonical BaSTI grid including convective core overshooting and we took flat priors on mass, age, and metallicity. In Fig.9, we show how the masses and radii inferred both by SPInS and by the teams that participated in the exercise of Reese et al. (2016) reproduce the true properties of the -artificial-stars. With SPInS, mean differences with the artificial stars are of 2.8 per cent on the predicted mass and of 1.1 per cent on the radius. The maximum differences are for Blofeld and to a lesser extent Diva. For Blofeld, the difference is of about 11 per cent on mass and of 3.7 per cent on radius. It is worth noting that both of these simulated stars have the same mass (M obs = 1.22M ) and are both on the subgiant branch but have different chemical compositions. Moreover, the BaSTI grid models (Pietrinferni et al. 2004) have not been calculated with the same input physics and parameters as Reese et al. (2016)'s Table 2. Simulated properties for the set of artificial stars of Reese et al. (2016). These properties are taken from their Table 1 except for ∆ν obs that we calculated as the least-square mean of the individual frequencies of radial modes given in Moreover, Blofeld includes atomic diffusion, a different solar mixture, and a truncated atmosphere. We also note that Diva is one of the least well-fitted stars in Reese et al. (2016).
Overall, as can be seen in Fig.9, except for the cases of Blofeld and Diva that, in all likelihood result from identified differences in stellar models, the masses and radii inferred by SPInS compare very well with those inferred from a thorough asteroseismic diagnosis based on individual oscillations frequencies. This confirms the power of the scaling relations to quite reasonably infer the mass and radius of solar-like oscillators (Chaplin et al. 2014).
As for the age, we show in Fig. 9 that the situation is not as good. Indeed, the scaling relations do not constrain this parameter tightly and the age inference is highly sensitive to the input physics of stellar models (see e.g. . With SPInS, we find a mean difference of 28 per cent on age for the ten stars while the mean difference obtained with the pipelines in Reese et al. (2016) is of 23 per cent. We get a maximum difference on age of 143 per cent for Blofeld. Even if, in this particular study, the ages are very well recovered by SPInS for seven artificial stars out of ten, real stars by far host much more subtle physical processes than stellar models are able to describe. Therefore, individual oscillation frequencies if available, or some combinations thereof, should always be preferred to the seismic indices when a precise and accurate age estimate is being sought (see for instance the study of the CoRoT target HD 52265 by .
We also would like to point out that the scaling relations are much less efficient at predicting masses, radii, and ages when the luminosities of the stars are not known. This was checked by applying SPInS to the ten stars using only T eff , [Fe/H], ν max,obs , and ∆ν obs as input constraints and removing the constraint on luminosity. In that case, the mean errors on the predicted masses, radii, and ages are higher, with values of 6, 2, and 64 per cent respectively and maximum errors of 19, 7 and 300 per cent for Blofeld. This favours combining all possible classical and asteroseismic parameters to characterise stars, and reinforces the need for precise luminosities from the Gaia mission and radii from interferometry or eclipsing binary light curves.

Real stars: the Kepler LEGACY sample
In the same vein, we now consider 66 stars belonging to the Kepler seismic LEGACY sample (e.g. Lund et al. 2017). Each star has at least 12 months of Kepler short-cadence data. Therefore, these stars are among the solar-like oscillators observed by Kepler that have the highest signal-to-noise ratios. As a consequence, their individual oscillation frequencies inferred by Lund et al. (2017) are among the most precise to-date for solar-like pulsators while their effective temperatures and metallicity are also available. Silva Aguirre et al. (2017) performed a thorough modelling of the stars, with different optimisation methods implemented in six pipelines. All pipelines took into account the complete set of oscillation frequencies, either individual frequencies or frequency separation ratios, or a combination thereof (see Silva Aguirre et al. 2017, for details).
We have analysed these stars with SPInS in a simplified way, by considering as observational constraints T eff , [Fe/H], log g, ∆ν , and ν max . We used the solar-scaled non-canonical BaSTI grid including convective core overshooting. As for the priors, we adopted the two-slopes IMF from Eq. 3 with Kroupa et al. (2013)'s coefficients (Eq. 5), a uniform truncated SFR (Eq. 6), and a flat prior on the MDF. We then compared SPInS inferences with those reported in Silva .
In the left panel of Fig. 10, we show the residuals (R SP −R LEG ) between the radius of each star inferred by SPInS (R SP ) and the values R LEG obtained from full optimisations as reported in Silva . In the right panel of Fig. 10, we show the residuals (M SP − M LEG ) between the masses. If we exclude the result of the GOE pipeline for star KIC 7771282 (shown by pink diamonds at R SP ≈ 1.66R , R LEG,GOE ≈ 1.4R and at M SP ≈ 1.3M , M LEG,GOE ≈ 0.8M in the panels of Fig. 10), which is well outside the range found by the others, maximum differences on the radius between SPInS and the six pipelines, over 66 stars, range from 3.5 to 9 per cent, while mean differences are in the range of 1.3-2.5 per cent. As for the mass, maximum differences are in the range of 16-26 per cent, while mean differences are in the range of 5-6.5 per cent. Finally, for the ages, we find larger mean differences ranging from 25 to 32 per cent. To get a clearer picture, if we consider the objectives of the PLATO mission (Rauer et al. 2014), that is to reach uncertainties of less than 2 per cent on the radius, 10 per cent on the mass, and 10 per cent on the age of an exoplanet host-star to be able to characterise its exoplanet correctly, there are three stars for which SPInS's radius is outside the interval corresponding to the extreme values provided by the six pipelines by more than 2.5 per cent, no star with a mass outside the pipeline mass range by more than 10 per cent, and 16 stars with SPInS's age outside the pipeline age range by more than 15 per cent. Therefore, overall, SPInS's results compare rather satisfactorily with tight asteroseismic inferences of stellar radii and masses even if ∆ν sc and ν max, sc do not perfectly represent observations. Indeed, the ability of ∆ν sc to reproduce ∆ν obs relies on asymptotic developments and, as estimated by Belkacem et al. (2011Belkacem et al. ( , 2013, on the main sequence overall departures between the two can reach up to 5 per cent. Regarding the seismic index ν max, sc , the relation ν max, sc − ν max, obs is not straightforward. It is intimately related to the acoustic cut-off frequency, a function of T eff and log g, but other properties of the surface layers also play a role which generates biases, in particular on the main sequence because of T eff dispersion (see Balmforth 1992; Chaplin et al. 2008;Belkacem et al. 2011Belkacem et al. , 2013. As a consequence, as pointed out by Silva Aguirre et al. (2015), the use of scaling relations when individual frequencies are unavailable may lead to wrong estimates of the radius and the mass. Concerning the ages, predictions based on seismic relations are very coarse and SPInS's ages are often far from being a tight inference, which lends more credence to the words of caution of Chaplin et al. (2014) regarding age estimates based on scaling relations.
To summarise, SPInS can be a very efficient tool for ensemble asteroseismology (e.g. Chaplin & Miglio 2013), that is to size up, weigh, and age-date large samples of stars with observed values of ∆ν obs and ν max, obs . However, the reliability of the results will depend on the mass and evolutionary state of the studied stars, and as such must carefully be assessed before deriving any conclusion. Furthermore, SPInS can also be very useful in providing first estimates of a star's mass and age, to be used as initial conditions for refined optimisation methods based on individual oscillation frequencies.
We point out that the asteroseismic indices used in SPInS do not necessarily have to be obtained via scaling relations. Instead, they can be calculated with stellar oscillation codes, thus increasing their accuracy, and supplied along with global properties of the model. This opens up the possibility of using many   9. Comparison of the masses, radii, and ages inferred by different techniques with the true values of the ten artificial stars of Reese et al. (2016). Full symbols with error bars correspond to SPInS inferences with ν max,obs and ∆ν obs taken as seismic constraints. Open symbols are for the results of eight pipelines where a full seismic diagnosis based on individual frequencies has been performed (see Reese et al. 2016, for details). different types of seismic indicators such as the large and small frequency separations for pressure modes, frequency separation ratios, and the period spacings for gravity modes. With these quantities, deciphering the age or evolutionary state in advanced stages is accessible with SPInS, thus paving the way to further in-depth studies based on individual oscillation frequencies.

Parameter determination for coeval stars
One attractive feature of the SPInS tool is its ability to deal with stellar groups sharing some common properties. Well-known examples are stars that are members of stellar clusters or of binary systems and for which it can be assumed that they share the same age and initial chemical composition. We illustrate the performances of SPInS with a couple of study cases below.

Stellar clusters
As a case study, we consider the Hyades which has long been known to be the nearest open cluster, hosting about 300 members. Hipparcos made it possible to determine secure individual parallaxes of ∼ 300 Hyades members and the cluster remained the only one for which this was true until the delivery of Gaia DR1 (e.g. first data release, Gaia Collaboration et al. 2017). The distance to the centre of mass of the Hyades, as determined by Perryman et al. (1998) from Hipparcos data, is 46.34 ± 0.27 pc, based on 134 stars within 10 pc of the centre. Later on, Dravins et al. (1997)  metric ground-based measurements. Lebreton et al. (2001) then estimated the age of the cluster from eye-fitting of isochrones calculated with a metallicity of [Fe/H] = 0.14 ± 0.05 as determined by Cayrel de Strobel et al. (1997). They derived an age of 625 Myr ( 550 Myr) on the basis of stellar models with (respectively without) convective core overshooting calculated with the Cesam code (Morel & Lebreton 2008).
Starting from the same observed sample as used by Lebreton et al. (2001), we re-inferred the properties of the cluster using SPInS. As for the priors, we took the IMF from Salpeter (1955) as given by Eqs. 2 and 4, a uniform truncated SFR (Eq. 6), and a flat prior on the MDF. The colour-magnitude diagram of the Hyades is presented in Fig. 11. The age of the cluster is found to be 640 ± 7 Myr on the basis of BaSTI stellar models including convective core overshooting, while it is of 543 ± 6 Myr if models with no overshooting are used instead. These results are in excellent agreement with those obtained by Lebreton et al. (2001). Furthermore, the common metallicity of the cluster stars inferred by SPInS is [M/H] = 0.094 ± 0.003 with overshooting, while it is [M/H] = 0.092 ± 0.003 without overshooting. These values are lower than the observed value 0.14 ± 0.05, but remain within the error bars.
As a by-product, the age-dating of the 92 coeval cluster members has also provided inferences on their individual masses. Therefore, we drew the mass-luminosity relation (hereafter M-L relation) of the cluster as shown in Fig. 12. Furthermore, it is possible to inter-compare independently this relation with the observed one. Indeed, there are several binary systems in the Hyades whose dynamical masses have been derived from orbit analysis. We have inventoried eight binary systems. Five of them (HIP 20019, HIP 20087, HIP 20661, HIP 20885, HIP 20894) have been studied for several decades now. Their M-L relation has been compared with results of stellar models by Lebreton et al. (2001) and revisited by Torres (2019). Also, a few years ago, Beck et al. (2015) detected solar-like oscillations in the giant star HIP 20885A (θ 1 Tau A). From the oscillation power spectrum, they inferred the large frequency separation and frequency at maximum power which allowed them to improve the precision on the star's mass. More recently, the properties of two new systems have been derived by G. Torres and collaborators: the binary system 80 Tau, that is HIP 20995 (Torres 2019) and the triple system HIP 20916 . Also, Halbwachs et al. (2016Halbwachs et al. ( , 2020 obtained the individual masses of the components of HIP 20601, combining interferometry with the PIONIER instrument at ESO's VLTI and spectroscopy with the SOPHIE spectrograph at Haute-Provence Observatory. We therefore have in hand 17 stars with known individual masses. Their positions in the M-L plane shown in Fig. 12 fit very well the M-L relation provided by SPInS. Conversely, we ran SPInS with this sample of 17 stars, taking this time their mass, absolute V-magnitude, and metallicity as observational inputs with the constraint that they have the same age and metallicity. SPInS provided an age of 615 ± 95 Myr using the solar-scaled noncanonical BaSTI grid. This age, although less precise than the age of 640 ± 7 Myr derived from the colour-magnitude diagram positions of the 92 Hipparcos stars because based on a smaller sample and a poor coverage of the MS turn-off, is nevertheless in very good agreement with it. SPInS, therefore, offers many possibilities for studying and comparing coeval ensembles and can be very interesting for all kinds of studies of the dynamics and evolution of the Galaxy.

Binary stars
Binary systems have long provided solid tests of stellar evolution theory, particularly when their components are sufficiently far apart not to undergo mass transfer, since they consist of two stars with different masses that can generally be assumed to share the same age and initial chemical composition. Different quantities may be accessible depending on whether the system is seen as a visual or interferometric binary, a spectroscopic binary (SB), or an eclipsing binary (EB). Of particular interest are systems that combine the SB with the double-lined character known as SB2 and EB properties, which allows us to infer both the indi- vidual masses and radii. In this section we apply SPInS to one binary system and compare its inferences with results from the literature.

AI Phe, a double-lined, eclipsing binary
AI Phe is a double-lined, detached eclipsing binary system composed of a main sequence and a subgiant star. A few years ago, Kirkby-Kent et al. (2016) thoroughly characterised the system by obtaining the mass and radius of the components from spectroscopic and photometric measurements. Then, using these masses and radii, effective temperatures and metallicities from the literature together with stellar evolution models, they estimated the age of the system to be A = 4.39 ± 0.32 Gyr. Recently, Maxted et al. (2020) revisited the masses and radii on the basis of the light-curves provided by the TESS mission (Ricker et al. 2015). Starting from these results, compiled in Table 3, and using the BaSTI solar-scaled non-canonical model grid, a uniform truncated SFR (Eq. 6), and a flat prior both on the MDF and IMF, SPInS provided a common age for the two stars of A = 4.38 ± 0.35 Gyr, which is in excellent agreement with Kirkby-Kent et al. (2016)'s value. However, we point out that Kirkby-Kent et al.'s analysis is more in-depth since they examined the effects of the initial helium abundance and the mixinglength parameter for convection on the results. Because we used a pre-computed BaSTI grid, we did not have the possibility to make these parameters vary. This may explain why SPInS is able to reproduce the observed masses and radii but not the effective temperatures that are colder than the observed ones but remain within the error bars (see Table 3). In order to improve the fit, we would have to run SPInS with a stellar model grid with more stellar parameters.

Conclusion
We have presented SPInS, a Python-Fortran tool dedicated to the inference of stellar properties in various observational situations. SPInS is a spin-off of AIMS, a sophisticated tool focusing on thorough asteroseismic inferences using stellar models together with their individual oscillation frequencies. SPInS is simpler than AIMS in the sense that it only requires standard outputs of stellar models and no individual oscillation frequencies to operate. It can be applied to age-date, weigh, and size up stars or groups of stars, as well as to make predictions on their expected global or mean properties such as asteroseismic indices, with a considerable gain in computing time compared to AIMS. SPInS aims to be user-friendly and can run on any computer cluster or even laptop.
We have first presented the fundamentals of SPInS as well as its inputs and outputs. As a pre-requisite, SPInS needs to have a stellar evolution model grid available. In the public version of SPInS we provide the solar-scaled and α-enhanced canonical and non-canonical BaSTI grids described in Sect. 2.5, but see Pietrinferni et al. (2004) and Pietrinferni et al. (2006) for extensive descriptions. The grids have been downloaded from the BaSTI website and are available in a format compatible with SPInS. As an option, priors on the parameters to be inferred by SPInS may be provided. The inputs that need to be provided to SPInS consist in a set of observational constraints chosen by the user and satisfied by a star or a group of stars sharing common properties, such as the age. The constraints can be of any kind provided they are available as outputs of the stellar model grid or can be directly derived from them. As output, SPInS provides any unknown stellar property available in the grid, including the age, mass, radius, or seismic indices. Any quantity can be provided either as an input if observed or inferred independently, or as an output if unknown.
In order to present the different outputs of SPInS, such as histograms of the PDF of stellar parameters or the estimators of a given quantity, we have run the tool on a set of fictitious stars spanning a wide area in the H-R diagram. We then validated the SPInS program by comparing its inferences with results from the literature. We first showed that SPInS is able to reproduce satisfactorily the ages and masses of more than 10 4 stars of the GCS11 survey as derived from their absolute magnitudes, effective temperatures, and metallicities by Casagrande et al. (2011). We then re-visited the properties of different categories of single stars for which we have access to an extended set of observational constraints, such as radii from interferometric measurements or seismic indices. Overall, we obtained results in excellent agreement with what has been published before. Finally, we applied SPInS to the study of coeval stars. As case studies, we took the Hyades open cluster stars and the components of the eclipsing SB2 binary system AI Phe once more showing an excellent agreement with previous results. We therefore release SPInS 15 as a public tool in the hopes that it will prove to be useful in deciphering the large quantities of exquisite data currently available thanks to current (Gaia, CoRoT, Kepler, TESS) and future (PLATO) space missions and surveys.