CEINMS data preparation pipeline in MATLAB. Experimental data, including marker trajectories, ground reaction forces, and EMG signals, are first conditioned in the pre-processing block which performs filtering, rotation of coordinate systems, calculation of hip, knee, and ankle joint centres, calculation and normalisation of experimental excitations from EMG signals, and file conversions in OpenSim format. OpenSim APIs are then used to first scale a generic OpenSim model, then inverse kinematics, muscle analysis, and inverse dynamics tools are used to calculate MTU lengths, moment arms, and joint moments. The muscle parameters in the scaled OpenSim model are anthropometrically scaled to maintain the same operation range of the generic model (Winby et al 2008), which are then used as the initial conditions for the calibration process in CEINMS. Synergies and weighting factors can be also used in place of experimental muscle excitations as input for CEINMS.