Star-forming regions, stellar associations, and open clusters are fundamental stellar systems where predictions from star-formation theories can be robustly contrasted with observations. We aim to provide the astrophysical community with a free and open-source code to infer the phase-space (i.e. positions and velocities) parameters of stellar systems with lesssim 1000 stars based on Gaia astrometry and possibly observed radial velocities. We upgrade an existing Bayesian hierarchical model and extend it to model 3D (positions) and 6D (positions and velocities) stellar coordinates and system parameters with a flexible variety of statistical models, including a linear velocity field. This velocity field allows for the inference of internal kinematics, including expansion, contraction, and rotation. We extensively validated our statistical models using realistic simulations that mimic the properties of the Gaia Data Release 3. We applied Kalkayotl to beta -Pictoris, the Hyades, and Praesepe, recovering parameter values compatible with those from the literature. In particular, we found an expansion age of $19.1 Myr for beta -Pictoris and rotational signal of $32\! $ for the Hyades and that Praesepe's rotation reported in the literature comes from its periphery. The robust and flexible Bayesian hierarchical model that we make publicly available here represents a step forward in the statistical modelling of stellar systems. The products it delivers, such as expansion, contraction, rotation, and velocity dispersions, can be directly contrasted with predictions from star-formation theories.
Read full abstract